body[data-store-dock] {
  padding-bottom: calc(5.1rem + env(safe-area-inset-bottom)) !important;
}

body[data-store-dock] .mobile-mod-cta { display: none !important; }

.store-dock {
  --dock-blue: #86b4ff;
  position: fixed;
  z-index: 48;
  inset-inline-start: 50%;
  inset-block-end: calc(.65rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .2rem;
  box-sizing: border-box;
  width: min(20.5rem, calc(100% - 2rem));
  margin: 0;
  padding: .3rem;
  border: 1px solid #a8c5ff45;
  border-radius: 1.15rem;
  background: #101521f2;
  box-shadow: 0 .7rem 2.2rem #0009;
  backdrop-filter: blur(14px);
}

html.nav-open .store-dock,
body:has(dialog[open]) .store-dock { visibility: hidden; }

.store-dock .store-dock-action {
  appearance: none;
  display: grid;
  box-sizing: border-box;
  place-items: center;
  min-width: 0;
  min-height: 2.9rem;
  padding: .25rem;
  border: 1px solid transparent;
  border-radius: .85rem;
  background: transparent;
  color: #eaf1ff;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .17s ease, border-color .17s ease, color .17s ease, transform .17s ease;
}

.store-dock .store-dock-action:is(:hover, :focus-visible) {
  border-color: #87b3ff61;
  background: #6096ff26;
  color: var(--dock-blue);
}
.store-dock .store-dock-action:focus-visible { outline: 2px solid var(--dock-blue); outline-offset: 1px; }
.store-dock .store-dock-action:active { transform: scale(.87); background: #6096ff46; }

.store-dock-glyph { position: relative; display: block; width: 24px; height: 24px; color: inherit; }
.store-dock-glyph::before, .store-dock-glyph::after { position: absolute; box-sizing: border-box; }
.store-dock-glyph[data-icon="catalog"]::before {
  content: '';
  inset: 3px auto auto 3px;
  width: 7px;
  height: 7px;
  border-radius: 1.5px;
  background: currentColor;
  box-shadow: 11px 0 currentColor, 0 11px currentColor, 11px 11px currentColor;
}
.store-dock-glyph[data-icon="cart"] {
  background: linear-gradient(currentColor,currentColor) 1px 4px / 7px 2px no-repeat;
}
.store-dock-glyph[data-icon="cart"]::before {
  content: '';
  inset: 6px 2px auto 6px;
  height: 10px;
  border: 2px solid;
  border-radius: 1px 2px 3px 3px;
  transform: skew(-10deg);
}
.store-dock-glyph[data-icon="cart"]::after {
  content: '';
  inset: 18px auto auto 8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 9px 0 currentColor;
}
.store-dock-glyph[data-icon="share"]::before {
  content: '';
  width: 6px;
  height: 6px;
  left: 2px;
  top: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 14px -7px currentColor, 14px 7px currentColor;
}
.store-dock-glyph[data-icon="share"]::after {
  content: '';
  inset: 6px 5px 6px 6px;
  background: linear-gradient(152deg, transparent 42%, currentColor 44% 54%, transparent 56%) top / 100% 50% no-repeat,
    linear-gradient(28deg, transparent 42%, currentColor 44% 54%, transparent 56%) bottom / 100% 50% no-repeat;
}
.store-dock-glyph[data-icon="tutorials"]::before {
  content: '';
  inset: 4px 2px;
  border: 2px solid;
  border-radius: 4px;
  background: linear-gradient(currentColor,currentColor) center / 2px 100% no-repeat;
}
.store-dock-glyph[data-icon="tutorials"]::after {
  content: '';
  inset: 9px auto auto 6px;
  width: 3px;
  height: 1px;
  background: currentColor;
  box-shadow: 9px 0 currentColor, 0 3px currentColor, 9px 3px currentColor;
}
.store-dock-glyph[data-icon="support"]::before {
  content: '';
  inset: 3px 2px 5px;
  border: 2px solid;
  border-radius: 5px;
}
.store-dock-glyph[data-icon="support"]::after {
  content: '';
  width: 6px;
  height: 6px;
  left: 6px;
  bottom: 2px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  background: #101521;
  transform: skewY(-40deg);
}

.store-dock-notice {
  position: fixed;
  z-index: 49;
  inset: auto .75rem calc(4.35rem + env(safe-area-inset-bottom));
  width: fit-content;
  max-width: calc(100% - 1.5rem);
  margin: 0 auto;
  border: 1px solid #a8c5ff45;
  border-radius: .7rem;
  padding: .65rem .85rem;
  background: #121a2b;
  color: #fff;
  font: 600 .875rem/1.4 system-ui, sans-serif;
}

dialog.store-dock-dialog {
  box-sizing: border-box;
  width: min(31rem, calc(100% - 1.5rem));
  max-height: calc(92dvh - env(safe-area-inset-bottom));
  overflow: auto;
  margin: auto;
  padding: 1.2rem;
  border: 1px solid #526382;
  border-radius: 1rem;
  background: #141923;
  color: #f4f7ff;
  font: 500 .95rem/1.45 system-ui, sans-serif;
}
dialog.store-dock-dialog::backdrop { background: #040711c0; }
.store-dock-dialog-top, .store-dock-cart-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.store-dock-dialog-top { margin-bottom: 1rem; }
.store-dock-dialog-top h2 { margin: 0; font: 750 1.35rem/1.2 system-ui, sans-serif; }
.store-dock-dialog button, #speed-add-to-cart {
  min-height: 2.6rem;
  padding: .45rem .7rem;
  border: 1px solid #596b8d;
  border-radius: .65rem;
  background: #252e41;
  color: #f4f7ff;
  font: 700 .85rem/1.2 system-ui, sans-serif;
  cursor: pointer;
}
.store-dock-dialog button:disabled, #speed-add-to-cart:disabled { opacity: .5; cursor: default; }
.store-dock-dialog .store-dock-close { min-width: 2.6rem; font-size: 1.2rem; }
.store-dock-dialog .store-dock-checkout { background: #d4e4ff; color: #101726; width: 100%; }
.store-dock-cart-list { margin: 0; padding: 0; list-style: none; }
.store-dock-cart-row { padding: .75rem 0; border-block-end: 1px solid #ffffff25; }
.store-dock-cart-row span { display: block; margin-top: .25rem; color: #a5c5ff; }
.store-dock-cart-total { font-weight: 800; }
.store-dock-cart-error { color: #ffbcb7; margin-block-end: 0; }
.store-dock-cart-error:empty { display: none; }
.store-dock-share-address { box-sizing: border-box; display: block; width: 100%; padding: .55rem; color: #fff; background: #0d121e; border: 1px solid #596b8d; border-radius: .5rem; font: inherit; }
#speed-add-to-cart { width: 100%; margin-block: .35rem; }

.store-ios-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; margin: .75rem 0 0; font-size: .875rem; }
.store-ios-shortcuts a { color: #a6c6ff; text-decoration: underline; text-underline-offset: .2em; }

@media (prefers-reduced-motion: reduce) {
  .store-dock .store-dock-action { transition: none; }
  .store-dock .store-dock-action:active { transform: none; }
}

.store-dock span.store-dock-glyph.store-dock-glyph-svg {
  display: grid;
  place-items: center;
  color: inherit;
  background: none;
  -webkit-mask: none;
  mask: none;
}
.store-dock .store-dock-glyph.store-dock-glyph-svg::before,
.store-dock .store-dock-glyph.store-dock-glyph-svg::after { content: none; }
.store-dock-glyph-svg svg { display: block; }
