/* ==========================================================================
   ChargedSMP - store page
   ========================================================================== */

/* ---------- hero ---------- */

.store-hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(56px, 9vw, 110px)) 0 clamp(36px, 5vw, 60px);
  overflow: hidden;
  isolation: isolate;
}
.store-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.store-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  opacity: 0.85;
}
.store-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 9, 18, 0.9) 0%, rgba(5, 9, 18, 0.55) 50%, rgba(5, 9, 18, 0.15) 100%),
    linear-gradient(180deg, rgba(5, 9, 18, 0.35), rgba(5, 9, 18, 0) 40%, var(--bg) 98%);
}
.store-hero-inner {
  display: grid;
  gap: 16px;
  justify-items: start;
}
.store-hero h1 {
  font-size: clamp(52px, 9vw, 104px);
  text-shadow:
    0 0.04em 0 #3d6890,
    0 0.08em 0 #24496b,
    0 0.16em 0.2em rgba(0, 0, 0, 0.5);
}
.store-hero p {
  max-width: 520px;
  color: #d0dcee;
  font-size: clamp(16px, 1.8vw, 19px);
}
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.jump a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px 0 10px;
  margin-bottom: 4px;
  border-radius: var(--radius);
  background: rgba(10, 16, 30, 0.9);
  border: 2px solid var(--line-2);
  box-shadow: 0 4px 0 #060a14;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  transition: transform 0.08s, box-shadow 0.08s, border-color 0.15s;
}
.jump a:hover {
  border-color: var(--ice-2);
}
.jump a:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #060a14;
}
.jump i {
  width: 28px;
  height: 28px;
}

/* ---------- rank card ---------- */

.rank-section {
  padding-top: clamp(36px, 5vw, 60px);
}
.rank-card {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  overflow: hidden;
}
.rank-visual {
  padding: clamp(26px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 2px solid var(--line);
  background: linear-gradient(180deg, rgba(246, 189, 42, 0.07), transparent 55%);
}
.rank-stage {
  display: grid;
  place-items: center;
  padding-top: 6px;
}
.rank-slot {
  width: 128px;
  height: 128px;
}
.rank-slot i {
  width: 88px;
  height: 88px;
  animation: float 4.5s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-6px) rotate(3deg);
  }
}
.rank-title {
  text-align: center;
  display: grid;
  gap: 4px;
}
.rank-title .kicker {
  color: var(--gold);
}
.rank-title h2 {
  font-size: clamp(52px, 6.5vw, 72px);
  text-transform: uppercase;
  color: #ffe58a;
  text-shadow:
    0 0.04em 0 #d99a14,
    0 0.08em 0 #9a6609,
    0 0.16em 0.2em rgba(0, 0, 0, 0.5);
}
.rank-title p {
  color: var(--muted);
}
.rank-buy {
  margin-top: auto;
  display: grid;
  gap: 12px;
}
.price-big {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}
.price-big span {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 42px;
  line-height: 1;
}
.price-big small {
  color: var(--muted);
  font-size: 15px;
}

.rank-perks {
  padding: clamp(22px, 3.5vw, 36px);
  display: grid;
  align-content: center;
}
.rank-perks .mc-tip {
  font-size: 17px;
}
.lore-head {
  margin-bottom: 12px;
}
.lore-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
}
.lore-group {
  opacity: 0;
  transform: translateY(6px);
}
.rank-card.is-in .lore-group {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.5s var(--ease-out) calc(var(--i) * 90ms + 0.2s),
    transform 0.5s var(--ease-out) calc(var(--i) * 90ms + 0.2s);
}
.lore-group ul {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
}
.lore-group li {
  padding: 1px 0;
}
@media (max-width: 980px) {
  .rank-card {
    grid-template-columns: 1fr;
  }
  .rank-visual {
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }
}
@media (max-width: 640px) {
  .lore-cols {
    grid-template-columns: 1fr;
  }
  .rank-perks {
    padding: 14px;
  }
  .rank-perks .mc-tip {
    font-size: 16px;
  }
}

/* ---------- crate cards ---------- */

.crates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 1040px) {
  .crates-grid {
    grid-template-columns: 1fr 1fr;
  }
  .crates-grid > :first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 700px) {
  .crates-grid {
    grid-template-columns: 1fr;
  }
}

.crate-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--c1) 35%, var(--line));
  transition:
    transform 0.25s var(--ease-out),
    border-color 0.2s;
}
.crate-card:hover {
  transform: translateY(-4px);
  border-color: var(--c1);
}

