.store-page {
  background: var(--bg);
}

.site-store {
  max-width: 1180px;
  min-height: 100vh;
}

.btn-store.is-active {
  background: rgba(251, 191, 36, 0.22);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fcd34d;
  pointer-events: none;
}

.store-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.store-shell-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.store-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
  margin-bottom: 0.2rem;
}

.store-shell-head h1 {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
}

.store-user {
  padding: 1rem 1.1rem;
  border-radius: var(--r);
  border: 1px solid rgba(251, 191, 36, 0.15);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06) 0%, var(--panel) 70%);
}

.store-user label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.store-user-row {
  display: flex;
  gap: 0.55rem;
}

.store-user-row input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: inherit;
  font-weight: 600;
}

.store-user-row input:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

.store-user-hint {
  margin-top: 0.45rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.store-status {
  font-size: 0.85rem;
  color: var(--muted);
}

.store-status.is-error {
  color: #fca5a5;
}

.store-status.is-loading::after {
  content: '';
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-left: 0.45rem;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #fbbf24;
  border-radius: 50%;
  vertical-align: -0.1rem;
  animation: store-spin 0.7s linear infinite;
}

@keyframes store-spin {
  to { transform: rotate(360deg); }
}

.store-category {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.store-category + .store-category {
  margin-top: 0.5rem;
}

.store-category-head h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.store-category-desc {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.store-category-desc p {
  margin: 0;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.store-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--panel);
  overflow: hidden;
  min-height: 100%;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}

.store-card:hover {
  border-color: rgba(251, 191, 36, 0.25);
  transform: translateY(-2px);
}

.store-card-media {
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(ellipse 85% 75% at 50% 45%, rgba(251, 191, 36, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #121216 0%, #0a0a0d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.store-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.store-card-placeholder {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  color: rgba(251, 191, 36, 0.35);
}

.store-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.95rem 1rem 1rem;
  flex: 1;
}

.store-card-body h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1.25;
}

.store-card-desc {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
  min-height: calc(0.76rem * 1.45 * 3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card-desc p {
  margin: 0;
}

.store-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: -0.25rem 0 0.15rem;
}

.store-card-view {
  display: block;
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.08);
  color: #fcd34d;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, border-color 0.2s;
}

.store-card-view:hover {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}

.store-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.store-price {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1rem;
  color: #fbbf24;
}

.store-buy {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: none;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fcd34d;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.store-buy:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.25);
}

.store-buy:active:not(:disabled) {
  transform: scale(0.97);
}

.store-buy:disabled {
  opacity: 0.55;
  cursor: wait;
}

.store-empty,
.store-setup {
  padding: 1.25rem;
  border-radius: var(--r);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.store-setup code {
  color: #fcd34d;
  font-size: 0.82rem;
}

.store-setup a {
  color: var(--pink);
  font-weight: 600;
}

.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.checkout-modal[hidden] {
  display: none;
}

.checkout-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.checkout-modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(90vh, 820px);
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.checkout-close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.checkout-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

#checkout-root {
  min-height: 520px;
}

.package-modal {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: none;
  place-items: center;
  padding: 1rem;
}

.package-modal.is-open,
.package-modal:not([hidden]) {
  display: grid;
}

body.package-modal-open {
  overflow: hidden;
}

.package-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.package-modal-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: min(90vh, 820px);
  overflow: auto;
  background: #111114;
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.package-modal-media {
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(ellipse 85% 75% at 50% 45%, rgba(251, 191, 36, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #121216 0%, #0a0a0d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  overflow: hidden;
}

.package-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

.package-modal-body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.package-modal-body h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  padding-right: 2rem;
}

.package-modal-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.package-modal-desc p {
  margin: 0 0 0.5rem;
}

.package-modal-desc ul {
  margin: 0.35rem 0 0.5rem;
  padding-left: 1.1rem;
}

.package-modal-desc li {
  margin-bottom: 0.25rem;
}

.package-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 680px) {
  .store-user-row {
    flex-direction: column;
  }

  .store-grid {
    grid-template-columns: 1fr;
  }
}
