.shop-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1rem;
}
.shop-heading h1 { margin: 0; }
.shop-heading select {
  min-height: 2.35rem;
  margin-inline-start: .4rem;
  padding: .25rem .45rem;
  color: #15344a;
  background: #f4fbfc;
  border: 1px solid #7bafbf;
  border-radius: 5px;
}
.theme-winter-night .shop-page > :is(.shop-heading, p) { color: #e8f9fc; }
@media (min-width: 861px) {
  .desktop-nav a.nav-pill { padding-inline: .74rem; }
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: 1rem;
  align-items: start;
}
.shop-product { display: grid; gap: .9rem; min-width: 0; }
.shop-product h2, .shop-product p { margin: 0; }
.shop-product-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .65rem .5rem;
  min-height: 6.5rem;
  min-width: 0;
}
.shop-product-preview > .avatar-stage { flex: 0 0 auto; }
.shop-product-preview > .chat-msg { flex: 1 1 0; min-width: 0; }
.shop-product-info { display: flex; gap: 1.25rem; margin: 0; flex-wrap: wrap; }
.shop-product-info dt { font-size: .82rem; }
.shop-product-info dd { margin: 0; font-weight: 800; }
.shop-actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.shop-actions :is(button, a) { min-height: 44px; }
.shop-feedback { border-inline-start: 4px solid currentColor; padding-inline-start: .8rem; }
.admin-shop .shop-heading h2, .admin-shop-product-head h3 { margin: 0; }
.admin-shop .shop-heading .btn { min-height: 44px; }
.admin-shop-products { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.admin-shop-product-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .8rem;
}
.admin-shop-product .shop-product-preview { padding-inline: .3rem; }
.admin-shop-form { max-width: 39rem; margin-block-end: 1rem; }
.admin-shop-form fieldset { border: 1px solid #89a7ad; padding: 1rem; min-inline-size: 0; }
.admin-shop-form .field { margin-bottom: .65rem; }
.admin-shop-form .check-row { margin-bottom: .65rem; }
@media (max-width: 480px) {
  .shop-product-preview { flex-wrap: wrap; }
  .shop-product-preview > .chat-msg { flex-basis: 100%; }
}

.avatar-stage.frame-frost-night {
  --shop-avatar-frame: url("./assets/ui/themes/shop-frost-night-frame.png");
  --winter-photo-top: 4.5%;
  --winter-photo-left: 5.5%;
  --winter-photo-width: 89%;
  --winter-photo-height: 91%;
  --winter-photo-background: #153455;
}
.avatar-stage.frame-festive-garland {
  --shop-avatar-frame: url("./assets/ui/themes/shop-festive-garland-frame.png");
  --shop-avatar-face: #164432;
}
.avatar-stage:is(.frame-frost-night, .frame-festive-garland) {
  isolation: isolate;
  border: 3px solid transparent;
  box-shadow: none;
  background: none;
}
.avatar-stage:is(.frame-frost-night, .frame-festive-garland)::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 1;
  pointer-events: none;
  background: var(--shop-avatar-frame) center / 100% 100% no-repeat;
  image-rendering: pixelated;
}
.avatar-stage.frame-festive-garland .avatar-ring { background: var(--shop-avatar-face); }
.avatar-stage:is(.frame-frost-night, .frame-festive-garland) .avatar-fallback { color: #f1fbff; }
.user-chip-badge.badge-frost-night {
  color: #eaf7ff;
  background: #152e55;
  border-color: #b4dfff;
  box-shadow: inset 0 0 0 1px #42678d, 0 0 0 1px #183956;
}
.user-chip-badge.badge-festive-garland {
  color: #fff4df;
  background: #6b211e;
  border-color: #ffca75;
  box-shadow: inset 0 0 0 1px #b74b33, 0 0 0 1px #55251b;
}

.chat-msg:is(.chat-style-frost-night, .chat-style-festive-garland) {
  position: relative;
  isolation: isolate;
  border: 2px solid var(--shop-chat-edge);
  border-radius: 5px;
  background-color: var(--shop-chat-face);
  color: #f0f8f9;
}
.chat-msg.chat-style-frost-night {
  --shop-chat-edge: #83afd0;
  --shop-chat-face: #122951;
  background-image: linear-gradient(90deg, #122951 8%, #122951b8 41%, transparent 78%),
    url("./assets/ui/themes/shop-frost-night-chat.png");
  background-position: center, right center;
  background-size: cover;
}
.chat-msg.chat-style-festive-garland {
  --shop-chat-edge: #769d81;
  --shop-chat-face: #153c2c;
  background-image: linear-gradient(104deg, #112f23, #174633);
}
.chat-msg:is(.chat-style-frost-night, .chat-style-festive-garland).is-selected {
  box-shadow: inset 0 0 0 2px #fff9;
}
.chat-msg:is(.chat-style-frost-night, .chat-style-festive-garland)::before,
.chat-msg:is(.chat-style-frost-night, .chat-style-festive-garland)::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  image-rendering: pixelated;
}
.chat-msg.chat-style-frost-night::after {
  inset: -2px;
  border: clamp(20px, 4vw, 28px) solid transparent;
  border-image: url("./assets/ui/themes/winter-crystal-chat-edge.png") 27% stretch;
  filter: saturate(.42);
}
.chat-msg.chat-style-festive-garland::before,
.chat-msg.chat-style-festive-garland::after {
  width: 43px;
  height: 43px;
  background: url("./assets/ui/themes/shop-festive-garland-chat.png") center / contain no-repeat;
}
.chat-msg.chat-style-festive-garland::before { inset: -2px auto auto -2px; }
.chat-msg.chat-style-festive-garland::after { inset: auto -2px -2px auto; transform: rotate(180deg); }
.chat-msg.chat-style-frost-night::before,
.chat-msg.chat-style-festive-garland .chat-msg-row::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: 0 0 0 43%;
  opacity: .78;
  mask-image: linear-gradient(90deg, transparent, #000 42%);
  background-image: url("./assets/ui/themes/winter-chat-snow.png"), url("./assets/ui/themes/winter-chat-snow.png");
  background-size: 144px 112px, 108px 84px;
  background-position: 100% 14px, 100% -23px;
}
.chat-msg:is(.chat-style-frost-night, .chat-style-festive-garland) :is(.chat-msg-author, .chat-msg-body, .chat-msg-check) { color: #f1f9ff; }
.chat-msg:is(.chat-style-frost-night, .chat-style-festive-garland) :is(.chat-msg-meta > .muted, .chat-msg-fwd) { color: #d2e6ef; }
.chat-msg:is(.chat-style-frost-night, .chat-style-festive-garland) .chat-msg-body :is(a, .chat-mention, .chat-cmd) { color: #afedff; }
@media (prefers-reduced-motion: no-preference) {
  .chat-msg.chat-style-frost-night::before,
  .chat-msg.chat-style-festive-garland .chat-msg-row::before { animation: shop-chat-snow 15s linear infinite; }
  .avatar-stage:is(.frame-frost-night, .frame-festive-garland)::before { animation: shop-frame-shimmer 6s ease-in-out infinite; }
}
@keyframes shop-chat-snow {
  to { background-position: 100% 126px, 100% 145px; }
}
@keyframes shop-frame-shimmer {
  0%, 70%, 100% { filter: brightness(1); }
  82% { filter: brightness(1.18); }
}
