/* FadeMC Store. Palette from the wordmark: navy body, gold → amber → orange
   fill and a dark ember edge used as the 3D bottom on buttons and tags. */

:root {
  --navy-950: #040c1b;
  --navy-900: #071630;
  --navy-800: #0b2045;
  --navy-700: #12305f;
  --navy-600: #1b417a;
  --line: rgba(130, 170, 255, .12);
  --orange: #e8622a;
  --amber: #f7a823;
  --gold: #ffd23f;
  --ember: #7a1c18;
  --green: #2fd36b;
  --text: #f4f7ff;
  --muted: #9fb2d6;
  --grad: linear-gradient(180deg, var(--gold) 0%, var(--amber) 45%, var(--orange) 100%);
  --edge: inset 0 -4px 0 rgba(122, 28, 24, .5);
  --radius: 18px;
  --display: "Lilita One", "Arial Black", sans-serif;
  --body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--navy-950); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 700 15px/1.45 var(--body);
  background: var(--navy-950);
  overflow-x: hidden;
}

/* Glows sit on a fixed layer so they stay put while the page scrolls, like
   the grid and sparkles above them. */
.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -120px, rgba(247, 168, 35, .28), transparent 70%),
    radial-gradient(700px 600px at 0% 40%, rgba(27, 65, 122, .55), transparent 70%),
    radial-gradient(700px 600px at 100% 70%, rgba(122, 28, 24, .35), transparent 70%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
}

a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* Pixel sparkles + faint block grid behind everything. */
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 2px, transparent 2px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
body::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' shape-rendering='crispEdges'%3E%3Cg fill='%23f7a823'%3E%3Cpath opacity='.35' d='M60 40h6v6h-6zM54 46h6v6h-6zM66 46h6v6h-6zM60 52h6v6h-6zM60 46h6v6h-6z'/%3E%3Cpath opacity='.22' d='M300 120h4v4h-4zM296 124h4v4h-4zM304 124h4v4h-4zM300 128h4v4h-4zM300 124h4v4h-4z'/%3E%3Cpath opacity='.18' d='M180 300h8v8h-8zM172 308h8v8h-8zM188 308h8v8h-8zM180 316h8v8h-8zM180 308h8v8h-8z'/%3E%3C/g%3E%3Cg fill='%239fb2d6'%3E%3Crect opacity='.25' x='380' y='260' width='4' height='4'/%3E%3Crect opacity='.2' x='120' y='180' width='4' height='4'/%3E%3Crect opacity='.3' x='240' y='30' width='4' height='4'/%3E%3Crect opacity='.18' x='30' y='370' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 420px 420px;
  animation: drift 90s linear infinite;
}
@keyframes drift { to { background-position: 420px -420px; } }

.site { position: relative; z-index: 1; isolation: isolate; }
.wrap { position: relative; z-index: 1; width: min(1240px, calc(100vw - 40px)); margin: 0 auto; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  padding: 10px 14px; border-radius: 10px;
  background: var(--gold); color: var(--navy-950); font-weight: 900;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.muted { color: var(--muted); }
.small-print { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

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

.hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 34px 0 34px;
}
.hero-side {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0;
  border: 0;
  background: none;
  text-decoration: none;
  cursor: pointer;
}
.hero-side.left { justify-content: flex-end; text-align: right; }
.hero-side .big, .hero-side .small { display: block; }
.hero-side .big {
  font: 400 19px/1 var(--display);
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.hero-side .big.discord-text { color: #8c9eff; }
.hero-side .small { margin-top: 4px; font-weight: 900; font-size: 14px; text-transform: uppercase; letter-spacing: .6px; }
.orb {
  flex: none;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: inset 0 -6px 0 rgba(122, 28, 24, .55), 0 0 0 5px var(--navy-950), 0 0 34px rgba(247, 168, 35, .55);
  transition: transform .2s;
}
.orb svg { width: 32px; height: 32px; fill: var(--navy-900); }
.orb.discord {
  background: linear-gradient(180deg, #8c9eff, #5865f2);
  box-shadow: inset 0 -6px 0 rgba(20, 20, 90, .5), 0 0 0 5px var(--navy-950), 0 0 34px rgba(88, 101, 242, .5);
}
.orb.discord svg { fill: #fff; }
.hero-side:hover .orb { transform: scale(1.08) rotate(-4deg); }
.copied { color: #7dff9a !important; }

.logo-link { display: block; line-height: 0; }
.logo {
  width: clamp(240px, 30vw, 400px);
  height: auto;
  filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .25)) drop-shadow(0 0 40px rgba(247, 168, 35, .35));
  animation: bob 5s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-6px) rotate(-.6deg); } }

/* --------------------------------------------------------------- layout */

.shop {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding-bottom: 80px;
}

.panel {
  background: linear-gradient(180deg, rgba(18, 48, 95, .88), rgba(11, 32, 69, .88));
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

.side { display: grid; gap: 18px; position: sticky; top: 20px; min-width: 0; }
.side > * { min-width: 0; }

.cats { padding: 10px; display: grid; gap: 4px; }
.cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  transition: background .15s, transform .15s;
}
.cats a:hover { background: rgba(255, 255, 255, .06); }
.cats .cat-icon { flex: none; width: 34px; height: 34px; margin: -6px 0; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45)); }
.cats .cat-name { flex: 1; min-width: 0; }
.cats a .n {
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  font-size: 12px;
  text-align: center;
}
.cats a.on {
  background: var(--grad);
  color: var(--navy-950);
  box-shadow: inset 0 -4px 0 rgba(122, 28, 24, .45), 0 6px 22px rgba(247, 168, 35, .35);
}
.cats a.on .n { background: var(--navy-900); color: var(--gold); }

