.store-panel {
  position: fixed;
  z-index: 18;
  top: 24px;
  right: 116px;
  width: min(460px, calc(100vw - 140px));
  max-height: calc(100vh - 48px);
  pointer-events: auto;
}

.store-panel.is-hidden {
  display: none;
}

.store-banner.is-hidden {
  display: none;
}

.store-panel-shell {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 16px;
  max-height: calc(100vh - 48px);
  padding: 18px;
  border-radius: 34px;
  border: 1px solid rgba(255, 223, 159, 0.18);
  background:
    radial-gradient(circle at top left, rgba(255, 245, 211, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(56, 28, 9, 0.96), rgba(98, 52, 13, 0.96));
  box-shadow:
    0 28px 80px rgba(3, 5, 18, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #fff7ec;
  overflow-x: hidden;
  overflow-y: auto;
}

.store-topbar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
}

.store-circle-button {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 14, 13, 0.68);
  color: #fff8f2;
  font: 700 1.9rem/1 "Syne", sans-serif;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, background 180ms ease;
}

.store-circle-button:hover,
.store-circle-button:focus-visible {
  transform: translateY(-1px);
  background: rgba(29, 21, 16, 0.92);
}

.store-circle-button.is-hidden {
  display: none;
}

#store-close-button {
  position: absolute;
  left: 0;
  top: 0;
}

#store-back-button {
  position: absolute;
  left: 64px;
  top: 0;
}

.store-wallet-pill,
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 243, 227, 0.94));
  color: #5f76b5;
  box-shadow: 0 14px 40px rgba(13, 8, 4, 0.24);
}

.store-wallet-pill {
  justify-self: end;
}

.store-wallet-pill strong,
.store-badge strong {
  font: 800 1.85rem/1 "Syne", sans-serif;
}

.store-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 20px 20px 18px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(202, 138, 47, 0.92), rgba(147, 88, 24, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.store-kicker {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 243, 229, 0.78);
  font: 600 0.8rem/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.store-title,
.store-preview-title {
  margin: 0;
  font: 800 clamp(1.6rem, 2vw, 2.1rem)/1.02 "Syne", sans-serif;
}

.store-copy {
  margin: 8px 0 0;
  color: rgba(255, 246, 237, 0.88);
  font: 500 0.98rem/1.45 "Syne", sans-serif;
}

.store-stage {
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding-right: 6px;
}

.store-grid-view,
.store-preview-view {
  display: grid;
  gap: 16px;
}

.store-grid-view.is-hidden {
  display: none;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.store-card {
  display: grid;
  grid-template-rows: auto minmax(2.6em, auto) auto;
  align-content: start;
  gap: 10px;
  padding: 14px 12px 16px;
  border: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(194, 120, 243, 0.96), rgba(159, 90, 224, 0.95) 52%, rgba(204, 133, 255, 0.92));
  box-shadow:
    inset 0 0 0 6px rgba(245, 179, 255, 0.42),
    0 14px 32px rgba(27, 8, 33, 0.24);
  color: #fff8ff;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.store-card:hover,
.store-card:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 6px rgba(250, 208, 255, 0.5),
    0 20px 38px rgba(27, 8, 33, 0.34);
}

.store-card-preview {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  overflow: hidden;
}

.store-card-preview::after {
  content: "";
  position: absolute;
  inset: auto 14% 8% 14%;
  height: 16%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 236, 195, 0.34), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
}

.store-card-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 8px;
  box-sizing: border-box;
}

.store-card-preview.is-loading {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.08) 20%, rgba(255, 255, 255, 0.24) 40%, rgba(255, 255, 255, 0.08) 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  background-size: 220% 100%, 100% 100%;
  animation: store-preview-sheen 1.2s linear infinite;
}

.store-card-name {
  font: 700 0.96rem/1.2 "Syne", sans-serif;
  min-height: 2.4em;
}

.store-card-price {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 1rem/1 "Syne", sans-serif;
}