.crate-stage {
  position: relative;
  height: 240px;
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 900px;
  border-bottom: 2px solid color-mix(in srgb, var(--c1) 25%, var(--line));
  background:
    radial-gradient(55% 50% at 50% 60%, color-mix(in srgb, var(--c1) 22%, transparent), transparent 70%),
    #080d19;
}
.crate-tier {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  color: #1a0f00;
  background: var(--gold);
  border: 2px solid #a8690a;
}

.crate-shadow {
  position: absolute;
  bottom: 36px;
  width: 140px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.6), transparent);
  animation: shadow-pulse 4s ease-in-out infinite;
}
@keyframes shadow-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.85);
    opacity: 0.7;
  }
}

.cube-wrap {
  --s: 104px;
  position: relative;
  width: var(--s);
  height: var(--s);
  transform-style: preserve-3d;
  margin-top: 28px;
  animation: crate-float 4s ease-in-out infinite;
  transition: transform 0.5s var(--ease-out);
}
.crate-card:hover .cube-wrap {
  transform: scale(1.06);
}
@keyframes crate-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}
.cube {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: cube-spin 18s linear infinite;
}
@keyframes cube-spin {
  from {
    transform: rotateX(-22deg) rotateY(0deg);
  }
  to {
    transform: rotateX(-22deg) rotateY(360deg);
  }
}
.face {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--c3) 0 11%, transparent 11% 89%, var(--c3) 89%),
    linear-gradient(180deg, var(--c3) 0 11%, transparent 11% 40%, var(--c3) 40% 48%, transparent 48% 89%, var(--c3) 89%),
    repeating-linear-gradient(180deg, transparent 0 13px, rgba(0, 0, 0, 0.18) 13px 15px),
    linear-gradient(135deg, var(--c2), var(--c1) 50%, color-mix(in srgb, var(--c1) 60%, var(--c3)));
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.4),
    inset 0 0 20px rgba(0, 0, 0, 0.25);
  backface-visibility: hidden;
}
.face::after {
  /* latch */
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 18%;
  height: 22%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffffff, var(--c2));
  box-shadow: 0 0 0 3px var(--c3);
}
.face.front {
  transform: translateZ(calc(var(--s) / 2));
}
.face.back {
  transform: rotateY(180deg) translateZ(calc(var(--s) / 2));
}
.face.right {
  transform: rotateY(90deg) translateZ(calc(var(--s) / 2));
  filter: brightness(0.8);
}
.face.left {
  transform: rotateY(-90deg) translateZ(calc(var(--s) / 2));
  filter: brightness(0.8);
}
.face.top {
  transform: rotateX(90deg) translateZ(calc(var(--s) / 2));
  background:
    linear-gradient(90deg, var(--c3) 0 11%, transparent 11% 89%, var(--c3) 89%),
    linear-gradient(180deg, var(--c3) 0 11%, transparent 11% 89%, var(--c3) 89%),
    linear-gradient(45deg, transparent 46%, var(--c3) 46% 54%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, var(--c3) 46% 54%, transparent 54%),
    linear-gradient(135deg, var(--c2), var(--c1));
  filter: brightness(1.12);
}
.face.top::after,
.face.bottom::after {
  display: none;
}
.face.bottom {
  transform: rotateX(-90deg) translateZ(calc(var(--s) / 2));
  filter: brightness(0.5);
}

.float-key {
  position: absolute;
  top: 22px;
  left: 50%;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  z-index: 2;
  animation: key-float 3.2s ease-in-out infinite;
  transition: top 0.4s var(--ease-out);
}
.crate-card:hover .float-key {
  top: 12px;
}
@keyframes key-float {
  0%,
  100% {
    transform: translateY(0) rotate(-12deg);
  }
  50% {
    transform: translateY(-6px) rotate(-4deg);
  }
}

.motes span {
  position: absolute;
  bottom: 30px;
  left: var(--x);
  width: var(--sz, 4px);
  height: var(--sz, 4px);
  background: var(--c2);
  opacity: 0;
  animation: mote 4s linear infinite;
  animation-delay: var(--d);
}
@keyframes mote {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  15% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateY(-180px);
  }
}

.crate-info {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.crate-info h3 {
  font-size: 28px;
}
.crate-info .crate-sub {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 2px;
}
.crate-info .blurb {
  color: var(--muted);
  font-size: 15px;
  margin-top: -4px;
}

.loot.mc-tip {
  padding: 12px 14px;
  font-size: 16px;
}
.loot ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.loot li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--lore);
}
.loot li i {
  width: 28px;
  height: 28px;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.45));
}