.note { padding: 16px 18px; color: var(--muted); font-size: 13px; }
.note b { color: var(--text); }

.who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; font-weight: 900; }
.who .avatar { width: 40px; height: 40px; border-radius: 6px; image-rendering: pixelated; background: rgba(0, 0, 0, .3); box-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.user-name .text { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--grad);
  color: var(--navy-950);
  font: 900 15px/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--edge);
  transition: transform .12s, filter .12s, box-shadow .12s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: var(--edge), 0 8px 22px rgba(247, 168, 35, .45); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 rgba(122, 28, 24, .5); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-lg { padding: 17px 26px; font-size: 17px; }

.basket-btn { position: relative; width: 100%; padding: 17px; font-size: 16px; }

/* -------------------------------------------------------------- content */

.head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.head h1 {
  margin: 0;
  font: 400 42px/1.05 var(--display);
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 var(--ember));
}
.desc { margin: 8px 0 0; color: var(--muted); max-width: 70ch; }
.desc p { margin: 0 0 6px; }
.desc a { color: var(--gold); }

.sale {
  margin: 0 0 22px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(232, 98, 42, .15);
  border: 2px dashed rgba(247, 168, 35, .5);
  color: var(--gold);
  font-weight: 900;
}
.sale p { margin: 0; }
.sale a { color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--muted); }

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800) 60%);
  border: 2px solid var(--line);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .2s cubic-bezier(.2, .8, .3, 1.3), border-color .2s, box-shadow .2s;
}
.animate .card { animation: rise .5s cubic-bezier(.2, .8, .3, 1) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.card:hover { transform: translateY(-6px); border-color: rgba(247, 168, 35, .6); box-shadow: 0 18px 44px rgba(0, 0, 0, .45), 0 0 0 4px rgba(247, 168, 35, .12); }

.art {
  position: relative;
  aspect-ratio: 1 / .9;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 55%, rgba(247, 168, 35, .32), transparent 58%),
    radial-gradient(circle at 50% 120%, rgba(232, 98, 42, .35), transparent 60%);
}
.tier-limited .art { background: radial-gradient(circle at 50% 55%, rgba(255, 80, 80, .35), transparent 58%), radial-gradient(circle at 50% 120%, rgba(122, 28, 24, .6), transparent 60%); }
.tier-exclusive .art { background: radial-gradient(circle at 50% 55%, rgba(190, 120, 255, .35), transparent 58%), radial-gradient(circle at 50% 120%, rgba(110, 50, 180, .5), transparent 60%); }
.tier-halloween .art { background: radial-gradient(circle at 50% 55%, rgba(255, 130, 40, .4), transparent 58%), radial-gradient(circle at 50% 120%, rgba(120, 40, 160, .45), transparent 60%); }
.art img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  filter: drop-shadow(0 14px 14px rgba(0, 0, 0, .5));
  transition: transform .35s cubic-bezier(.2, .8, .3, 1.4);
}
.card:hover .art img { transform: scale(1.1) rotate(-4deg); }
.art-fallback svg { width: 84px; height: 84px; fill: rgba(247, 168, 35, .7); filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .4)); }

