/**
 * Página Montar meu Pack — visual da Astex Storms, na azul do site.
 */

:root {
  --pack-accent: hsl(var(--primary));
  --pack-accent-glow: hsl(var(--primary) / 0.18);
  --pack-accent-dim: hsl(var(--primary) / 0.1);
  --pack-accent-border: hsl(var(--primary) / 0.32);
  --pack-promo-bg: hsl(var(--primary) / 0.04);
  --pack-btn-text: #0a0a0a;
  --pack-gold: #f5c451;
  --pack-save: #4ade80;
}

body.is-pack-page {
  background: #131316;
}

.pack-btn-primary {
  background: hsl(var(--primary));
  color: var(--pack-btn-text);
  border-color: hsl(var(--primary));
  box-shadow: 0 2px 12px hsl(var(--primary) / 0.2);
}

.pack-btn-primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 4px 16px hsl(var(--primary) / 0.25);
}

.pack-page {
  font-family: 'Sora', system-ui, sans-serif;
  background: none;
  padding-top: calc(var(--site-header-offset, 6.5rem) + 1.25rem);
  padding-bottom: 110px;
}

@media (max-width: 767px) {
  .pack-page {
    padding-top: calc(4.75rem + env(safe-area-inset-top, 0px));
    padding-bottom: 96px;
  }
}

.pack-container {
  position: relative;
  z-index: 10;
}

.pack-tabs {
  display: inline-flex;
  gap: 10px;
  margin-bottom: 28px;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px;
}

.pack-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  background: rgba(10, 14, 24, 0.62);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: all 0.25s;
  text-decoration: none;
}

.pack-tab:hover {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.18);
}

.pack-tab.active {
  background: var(--pack-accent-dim);
  border-color: var(--pack-accent-border);
  color: var(--pack-accent);
  box-shadow: 0 0 16px hsl(var(--primary) / 0.12);
}

.pack-tab-badge {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--pack-gold);
  color: #241a02;
}

.pack-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 0 14px 14px;
  pointer-events: none;
}

.pack-bottom-inner {
  pointer-events: auto;
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(10, 12, 20, 0.93);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -6px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.pack-bottom-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--pack-accent);
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.pack-slots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.pack-slot {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.28);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  transition: all 0.25s;
}

.pack-slot.filled {
  border: 1px solid var(--pack-accent-border);
  background: var(--pack-accent-dim);
  animation: pack-slot-in 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.pack-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes pack-slot-in {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.pack-bottom-texts {
  flex: 1;
  min-width: 0;
}

.pack-bottom-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.pack-bottom-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
  line-height: 1.3;
}

.pack-bottom-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pack-bottom-count {
  text-align: right;
  line-height: 1.15;
}

.pack-bottom-count span {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}

.pack-bottom-count small {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

@keyframes pack-burst {
  0% {
    box-shadow: 0 -6px 40px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
  }
  50% {
    box-shadow: 0 -6px 40px rgba(0, 0, 0, 0.6), 0 0 26px hsl(var(--primary) / 0.45);
    border-color: hsl(var(--primary) / 0.55);
  }
  100% {
    box-shadow: 0 -6px 40px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
  }
}

.burst-active {
  animation: pack-burst 0.7s cubic-bezier(0.25, 1, 0.5, 1) 1;
}

.pack-search-wrap {
  position: relative;
  width: 100%;
}

.pack-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.pack-search-input {
  width: 100%;
  height: 60px;
  padding: 0 20px 0 54px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: rgba(8, 12, 20, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s, background 0.2s;
}

.pack-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.pack-search-input:focus {
  outline: none;
  border-color: hsl(var(--primary) / 0.5);
  background: rgba(8, 12, 20, 0.6);
}

.pack-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}

.pack-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: scale(1.035);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  background: rgba(255, 255, 255, 0.04) !important;
  z-index: 2;
}

.pack-capa {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.pack-capa img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pack-corpo {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pack-nome {
  min-height: 2.7em;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pack-divisor {
  height: 1px;
  margin: 10px 0 12px;
  background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
  .pack-nome {
    font-size: 0.9375rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pack-card:hover {
    transform: none;
  }
}

.pack-card.selected {
  border-color: var(--pack-accent) !important;
  box-shadow: 0 0 12px var(--pack-accent-glow) !important;
  background: var(--pack-accent-dim) !important;
}

.pack-check {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pack-card.selected .pack-check {
  background: var(--pack-accent);
  border-color: var(--pack-accent);
  color: #fff;
}

.pack-check svg {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s;
}

.pack-card.selected .pack-check svg {
  opacity: 1;
  transform: scale(1);
}

.select-btn {
  margin-top: auto;
  width: 100%;
  height: 40px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.8);
}

.select-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pack-card.selected .select-btn {
  border-color: var(--pack-accent-border);
  background: var(--pack-accent-dim);
  color: var(--pack-accent);
}

#finalize-pack-btn {
  height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
}

#finalize-pack-btn.ready {
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
  color: var(--pack-btn-text);
  cursor: pointer;
  box-shadow: 0 2px 12px hsl(var(--primary) / 0.2);
}

#finalize-pack-btn.ready:hover {
  filter: brightness(1.04);
  transform: scale(1.01);
}

.pack-skeleton {
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 14px;
  overflow: hidden;
  animation: pack-shimmer 1.5s infinite;
}

.pack-skeleton__cover {
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.04);
}

.pack-skeleton__body {
  padding: 14px;
}

.pack-skeleton__line {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}

.pack-skeleton__btn {
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  margin-top: 12px;
}

@keyframes pack-shimmer {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

#variation-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  transition: background 0.3s;
}

#variation-modal-backdrop.open {
  background: rgba(0, 0, 0, 0.7);
  pointer-events: all;
}