.store-credit-gem {
  width: 24px;
  height: 24px;
  display: inline-block;
  clip-path: polygon(50% 0%, 86% 20%, 100% 56%, 72% 100%, 24% 100%, 0% 56%, 14% 20%);
  background:
    linear-gradient(135deg, #8cf2cf 0 34%, #9fd8ff 34% 56%, #ffd97d 56% 78%, #ff9cce 78% 100%);
  box-shadow:
    0 2px 10px rgba(255, 208, 152, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transform: rotate(8deg);
}

.store-credit-gem.is-small {
  width: 18px;
  height: 18px;
}

.store-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-preview-media {
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  margin: 4px 0 2px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(194, 120, 243, 0.96), rgba(159, 90, 224, 0.95) 52%, rgba(204, 133, 255, 0.92));
  box-shadow:
    inset 0 0 0 6px rgba(245, 179, 255, 0.42),
    0 14px 32px rgba(27, 8, 33, 0.24);
  overflow: hidden;
}

.store-upload-wrap {
  display: grid;
  gap: 8px;
  align-items: start;
}

.store-upload-wrap.is-hidden {
  display: none;
}

.store-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 247, 236, 0.12);
  color: #fff8f2;
  font: 700 0.92rem/1 "Syne", sans-serif;
  cursor: pointer;
  width: fit-content;
}

#store-sticker-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.store-upload-name {
  color: rgba(255, 241, 225, 0.82);
  font: 500 0.88rem/1.4 "Syne", sans-serif;
}

.store-preview-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 249, 240, 0.1);
  color: #fff6e8;
  font: 600 0.82rem/1 "IBM Plex Mono", monospace;
}

.store-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.store-purchase-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffd75b, #f4b826);
  color: #5d3200;
  font: 800 1rem/1 "Syne", sans-serif;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(75, 40, 4, 0.26);
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.store-purchase-button:hover,
.store-purchase-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.store-purchase-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.store-feedback {
  margin: 0;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 235, 208, 0.1);
  color: #ffe3bf;
  font: 500 0.95rem/1.45 "Syne", sans-serif;
}

.store-feedback.is-hidden,
.store-preview-view.is-hidden,
.store-empty.is-hidden {
  display: none;
}

.store-empty {
  place-items: center;
  text-align: center;
  padding: 36px 20px;
  border-radius: 28px;
  background: rgba(255, 247, 236, 0.08);
}

.store-empty strong {
  font: 800 1.3rem/1.1 "Syne", sans-serif;
}

.store-empty p {
  margin: 10px 0 0;
  max-width: 28ch;
  color: rgba(255, 241, 225, 0.82);
  font: 500 0.96rem/1.5 "Syne", sans-serif;
}

.store-feature-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 150px;
}

.store-feature-preview {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(194, 120, 243, 0.96), rgba(159, 90, 224, 0.95) 52%, rgba(204, 133, 255, 0.92));
  box-shadow:
    inset 0 0 0 5px rgba(245, 179, 255, 0.42),
    0 12px 26px rgba(27, 8, 33, 0.22);
  overflow: hidden;
}

.store-feature-preview.is-loading {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.08) 20%, rgba(255, 255, 255, 0.24) 40%, rgba(255, 255, 255, 0.08) 60%),
    linear-gradient(135deg, rgba(194, 120, 243, 0.96), rgba(159, 90, 224, 0.95) 52%, rgba(204, 133, 255, 0.92));
  background-size: 220% 100%, 100% 100%;
  animation: store-preview-sheen 1.2s linear infinite;
}

.store-feature-name {
  max-width: 120px;
  text-align: center;
  font: 700 0.9rem/1.1 "Syne", sans-serif;
}

.store-footer-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  margin-top: auto;
  border-radius: 26px;
  background: rgba(83, 43, 12, 0.74);
  position: sticky;
  bottom: 0;
  z-index: 3;
}