.tag {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  padding: 5px 10px; border-radius: 8px;
  font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px;
  background: var(--grad); color: var(--navy-950);
  box-shadow: inset 0 -3px 0 rgba(122, 28, 24, .45);
}
.tag.save { left: auto; right: 12px; background: var(--green); color: #04220f; box-shadow: inset 0 -3px 0 rgba(0, 70, 30, .5); }
.tag.hot { background: linear-gradient(180deg, #ff7a6b, #d6312a); color: #fff; box-shadow: inset 0 -3px 0 rgba(80, 0, 0, .45); }

.card .body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 14px 16px 16px;
  background: rgba(4, 12, 27, .45);
  border-top: 2px solid var(--line);
}
.card h3 { margin: 0; font: 400 19px/1.15 var(--display); color: var(--amber); letter-spacing: .2px; }
.card h3 a { text-decoration: none; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }

.price { margin: 0; font-size: 21px; font-weight: 900; }
.price strong { font-weight: 900; }
.price s { display: block; font-size: 12px; color: var(--muted); font-weight: 800; }

/* Subscriber preview added by theme.js */
.fademc-price { display: block; font-size: 12px; color: #7dff9a; font-weight: 900; }

/* ------------------------------------------------------- package detail */

.shop-single .detail {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 30px;
  padding: 26px;
}
.site-popup .shop-single { display: block; padding: 0; }
.detail-art { border-radius: 14px; background-color: rgba(4, 12, 27, .4); }
.detail-body { display: flex; flex-direction: column; gap: 16px; }
.detail-body .head { margin: 0; }
.detail-price { font-size: 30px; }
.detail .actions .btn { width: 100%; }

.prose { color: #d7e1f5; font-weight: 600; line-height: 1.6; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { font: 400 22px/1.2 var(--display); color: var(--amber); margin: 1.4em 0 .5em; }
.prose a { color: var(--gold); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--amber); }
.prose img { border-radius: 12px; }
.prose code { padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .35); }
.prose blockquote { margin: 1em 0; padding: 10px 16px; border-left: 4px solid var(--amber); background: rgba(0, 0, 0, .2); border-radius: 0 10px 10px 0; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 2px solid var(--line); text-align: left; }

/* ------------------------------------------------------------- checkout */

.checkout-page { max-width: 860px; margin: 0 auto; padding-bottom: 80px; }
.basket { padding: 26px; }
.basket-header .back { color: var(--muted); font-weight: 900; text-decoration: none; white-space: nowrap; }
.basket-header .back:hover { color: var(--gold); }

.basket-items { display: grid; gap: 12px; }
.basket-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(4, 12, 27, .45);
  border: 2px solid var(--line);
}
.basket-item .title { margin: 0; font: 400 19px/1.15 var(--display); color: var(--amber); }
.basket-item .title a { text-decoration: none; }
.basket-item .options { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.basket-item .options li { padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .35); color: var(--muted); font-size: 12px; }
.basket-item .price { font-size: 18px; min-width: 70px; text-align: right; }

.quantity-field { display: inline-flex; align-items: center; border-radius: 12px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.quantity-field .adjust { width: 36px; height: 38px; border: 0; background: none; color: var(--amber); font-size: 20px; font-weight: 900; cursor: pointer; }
.quantity-field .adjust:hover:not(:disabled) { background: rgba(255, 255, 255, .06); }
.quantity-field .adjust:disabled { color: var(--muted); opacity: .5; cursor: default; }
.quantity-field .quantity {
  width: 40px; height: 38px; border: 0; background: none; color: var(--text);
  font: 900 15px var(--body); text-align: center; -moz-appearance: textfield;
}
.quantity-field .quantity::-webkit-inner-spin-button, .quantity-field .quantity::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.remove { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--muted); }
.remove svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; fill: none; }
.remove:hover { background: rgba(214, 49, 42, .2); color: #ff7a6b; }

.basket .empty { display: grid; justify-items: center; gap: 14px; }
.basket .empty p { margin: 0; font-size: 17px; }

.basket-checkout { display: grid; gap: 14px; margin-top: 22px; padding-top: 22px; border-top: 2px solid var(--line); }
.basket-checkout h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font: 400 22px/1 var(--display); }
.basket-checkout .total { font: 900 28px/1 var(--body); color: var(--gold); }
.basket-checkout .checkout { width: 100%; }
.fademc-discount-note { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(47, 211, 107, .14); color: #7dff9a; font-weight: 900; }

.fademc-tier-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--grad);
  color: var(--navy-950);
  font: 900 11px/1.3 var(--body);
  text-transform: uppercase;
  letter-spacing: .4px;
  -webkit-text-fill-color: var(--navy-950);
  vertical-align: middle;
}
.fademc-tier-3 {
  background: linear-gradient(110deg, var(--gold) 0%, #fff6c8 25%, var(--amber) 50%, var(--gold) 100%);
  background-size: 200% 100%;
  animation: shine 2.4s linear infinite;
}
@keyframes shine { to { background-position: -200% 0; } }
.basket-title .fademc-tier-badge { margin-left: 10px; filter: none; }

.fademc-owned-all { grid-column: 1 / -1; padding: 40px; text-align: center; font: 400 22px/1.3 var(--display); color: var(--amber); }

/* ---------------------------------------------------------- forms, CMS */

.form-page { max-width: 560px; margin: 0 auto; padding-bottom: 80px; }
.form-page.page { max-width: 860px; }
.form-card, .page-card { padding: 28px; }
.form-card .desc { margin: -8px 0 20px; }
.form-card form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field-label { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 900; }
.field input, .field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: rgba(4, 12, 27, .6);
  color: var(--text);
  font: 800 16px var(--body);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 4px rgba(247, 168, 35, .18); }