#variation-modal {
  width: 100%;
  max-width: 480px;
  background: #0f1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px 24px 0 0;
  padding: 0 0 32px 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
}

#variation-modal-backdrop.open #variation-modal {
  transform: translateY(0);
}

@media (min-width: 640px) {
  #variation-modal-backdrop {
    align-items: center;
  }

  #variation-modal {
    border-radius: 24px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.85);
    opacity: 0;
  }

  #variation-modal-backdrop.open #variation-modal {
    transform: scale(1);
    opacity: 1;
  }
}

.var-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s;
  gap: 12px;
}

.var-option:hover {
  border-color: hsl(var(--primary) / 0.5);
  background: hsl(var(--primary) / 0.07);
}

.var-option.selected-var {
  border-color: var(--pack-accent);
  background: var(--pack-accent-dim);
}

.var-option-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.var-option.selected-var .var-option-radio {
  border-color: var(--pack-accent);
  background: var(--pack-accent);
}

.var-option-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s;
}

.var-option.selected-var .var-option-radio-dot {
  opacity: 1;
  transform: scale(1);
}

.var-option.sem-estoque {
  opacity: 0.5;
  cursor: not-allowed;
  border-style: dashed;
}

.var-option.sem-estoque:hover {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.06);
}

.var-option-esgotado {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
}

#vm-confirm.ready {
  background: hsl(var(--primary)) !important;
  color: var(--pack-btn-text) !important;
  cursor: pointer !important;
  box-shadow: 0 2px 12px hsl(var(--primary) / 0.2);
}

#vm-confirm.ready:hover {
  filter: brightness(1.04);
}

#pack-bag-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  transition: background 0.3s;
}

#pack-bag-backdrop.open {
  background: rgba(0, 0, 0, 0.75);
  pointer-events: all;
}

#pack-bag-modal {
  width: 100%;
  max-width: 520px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.35s;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}

#pack-bag-backdrop.open #pack-bag-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.pack-bag-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}

.pack-bag-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pack-accent);
  margin-bottom: 4px;
}

.pack-bag-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--pack-accent);
  margin-top: 4px;
}

.pack-bag-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pack-accent);
  border: 1px solid var(--pack-accent);
  color: #fff;
}