.store-category-button {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 10px 12px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: rgba(255, 247, 236, 0.86);
  font: 700 0.98rem/1 "Syne", sans-serif;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.store-category-button.is-active {
  background: rgba(223, 186, 142, 0.42);
  color: #fffdf9;
}

.store-category-label {
  display: block;
  font: 700 0.92rem/1.05 "Syne", sans-serif;
  text-align: center;
}

.store-category-button:hover,
.store-category-button:focus-visible {
  transform: translateY(-1px);
}

.store-category-icon {
  position: relative;
  width: 38px;
  height: 38px;
}

.store-category-icon-moons::before,
.store-category-icon-moons::after,
.store-category-icon-colors::before,
.store-category-icon-colors::after,
.store-category-icon-objects::before,
.store-category-icon-objects::after,
.store-category-icon-stickers::before,
.store-category-icon-stickers::after {
  content: "";
  position: absolute;
}

.store-category-icon-moons::before {
  inset: 7px 9px 7px 9px;
  border-radius: 999px;
  background: radial-gradient(circle at 34% 28%, #fef0c9, #f1bb64 72%, #8d5121 100%);
}

.store-category-icon-moons::after {
  inset: 2px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
}

.store-category-icon-colors::before {
  inset: 6px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffaf8f, #ffed8b 48%, #78e4d6 100%);
  transform: rotate(-12deg);
}

.store-category-icon-colors::after {
  width: 14px;
  height: 14px;
  right: 2px;
  bottom: 1px;
  border-radius: 999px;
  background: #ff7ea2;
  box-shadow: -18px -4px 0 #8ecbff;
}

.store-category-icon-objects::before {
  left: 7px;
  right: 7px;
  top: 8px;
  bottom: 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd797, #cf7b36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.store-category-icon-objects::after {
  left: 15px;
  right: 15px;
  top: 4px;
  height: 10px;
  border-radius: 999px;
  border: 3px solid rgba(255, 245, 232, 0.88);
  border-bottom: 0;
}

.store-category-icon-stickers::before {
  inset: 7px 8px 9px 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffe4a3, #ff9fc2);
  transform: rotate(-10deg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.store-category-icon-stickers::after {
  width: 12px;
  height: 12px;
  right: 4px;
  bottom: 3px;
  border-radius: 4px 0 6px 0;
  background: rgba(255, 247, 236, 0.9);
  transform: rotate(-10deg);
}

.store-btn-icon {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  animation: store-icon-sway 4.8s ease-in-out infinite;
}

.store-btn-roof,
.store-btn-awning,
.store-btn-body,
.store-btn-door,
.store-btn-window,
.store-btn-spark {
  position: absolute;
}

.store-btn-roof {
  left: 10px;
  right: 10px;
  top: 10px;
  height: 10px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #ffd35d, #d37818);
}

.store-btn-awning {
  left: 8px;
  right: 8px;
  top: 18px;
  height: 12px;
  border-radius: 4px 4px 8px 8px;
  background:
    repeating-linear-gradient(90deg, #fff8f0 0 7px, #ff9d6c 7px 14px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.store-btn-body {
  left: 11px;
  right: 11px;
  top: 28px;
  bottom: 9px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffaf4, #ecc9a5);
}

.store-btn-door {
  left: 19px;
  bottom: 9px;
  width: 10px;
  height: 15px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #8a552f, #5a3118);
}

.store-btn-window {
  top: 34px;
  width: 9px;
  height: 9px;
  border-radius: 4px;
  background: linear-gradient(180deg, #a6e7ff, #7db1ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.store-btn-window-a {
  left: 19px;
}

.store-btn-window-b {
  right: 19px;
}

.store-btn-spark {
  top: 8px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
  border-radius: 999px;
  animation: store-spark-twinkle 1.8s ease-in-out infinite alternate;
}

@keyframes store-preview-sheen {
  from { background-position: 180% 0, 0 0; }
  to { background-position: -40% 0, 0 0; }
}

@keyframes store-icon-sway {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  35% { transform: translateY(-1px) rotate(-2deg); }
  70% { transform: translateY(1px) rotate(2deg); }
}

@keyframes store-spark-twinkle {
  0% { opacity: 0.3; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.15); }
}

@media (max-width: 900px) {
  .store-panel {
    top: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-height: calc(100vh - 32px);
  }

  .store-panel-shell {
    max-height: calc(100vh - 32px);
    border-radius: 28px;
    padding: 14px;
  }

  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .store-topbar {
    grid-template-columns: 1fr auto;
  }

  .store-wallet-pill {
    grid-column: 2;
    grid-row: 1;
  }

  .store-banner {
    grid-template-columns: 1fr;
  }

  .store-feature-card {
    justify-items: start;
  }

  .store-feature-name {
    max-width: none;
    text-align: left;
  }

  .store-grid {
    gap: 12px;
  }

  .store-card {
    border-radius: 24px;
  }

  .store-footer-nav {
    gap: 8px;
    padding: 8px;
  }

  .store-category-button {
    padding: 12px 6px 10px;
  }

  .store-category-label {
    font-size: 0.82rem;
  }
}