.bundles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: auto;
}
.bundles button {
  height: 50px;
  margin-bottom: 3px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  display: grid;
  place-content: center;
  gap: 3px;
  background: #0a1020;
  border: 2px solid var(--line);
  box-shadow: 0 3px 0 #050812;
  transition: transform 0.08s, box-shadow 0.08s, color 0.15s;
}
.bundles button small {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--online);
}
.bundles button:hover {
  color: var(--text);
}
.bundles button[aria-checked="true"] {
  color: #050b16;
  background: var(--c1);
  border-color: var(--c3);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 3px 0 var(--c3);
}
.bundles button[aria-checked="true"] small {
  color: #062b14;
}

.buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.price {
  display: grid;
  line-height: 1.15;
}
.price strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
}
.price small {
  font-size: 13px;
  color: var(--muted);
}
.crate-card .btn-primary {
  --btn-bg: var(--c1);
  --btn-edge: color-mix(in srgb, var(--c1) 60%, var(--c3));
  --btn-shadow: var(--c3);
  --btn-fg: #050b16;
}

/* ---------- daily keys ---------- */

.daily-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: clamp(26px, 5vw, 56px);
  overflow: hidden;
}
.daily-copy {
  display: grid;
  gap: 16px;
  justify-items: start;
}
.daily-copy h2 {
  font-size: clamp(32px, 4.6vw, 52px);
}
.daily-copy > p {
  color: var(--muted);
  font-size: 17px;
  max-width: 470px;
}
.daily-action {
  display: grid;
  gap: 10px;
  justify-items: start;
  min-height: 90px;
  margin-top: 6px;
}
.daily-action > .spinner {
  width: 26px;
  height: 26px;
  color: var(--ice);
}
.daily-hint {
  font-size: 14px;
  color: var(--muted);
}
.countdown {
  display: flex;
  gap: 8px;
}
.countdown div {
  display: grid;
  justify-items: center;
  min-width: 76px;
  padding: 10px 8px 8px;
}
.countdown b {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown small {
  font-size: 12px;
  color: var(--dim);
  margin-top: 4px;
}

.daily-visual {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  display: grid;
  place-items: center;
}
.key-wheel {
  position: absolute;
  inset: 0;
  animation: spin 40s linear infinite;
}
.key-wheel i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1));
}
.key-wheel i svg {
  animation: spin 40s linear infinite reverse;
}
.wheel-core {
  position: relative;
  width: 40%;
  aspect-ratio: 1;
}
.wheel-core i {
  width: 70%;
  height: 70%;
}
.stack {
  position: absolute;
  right: 8%;
  bottom: 4%;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  color: #fff;
  text-shadow: 3px 3px 0 #3f3f3f;
}

@media (max-width: 900px) {
  .daily-card {
    grid-template-columns: 1fr;
  }
  .daily-visual {
    order: -1;
    width: min(290px, 100%);
  }
}
@media (max-width: 420px) {
  .countdown div {
    min-width: 0;
    flex: 1;
  }
  .countdown b {
    font-size: 28px;
  }
}

/* ---------- FAQ ---------- */