/* --------------------------------------------------------- footer, toast */

.foot { position: relative; z-index: 1; padding: 30px 0 40px; border-top: 2px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.foot-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 10px; }
.foot-links a { color: var(--text); font-weight: 900; text-decoration: none; }
.foot-links a:hover { color: var(--amber); }
.foot p { margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 30;
  max-width: calc(100vw - 40px);
  transform: translate(-50%, 160%);
  padding: 13px 20px; border-radius: 12px;
  background: var(--navy-800); border: 2px solid rgba(247, 168, 35, .6);
  font-weight: 900; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  transition: transform .3s cubic-bezier(.2, .8, .3, 1.3);
}
.toast:empty { visibility: hidden; }
.toast.show { transform: translate(-50%, 0); }

.busy { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(4, 12, 27, .8); }
.busy-box { display: grid; justify-items: center; gap: 14px; padding: 26px 30px; border-radius: var(--radius); background: var(--navy-800); border: 2px solid var(--line); }
.busy-box p { margin: 0; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid rgba(247, 168, 35, .25); border-top-color: var(--amber); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------- mobile */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; justify-items: center; gap: 14px; padding: 24px 0 20px; }
  .hero .logo-link { order: -1; }
  .hero-side.left { flex-direction: row-reverse; text-align: left; justify-content: flex-start; }
  .orb { width: 54px; height: 54px; }
  .orb svg { width: 24px; height: 24px; }

  .shop { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .side { position: static; gap: 12px; }
  .cats { display: flex; overflow-x: auto; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cats a { flex: none; padding: 11px 14px; }
  .cats .cat-icon { width: 26px; height: 26px; }
  .note { display: none; }

  .head { flex-direction: column; align-items: start; }
  .head h1 { font-size: 34px; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card .body { padding: 10px 12px 12px; }
  .card h3 { font-size: 16px; }
  .card .row { flex-direction: column; align-items: stretch; gap: 8px; }
  .price { font-size: 18px; }
  .tag { font-size: 10px; padding: 4px 7px; top: 8px; left: 8px; }
  .tag.save { right: 8px; }

  .shop-single .detail { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .basket, .form-card, .page-card { padding: 18px; }
  .basket-item { grid-template-columns: minmax(0, 1fr) auto; }
  .basket-item .info { grid-column: 1; grid-row: 1; }
  .basket-item .remove { grid-column: 2; grid-row: 1; justify-self: end; }
  .basket-item .quantity-field { grid-column: 1; grid-row: 2; justify-self: start; }
  .basket-item .price { grid-column: 2; grid-row: 2; }
}

/* ------------------------------------------------------- store additions */

/* Red item count on the sidebar basket button. */
.cart-count {
  position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 999px;
  background: #e5322b; color: #fff; font: 900 12px/1 var(--body);
  box-shadow: 0 0 0 3px var(--navy-950);
}
.cart-count.bump { animation: bump .35s cubic-bezier(.2, .8, .3, 1.6); }
@keyframes bump { 40% { transform: scale(1.35); } }

.loading { display: grid; place-items: center; min-height: 320px; }
.error-box { padding: 30px; text-align: center; }
.error-box p { margin: 0 0 14px; color: var(--muted); }

.btn.ghost { background: rgba(255, 255, 255, .06); color: var(--text); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35); }
.btn.ghost:hover { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35); background: rgba(255, 255, 255, .1); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; filter: grayscale(.4); }
.btn.add.done { background: linear-gradient(180deg, #7dff9a, var(--green)); box-shadow: inset 0 -4px 0 rgba(0, 70, 30, .5); }
.card .btn.add { white-space: nowrap; }

.cats button { all: unset; box-sizing: border-box; }
.cats a, .cats button { cursor: pointer; }

.who { justify-content: space-between; }
.who .me { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; }
.who .avatar { flex: none; }
.me-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; line-height: 1.2; }
/* Platform under the name, and long names wrap, so they fit the 260px sidebar. */
.me-name { display: flex; flex-direction: column; gap: 1px; max-width: 100%; min-width: 0; }
.me-name b { overflow-wrap: anywhere; font-size: 15px; font-weight: 900; }
.me-name .platform { font-size: 11px; }
.me-text .tier-badge { margin-top: 0; }
.platform { flex: none; color: var(--muted); font-size: 12px; font-weight: 800; }
.who .switch { flex: none; background: none; border: 0; color: var(--muted); font: 800 12px var(--body); cursor: pointer; text-decoration: underline; }
.tier-badge {
  display: inline-block; margin-top: 3px; padding: 2px 8px; border-radius: 999px;
  background: var(--grad); color: var(--navy-950); font: 900 10px/1.4 var(--body);
  text-transform: uppercase; letter-spacing: .4px;
}
.tier-badge.t3 { background: linear-gradient(110deg, var(--gold), #fff6c8 25%, var(--amber) 50%, var(--gold)); background-size: 200% 100%; animation: shine 2.4s linear infinite; }

.sub-price { display: block; font-size: 12px; color: #7dff9a; font-weight: 900; }
.price .sub-price { display: inline; margin-left: 6px; }
.owned-note { grid-column: 1 / -1; padding: 40px; text-align: center; font: 400 22px/1.3 var(--display); color: var(--amber); }
.perk { color: var(--muted); font-size: 12px; font-weight: 800; }

/* Package detail */
.detail { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 30px; padding: 26px; }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--muted); font-weight: 900; text-decoration: none; }
.back-link:hover { color: var(--gold); }

/* Drawer */
.scrim {
  position: fixed; inset: 0; z-index: 40; background: rgba(2, 6, 14, .6);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.scrim.show { opacity: 1; visibility: visible; }
.drawer-lines.working { opacity: .6; pointer-events: none; transition: opacity .15s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(440px, 100vw); display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border-left: 2px solid var(--line); box-shadow: -20px 0 60px rgba(0, 0, 0, .5);
  transform: translateX(105%); transition: transform .3s cubic-bezier(.2, .8, .3, 1);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 22px 8px; }
.drawer-head h2 { margin: 0; font: 400 30px/1 var(--display); text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 var(--ember)); }
.drawer-who { padding: 0 22px 12px; color: var(--muted); font-weight: 800; }
.drawer-who b { color: var(--text); }
.drawer-lines { flex: 1; overflow: auto; padding: 4px 22px; display: grid; gap: 10px; align-content: start; }
.drawer-foot { padding: 18px 22px 24px; border-top: 2px solid var(--line); display: grid; gap: 12px; }
.drawer-foot .total-row { display: flex; justify-content: space-between; align-items: baseline; font: 400 22px/1 var(--display); }
.drawer-foot .total-row b { font: 900 28px/1 var(--body); color: var(--gold); }
.drawer-foot .btn { width: 100%; }
.drawer .empty { padding: 30px 0; text-align: center; color: var(--muted); }

.line {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 14px; background: rgba(4, 12, 27, .45); border: 2px solid var(--line);
}
.line img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .4)); }
.line .name { margin: 0 0 6px; font: 400 16px/1.15 var(--display); color: var(--amber); }
.line .meta { display: flex; align-items: center; gap: 10px; }
.line .lp { font-weight: 900; }
.line .quantity-field .adjust { width: 30px; height: 30px; font-size: 17px; }
.line .quantity-field span { min-width: 22px; text-align: center; font-weight: 900; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; fill: none; }
.icon-btn:hover { background: rgba(214, 49, 42, .2); color: #ff7a6b; }

/* Username dialog */
.modal {
  width: min(460px, calc(100vw - 32px)); padding: 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800)); color: var(--text);
  border: 2px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.modal::backdrop { background: rgba(2, 6, 14, .7); backdrop-filter: blur(3px); }
.modal h2 { margin: 0 0 6px; font: 400 32px/1 var(--display); text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 var(--ember)); }
.modal p { margin: 0 0 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.form-error { margin: 12px 0 0 !important; padding: 10px 12px; border-radius: 10px; background: rgba(214, 49, 42, .18); color: #ffb3aa; font-weight: 800; }
.field input { box-sizing: border-box; }

.toast.err { border-color: rgba(255, 122, 107, .7); }

@media (max-width: 900px) {
  .who { display: flex; }
  .detail { grid-template-columns: minmax(0, 1fr); padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