.pack-bag-promo {
  border-radius: 14px;
  border: 1px solid var(--pack-accent-border);
  background: var(--pack-promo-bg);
  padding: 16px;
}

.pack-bag-promo-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pack-accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pack-bag-promo-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.68);
}

.pack-bag-promo-item + .pack-bag-promo-item {
  margin-top: 10px;
}

.pack-bag-promo-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pack-accent-dim);
  color: var(--pack-accent);
}

.pack-bag-promo-highlight {
  color: var(--pack-accent);
  font-weight: 600;
}

.pack-bag-upsell {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 196, 81, 0.32);
  background: linear-gradient(90deg, rgba(245, 196, 81, 0.12), rgba(245, 196, 81, 0.03));
  text-decoration: none;
  transition: filter 0.2s, border-color 0.2s;
}

.pack-bag-upsell:hover {
  filter: brightness(1.08);
  border-color: rgba(245, 196, 81, 0.5);
}

.pack-bag-upsell-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 196, 81, 0.16);
  color: var(--pack-gold);
}

.pack-bag-upsell-copy {
  flex: 1;
  min-width: 0;
}

.pack-bag-upsell-title {
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.pack-bag-upsell-title span {
  color: var(--pack-gold);
  font-weight: 800;
}

.pack-bag-upsell-sub {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.58);
}

.pack-bag-upsell-sub strong {
  color: var(--pack-gold);
  font-weight: 700;
}

.pack-bag-upsell-cta {
  flex-shrink: 0;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--pack-gold);
  color: #241a02;
}

.pack-bag-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.25);
  color: hsl(var(--primary));
}

#pack-bag-cart-btn {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: hsl(var(--primary));
  border: none;
  color: var(--pack-btn-text);
  box-shadow: 0 2px 12px hsl(var(--primary) / 0.2);
  transition: filter 0.2s, box-shadow 0.2s;
}

#pack-bag-cart-btn:hover {
  filter: brightness(1.04);
  box-shadow: 0 4px 16px hsl(var(--primary) / 0.25);
  transform: none;
}

#pack-bag-cart-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#pack-bag-back {
  background: none;
  border: none;
  height: auto;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  cursor: pointer;
  transition: color 0.2s;
}

#pack-bag-back:hover {
  color: rgba(255, 255, 255, 0.85);
  background: none;
}

@media (max-width: 760px) {
    .pack-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      width: 100%;
      overflow: visible;
    }

  .pack-tab {
    justify-content: center;
    text-align: center;
    padding: 10px 8px;
    font-size: 11px;
    line-height: 1.25;
    white-space: normal;
    gap: 6px;
  }

  .pack-tab-badge {
    display: none;
  }

  .pack-bottom-inner {
    gap: 10px;
    padding: 10px 12px;
  }

  .pack-slots {
    gap: 4px;
  }

  .pack-slot {
    width: 34px;
    height: 34px;
    font-size: 11px;
    border-radius: 8px;
  }

  .pack-bottom-title {
    font-size: 12px;
    line-height: 1.25;
  }

  .pack-bottom-sub {
    display: none;
  }

  .pack-bottom-count {
    display: none;
  }

  #finalize-pack-btn {
    height: 42px;
    padding: 0 14px;
    font-size: 10.5px;
    letter-spacing: 0.03em;
  }

  .pack-search-input {
    height: 52px;
    font-size: 14px;
    padding-left: 46px;
  }

  .pack-search-icon {
    left: 15px;
  }
}

@media (max-width: 480px) {
  .pack-slots {
    display: none;
  }
}

/* ── Progressão de faixas ─────────────────────────────────── */

.pack-levels {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
}

.pack-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  transition: border-color 0.25s, background 0.25s, color 0.25s, box-shadow 0.25s;
}

.pack-level span {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  color: inherit;
}

.pack-level small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.85;
}

.pack-level.is-next {
  border-color: var(--pack-accent-border);
  color: rgba(255, 255, 255, 0.78);
}