.faq-wrap {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: start;
}
.faq {
  display: grid;
  gap: 10px;
}
.faq details {
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 2px solid var(--line);
}
.faq details[open] {
  border-color: var(--line-2);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  color: var(--ice);
  flex: none;
}
.faq details[open] summary::after {
  content: "-";
}
.faq details p {
  padding: 0 20px 18px;
  color: var(--muted);
}
.faq details p b {
  color: var(--text);
  font-weight: 500;
}
.link {
  color: var(--ice);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 860px) {
  .faq-wrap {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ---------- cart ---------- */

.cart-fab {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 60;
  width: 62px;
  height: 62px;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  color: #04131f;
  background: var(--ice-2);
  border: 2px solid #1c86c8;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 4px 0 #0f5b91,
    0 12px 30px rgba(0, 0, 0, 0.5);
  animation: fab-in 0.35s var(--ease-out);
}
.cart-fab[hidden] {
  display: none;
}
.cart-fab:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 0 0 #0f5b91;
}
.cart-fab svg {
  width: 26px;
  height: 26px;
}
.cart-fab.is-bump {
  animation: bump 0.4s var(--ease-out);
}
@keyframes fab-in {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
}
@keyframes bump {
  40% {
    transform: scale(1.15) rotate(-6deg);
  }
}
.cart-count {
  position: absolute;
  top: -9px;
  right: -9px;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: var(--radius-sm);
  background: var(--danger);
  border: 2px solid #9c1c32;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  display: grid;
  place-items: center;
}

.cart-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 4, 10, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.cart-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}
.cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 2px solid var(--line-2);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
  transform: translateX(105%);
  transition: transform 0.35s var(--ease-out);
}
.cart.is-open {
  transform: none;
}
.cart-head {
  position: relative;
  padding: 22px;
  border-bottom: 2px solid var(--line);
}
.cart-head h3 {
  font-size: 26px;
}
.cart-head .modal-close {
  top: 16px;
  right: 16px;
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.cart-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
  display: grid;
  gap: 14px;
  justify-items: center;
}
.cart-empty .slot {
  width: 72px;
  height: 72px;
}
.cart-empty i {
  width: 48px;
  height: 48px;
}
.cart-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: #0a1020;
  border: 2px solid var(--line);
  animation: item-in 0.3s var(--ease-out);
}
@keyframes item-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
}
.cart-item .ci-ico {
  width: 52px;
  height: 52px;
}
.cart-item .ci-ico i {
  width: 36px;
  height: 36px;
}
.cart-item .ci-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.2;
}
.cart-item .ci-sub {
  font-size: 13px;
  color: var(--muted);
}
.ci-right {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.ci-price {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--line-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty button {
  width: 28px;
  height: 26px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  color: var(--muted);
}
.qty button:hover {
  background: var(--panel-2);
  color: var(--text);
}
.qty button[disabled] {
  opacity: 0.3;
  pointer-events: none;
}
.qty span {
  min-width: 24px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.cart-foot {
  padding: 18px 22px 22px;
  border-top: 2px solid var(--line);
  display: grid;
  gap: 12px;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 15px;
  color: var(--muted);
}
.cart-total strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  color: var(--text);
}
.cart-note {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.cart-note:empty {
  display: none;
}

/* ---------- daily reveal modal ---------- */

.reveal-box {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  padding: clamp(22px, 4vw, 36px);
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
  transform: translateY(16px);
  transition: transform 0.35s var(--ease-out);
}
.modal.is-open .reveal-box {
  transform: none;
}
.reveal-box h3 {
  font-size: clamp(28px, 4vw, 38px);
}
.reveal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
}
@media (max-width: 520px) {
  .reveal-grid {
    gap: 6px;
  }
}
:where(.rcard) {
  /* fallback colours for crate ids the site doesn't know about */
  --c1: #38bdf3;
  --c2: #a6ecff;
  --c3: #0e4f8e;
  --accent: #6fd8ff;
}
.rcard {
  position: relative;
  aspect-ratio: 3 / 4;
  perspective: 600px;
}
.rcard-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.55s var(--ease-out);
}
.rcard.is-flipped .rcard-inner {
  transform: rotateY(180deg);
}
.rcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 6px;
}
.rcard-front .q {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 5vw, 44px);
  color: var(--dim);
}
.rcard-back {
  transform: rotateY(180deg);
  background: color-mix(in srgb, var(--c1) 22%, #080d19);
  border-color: var(--c2) var(--c3) var(--c3) var(--c2);
}
.rcard-back i {
  width: 72%;
  height: auto;
  aspect-ratio: 1;
}
.rcard-back span {
  font-family: var(--font-display);
  font-size: clamp(11px, 1.7vw, 14px);
  line-height: 1.15;
  color: var(--accent);
}
.rcard.is-flipped .rcard-inner {
  animation: pop 0.55s var(--ease-out);
}
@keyframes pop {
  60% {
    scale: 1.08;
  }
}

.reveal-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
}
.reveal-summary .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--c1) 14%, #0a1020);
  border: 2px solid color-mix(in srgb, var(--c1) 45%, transparent);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  animation: item-in 0.3s var(--ease-out) both;
}
.reveal-summary .chip i {
  width: 26px;
  height: 26px;
}
.reveal-summary p {
  width: 100%;
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

/* Backend-connected Charged Rank bonus picker */
.charged-bonus-label{display:block;margin:1rem 0 .4rem;font-size:.82rem;color:#b7cfe1;font-weight:600}
.charged-bonus-select{display:block;max-width:100%;width:100%;background:#0b1829;color:#f0fbff;border:1px solid #32648b;border-radius:.5rem;padding:.7rem .9rem;margin-bottom:.85rem;font:inherit}
.charged-bonus-select:focus-visible{outline:2px solid #67d6ff;outline-offset:2px}


/* Season 3 premium crate reward preview */
.crate-card.theme-overcharged .crate-stage {
  background: radial-gradient(60% 62% at 50% 60%, rgba(56,189,243,.27),transparent 78%), #080d19;
}
.crate-card.theme-overcharged .crate-tier { background:#f6bd2a; color:#191204; border-color:#8e620b; }
.crate-card .crate-featured {
  background:#0a0d1c; padding:14px; border-radius:8px;
  border:1px solid color-mix(in srgb,var(--c1) 38%,#293754);
}
.crate-featured-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.crate-featured-head strong {font-family:var(--font-display); font-size:21px; font-weight:500; color:var(--text);}
.crate-featured-head span {font-size:11px; color:var(--muted);}
.crate-featured ul {list-style:none; padding:0; margin:12px 0 0; display:grid; gap:9px;}
.crate-featured li {display:flex; align-items:center; gap:10px; min-width:0;}
.crate-featured-icon {width:39px; height:39px; flex:none;}
.crate-featured-icon i {width:29px; height:29px;}
.crate-featured-copy {display:grid; gap:2px; min-width:0; line-height:1.25;}
.crate-featured-copy b {color:var(--text); font-size:14px; font-weight:600;}
.crate-featured-copy small {color:var(--muted); font-size:12px; line-height:1.35;}
.crate-details-btn {
  margin-top:12px; width:100%; padding:12px 2px 1px;
  display:flex; align-items:center; justify-content:space-between; gap:6px;
  border-top:1px solid var(--line); text-align:left; color:var(--accent,var(--ice));
  font-family:var(--font-display); font-size:19px;
}
.crate-details-btn:hover {color:#fff;}
.crate-details-btn span {font-family:var(--font-body); font-size:18px;}
.crate-card .bundles {padding-top:8px;}
.crate-card .buy-row {flex-wrap:wrap;}
.crate-details-dialog {
  width:min(780px,calc(100% - 24px)); max-height:min(90vh,900px); overflow:auto;
  padding:0; background:#080e1f; border:2px solid #34476a;
  border-radius:14px; color:var(--text); box-shadow:0 24px 100px #000c;
}
.crate-details-dialog::backdrop {background:rgba(2,5,13,.83); backdrop-filter:blur(6px);}
.crate-details-dialog-inner {padding:clamp(18px,3vw,30px);}
.crate-details-header {display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:20px;}
.crate-details-kicker {font-size:11px; color:var(--ice); text-transform:uppercase; letter-spacing:.12em; font-weight:700;}
.crate-details-header h2 {font-size:clamp(32px,5vw,50px); margin-top:4px;}
.crate-details-header p {margin-top:8px; font-size:14px; color:var(--muted); max-width:570px;}
.crate-details-close {width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--line-2); background:#101b30; border-radius:6px; font-size:29px; color:var(--text);}
.crate-details-close:hover {border-color:var(--ice);}
.crate-details-items {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;}
.crate-reward-item {padding:15px; border:1px solid #263759; border-radius:9px; background:#0d1729; min-width:0;}
.crate-reward-item-head {display:flex; align-items:center; gap:12px;}
.crate-reward-icon {width:50px; height:50px; flex:none;}
.crate-reward-icon i {width:35px; height:35px;}
.crate-reward-item h3 {font-size:23px; line-height:1.1; overflow-wrap:anywhere;}
.crate-reward-item-head small {font-size:12px; color:var(--muted);}
.crate-reward-enchants {display:flex; flex-wrap:wrap; gap:6px; margin-top:14px;}
.crate-reward-enchants span {padding:5px 8px; font-size:12px; border-radius:4px; background:#111c39; border:1px solid #31416c; color:#a8d6ff;}
.crate-reward-description {margin-top:12px; color:var(--muted); font-size:14px;}
.crate-details-footer {display:flex; align-items:center; justify-content:space-between; gap:14px; border-top:1px solid var(--line); margin-top:20px; padding-top:16px;}
.crate-details-footer p {color:var(--muted); font-size:12px; max-width:450px;}
.crate-details-footer form {flex:none;}
@media(max-width:640px){
  .crate-details-items{grid-template-columns:1fr;}
  .crate-details-footer{flex-direction:column;align-items:stretch;}
  .crate-details-footer .btn{width:100%;}
  .crate-card .buy-row .btn{flex:1;}
}

/* Make reward previews explain gameplay, not internal plugin terminology. */
.crate-reward-benefit {
  border-top: 1px solid #263759;
  padding-top: 10px;
  margin-top: 12px;
}
.crate-reward-benefit strong {
  color: #72d9ff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
}
.crate-reward-benefit p {
  color: #c8d5e9;
  font-size: 13px;
  line-height: 1.55;
  margin-top: 4px;
}
.crate-reward-duration {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 6px 9px;
  border: 1px solid rgba(246,189,42,.25);
  border-radius: 5px;
  background: rgba(246,189,42,.07);
  color: #ffd78a;
  font-size: 12px;
  line-height: 1.4;
}