.pack-level.is-current,
.pack-level.is-done {
  border-color: var(--pack-accent-border);
  background: var(--pack-accent-dim);
  color: var(--pack-accent);
  box-shadow: 0 0 16px hsl(var(--primary) / 0.12);
}

.pack-bottom-off {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pack-accent);
}

.pack-bottom-continue {
  height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: hsl(var(--primary));
  border: 1px solid hsl(var(--primary));
  color: var(--pack-btn-text);
  box-shadow: 0 2px 12px hsl(var(--primary) / 0.2);
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
}

.pack-bottom-continue:hover {
  filter: brightness(1.04);
  transform: scale(1.01);
}

#pack-continue-btn:not([hidden]) + #finalize-pack-btn.ready {
  background: transparent;
  border: 1px solid hsl(var(--primary) / 0.45);
  color: #fff;
  box-shadow: none;
}

#pack-continue-btn:not([hidden]) + #finalize-pack-btn.ready:hover {
  background: rgba(59, 130, 246, 0.12);
  filter: none;
}

.pack-bottom-inner.has-level {
  border-color: hsl(var(--primary) / 0.28);
}

.pack-bottom-inner.is-almost {
  border-color: hsl(var(--primary) / 0.55);
  box-shadow: 0 -6px 40px rgba(0, 0, 0, 0.6), 0 0 22px hsl(var(--primary) / 0.28);
}

.pack-bottom-inner.is-almost .pack-bottom-title {
  color: #fff;
  font-size: 15px;
}

.pack-slot-more {
  font-size: 11px;
  font-weight: 900;
  color: var(--pack-accent);
}

@keyframes pack-count-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.pack-count-pop {
  display: inline-block;
  animation: pack-count-pop 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.pack-toast {
  position: fixed;
  left: 50%;
  bottom: 108px;
  z-index: 120;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(12, 18, 32, 0.94);
  border: 1px solid var(--pack-accent-border);
  color: #fff;
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 18px hsl(var(--primary) / 0.2);
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.pack-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pack-bag-totals {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
}

.pack-totals-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 6px;
}

.pack-totals-off {
  color: var(--pack-save);
}

.pack-totals-total {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.pack-totals-save {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pack-save);
}

.pack-bag-progress {
  border-radius: 14px;
  border: 1px solid var(--pack-accent-border);
  background: var(--pack-promo-bg);
  padding: 14px;
}

.pack-prog-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pack-accent);
  margin-bottom: 4px;
}

.pack-prog-pct {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}

.pack-prog-muted,
.pack-prog-need,
.pack-next-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 4px;
}

.pack-prog-rewards {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--pack-accent);
}

.pack-prog-next {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pack-next-save {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--pack-save);
}

.pack-bag-continue {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: hsl(var(--primary));
  border: none;
  color: var(--pack-btn-text);
  box-shadow: 0 2px 12px hsl(var(--primary) / 0.2);
  cursor: pointer;
  transition: filter 0.2s;
}

.pack-bag-continue:hover {
  filter: brightness(1.04);
}

#pack-bag-backdrop.has-next #pack-bag-cart-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: none;
}

#pack-bag-backdrop.has-next #pack-bag-cart-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  filter: none;
}

@media (max-width: 900px) {
  .pack-levels {
    gap: 6px;
  }

  .pack-level {
    padding: 8px 4px;
  }

  .pack-level span {
    font-size: 14px;
  }

  .pack-level small {
    font-size: 9px;
  }
}

@media (max-width: 760px) {
  .pack-bottom-continue {
    display: none;
  }

  .pack-bottom-sub {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
  }

  .pack-bottom-off {
    font-size: 10px;
  }

  .pack-toast {
    bottom: 96px;
    font-size: 12px;
    white-space: normal;
    text-align: center;
    border-radius: 14px;
  }

  #pack-bag-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  #pack-bag-modal {
    max-width: none;
    border-radius: 20px 20px 0 0;
    transform: translateY(24px);
  }

  #pack-bag-backdrop.open #pack-bag-modal {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pack-count-pop,
  .burst-active,
  .pack-toast {
    animation: none;
    transition: none;
  }
}
