/* =====================================================================
   CITY OF LOVE ROLEPLAY — storefront
   Single committed dark neon theme. Tokens live in :root — change
   --neon and the whole site re-skins.
   ===================================================================== */

:root {
  --ink:        #05030a;
  --ink-2:      #0b0612;
  --panel:      rgba(255, 255, 255, .045);
  --panel-hi:   rgba(255, 255, 255, .075);
  --line:       rgba(255, 61, 138, .18);
  --line-hi:    rgba(255, 61, 138, .55);

  --neon:       #ff1e6f;
  --neon-2:     #ff5fa2;
  --neon-3:     #ff9ecb;
  --magenta:    #e5007a;
  --violet:     #7b2ff7;

  --text:       #f7eef5;
  --text-dim:   #b9a7b6;
  --text-mute:  #7d6f7d;

  --glow-sm: 0 0 12px rgba(255, 30, 111, .45);
  --glow-md: 0 0 26px rgba(255, 30, 111, .40), 0 0 70px rgba(229, 0, 122, .22);

  --grad-neon:  linear-gradient(135deg, #ff1e6f 0%, #ff5fa2 45%, #ff9ecb 100%);
  --grad-deep:  linear-gradient(135deg, #e5007a 0%, #ff1e6f 55%, #7b2ff7 130%);
  --grad-glass: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.02));

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1180px;
}

* { box-sizing: border-box; }

/* A class that sets `display` beats the browser's [hidden] rule, which left
   the empty basket drawer and the "Loading the store…" spinner on screen.
   This restores the intent of the hidden attribute everywhere. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: 'Outfit', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Atmosphere ------------------------------------------------------- */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% -8%,  rgba(255, 30, 111, .30), transparent 62%),
    radial-gradient(ellipse 55% 45% at 8%  18%,  rgba(229, 0, 122, .20),  transparent 65%),
    radial-gradient(ellipse 60% 50% at 95% 32%,  rgba(123, 47, 247, .16), transparent 68%),
    radial-gradient(ellipse 90% 60% at 50% 108%, rgba(255, 95, 162, .14), transparent 70%);
}
body::after {
  content: "";
  position: fixed; inset: auto 0 0 0; height: 46vh; z-index: 0;
  pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(to right,  rgba(255, 30, 111, .16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 30, 111, .16) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 90%);
  mask-image: linear-gradient(to top, #000 0%, transparent 90%);
}

header, main, footer { position: relative; z-index: 1; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--neon); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

/* Type ------------------------------------------------------------- */
h1, h2, h3 { color: #fff; text-wrap: balance; margin: 0; }

h1 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 900; line-height: .92; letter-spacing: -.03em; text-transform: uppercase;
  margin: 1.2rem 0 .2rem;
  background: linear-gradient(180deg, #fff 12%, var(--neon-3) 62%, var(--neon) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 30, 111, .55));
}
h2 {
  font-size: clamp(1.4rem, 3vw, 2.05rem);
  font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; margin-bottom: .5rem;
}
h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }

.script {
  font-family: 'Pacifico', cursive;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  color: var(--neon-3);
  text-shadow: 0 0 22px rgba(255, 30, 111, .7);
}

.sub { color: var(--text-dim); margin: 0 0 1.6rem; max-width: 62ch; line-height: 1.6; }

a { color: var(--neon-2); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--neon-3); }

::selection { background: var(--neon); color: #fff; }

:focus-visible { outline: 2px solid var(--neon-3); outline-offset: 3px; border-radius: 6px; }

/* Buttons ---------------------------------------------------------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; border-radius: var(--r-pill); padding: .72rem 1.5rem;
  font-family: inherit; font-weight: 700; font-size: .88rem;
  letter-spacing: .04em; text-transform: uppercase;
  color: #fff; cursor: pointer;
  background: var(--grad-neon);
  box-shadow: 0 10px 26px rgba(255, 30, 111, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .22s var(--ease), box-shadow .28s var(--ease), filter .22s var(--ease);
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transition: transform .6s var(--ease);
}
.btn:hover::after { transform: translateX(120%) skewX(-18deg); }
.btn:hover {
  transform: translateY(-3px); filter: saturate(120%);
  box-shadow: 0 18px 44px rgba(255, 30, 111, .5), var(--glow-sm), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn:active { transform: translateY(-1px) scale(.985); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; filter: grayscale(.4); }
.btn.sm { padding: .55rem 1.1rem; font-size: .78rem; }
.btn.full { width: 100%; }
.btn.ghost {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-hi);
  color: var(--neon-3); box-shadow: none;
}
.btn.ghost:hover { background: rgba(255, 30, 111, .14); color: #fff; box-shadow: var(--glow-sm); }

.icon-btn {
  background: none; border: 0; color: var(--text-dim);
  font-size: 1.8rem; line-height: 1; cursor: pointer; padding: .2rem .5rem;
  border-radius: var(--r-sm); transition: color .2s var(--ease), background .2s var(--ease);
}
.icon-btn:hover { color: #fff; background: var(--panel-hi); }

/* Header ----------------------------------------------------------- */
.navbar {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, rgba(11, 6, 18, .94), rgba(11, 6, 18, .72));
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .55);
}
.navbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), var(--neon-3), var(--neon), transparent);
  opacity: .85;
}
.nav-in { display: flex; align-items: center; gap: 1.6rem; height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; margin-right: auto; color: inherit; }
.brand svg { filter: drop-shadow(0 0 14px rgba(255, 30, 111, .65)); transition: transform .3s var(--ease); }
.brand:hover svg { transform: scale(1.06); }
.brand-txt { display: flex; flex-direction: column; line-height: 1; }
.brand-txt b { font-size: 1.02rem; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; color: #fff; }
.brand-txt i {
  font-family: 'Pacifico', cursive; font-style: normal; font-size: .82rem;
  color: var(--neon-3); text-shadow: 0 0 14px rgba(255, 30, 111, .6); margin-top: 2px;
}

.nav-links { display: flex; gap: 1.4rem; }
.nav-links a {
  position: relative; color: var(--text); font-weight: 600; font-size: .9rem; padding: .45rem .1rem;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; border-radius: 2px;
  background: var(--grad-neon); box-shadow: var(--glow-sm);
  transition: width .28s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: .9rem; }
.account {
  font-size: .8rem; color: var(--neon-3); font-weight: 600;
  padding: .35rem .8rem; border: 1px solid var(--line-hi); border-radius: var(--r-pill);
  background: rgba(255, 30, 111, .08);
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-pill); background: rgba(5, 3, 10, .55);
  font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums;
}

/* Hero ------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; margin: 2.6rem 0 0;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: radial-gradient(120% 130% at 50% -20%, rgba(255, 30, 111, .28), transparent 60%), var(--ink-2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: clamp(2rem, 5vw, 3.6rem);
}
.hero::after {
  content: ""; position: absolute; top: -60%; left: -30%; width: 45%; height: 220%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent);
  transform: rotate(18deg);
  animation: sweep 7s ease-in-out infinite;
}
@keyframes sweep {
  0%   { transform: translateX(0) rotate(18deg); opacity: 0; }
  45%  { opacity: 1; }
  100% { transform: translateX(320%) rotate(18deg); opacity: 0; }
}
.hero p { max-width: 58ch; color: var(--text-dim); font-size: 1.02rem; line-height: 1.65; margin: 1.1rem 0 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }

.eyebrow {
  display: inline-block; font-size: .71rem; font-weight: 700;
  letter-spacing: .28em; text-transform: uppercase; color: var(--neon-2);
  padding: .4rem .9rem; border: 1px solid var(--line-hi); border-radius: var(--r-pill);
  background: rgba(255, 30, 111, .08);
  box-shadow: inset 0 0 18px rgba(255, 30, 111, .12);
}

.stats {
  display: flex; flex-wrap: wrap; gap: 2.4rem;
  margin-top: 2.6rem; padding-top: 1.8rem; border-top: 1px solid var(--line);
}
.stat b {
  display: block; font-size: 1.7rem; font-weight: 800;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  background: var(--grad-neon);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(255, 30, 111, .45));
}
.stat small {
  display: block; margin-top: .25rem; font-size: .71rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute);
}

/* Sections --------------------------------------------------------- */
section { margin-top: 4rem; }
section:last-child { margin-bottom: 1rem; }

.pills { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.pill {
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--panel);
  padding: .55rem 1.15rem; font-family: inherit; font-weight: 600; font-size: .86rem;
  color: var(--text-dim); cursor: pointer;
  transition: color .25s var(--ease), background .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.pill:hover {
  color: #fff; border-color: var(--line-hi); background: rgba(255, 30, 111, .14);
  transform: translateY(-2px); box-shadow: var(--glow-sm);
}
.pill.active {
  background: var(--grad-neon); border-color: transparent; color: #fff; box-shadow: var(--glow-md);
}

.cat-block { margin-bottom: 3.2rem; }
.cat-head { display: flex; align-items: baseline; gap: .9rem; margin-bottom: 1.2rem; }
.cat-head h3 {
  font-size: 1.3rem; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em;
}
.cat-head span { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute); }
.cat-head::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line-hi), transparent);
}

/* Package cards ---------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 1.3rem; }

.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: .85rem;
  border-radius: var(--r-md); border: 1px solid var(--line); padding: 1rem;
  background: var(--grad-glass), linear-gradient(180deg, rgba(20, 9, 26, .92), rgba(9, 5, 14, .96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .07);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: 2;
  background: var(--grad-deep);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s var(--ease); pointer-events: none;
}
.card:hover {
  transform: translateY(-8px); border-color: transparent;
  box-shadow: 0 34px 80px rgba(0, 0, 0, .7), var(--glow-md);
}
.card:hover::before { opacity: 1; }

.art {
  position: relative; overflow: hidden; aspect-ratio: 16 / 10;
  border-radius: calc(var(--r-md) - 6px);
  background: linear-gradient(160deg, #2a0a2e, #12040f);
}
.art img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(112%);
  transition: transform .5s var(--ease), filter .5s var(--ease);
}
.card:hover .art img { transform: scale(1.06); filter: saturate(132%) brightness(1.06); }

.badge {
  position: absolute; top: .6rem; left: .6rem; z-index: 3;
  display: inline-flex; align-items: center; gap: .35rem;
  border-radius: var(--r-pill); padding: .28rem .7rem;
  font-size: .63rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: var(--grad-deep); box-shadow: var(--glow-sm);
}
.badge.sale { background: linear-gradient(135deg, #ffb400, #ff1e6f); }

.card p.desc {
  margin: 0; font-size: .87rem; line-height: 1.55; color: var(--text-dim);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line);
}
.price {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  background: var(--grad-neon);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 30, 111, .55));
}
.price small {
  display: block; font-size: .72rem; font-weight: 500; letter-spacing: .04em;
  color: var(--text-mute); -webkit-text-fill-color: var(--text-mute); filter: none;
}
.price s {
  display: block; font-size: .78rem; font-weight: 500;
  color: var(--text-mute); -webkit-text-fill-color: var(--text-mute); filter: none;
}

/* States ----------------------------------------------------------- */
.state {
  display: flex; align-items: center; gap: .7rem;
  padding: 2.5rem 0; color: var(--text-dim); font-size: .95rem;
}
.state.error { color: var(--neon-3); }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255, 30, 111, .25); border-top-color: var(--neon);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* FAQ -------------------------------------------------------------- */
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.faq-card {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.4rem;
  background: var(--panel);
}
.faq-card h3 { margin-bottom: .5rem; color: #fff; }
.faq-card p { margin: 0; font-size: .88rem; line-height: 1.6; color: var(--text-dim); }

/* Cart drawer ------------------------------------------------------ */
.scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(4, 2, 7, .72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fade .25s var(--ease);
}
@keyframes fade { from { opacity: 0; } }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(430px, 100%);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(20, 9, 26, .99), rgba(8, 4, 12, .995));
  border-left: 1px solid var(--line-hi);
  box-shadow: -30px 0 90px rgba(0, 0, 0, .8), var(--glow-md);
  animation: slide .32s var(--ease);
}
@keyframes slide { from { transform: translateX(100%); } }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem 1.4rem; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 1.1rem; margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1.2rem 1.4rem; }
.drawer-foot { padding: 1.2rem 1.4rem; border-top: 1px solid var(--line); background: rgba(255, 30, 111, .04); }

.line {
  display: flex; gap: .9rem; align-items: center;
  padding: .85rem 0; border-bottom: 1px solid var(--line);
}
.line img { width: 56px; height: 44px; object-fit: cover; border-radius: var(--r-sm); flex: none; }
.line-info { flex: 1; min-width: 0; }
.line-info b { display: block; font-size: .92rem; font-weight: 600; color: #fff; }
.line-info span { font-size: .8rem; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.line-price { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--neon-3); font-size: .95rem; }
.line .icon-btn { font-size: 1.3rem; }

.total-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute);
  margin-bottom: .3rem;
}
.total-row .price { font-size: 1.9rem; }
.fine { font-size: .76rem; color: var(--text-mute); margin: 0 0 1rem; line-height: 1.5; }

.empty { text-align: center; padding: 3rem 1rem; color: var(--text-mute); }
.empty svg { opacity: .5; margin-bottom: 1rem; }

.gate {
  border: 1px solid var(--line-hi); border-radius: var(--r-md);
  background: rgba(255, 30, 111, .08); padding: 1.2rem; margin-bottom: 1.2rem;
}
.gate h3 { font-size: .98rem; margin-bottom: .45rem; }
.gate p { font-size: .85rem; color: var(--text-dim); line-height: 1.55; margin: 0 0 1rem; }

/* Discord ID modal -------------------------------------------------- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center; padding: 20px;
  background: rgba(4, 2, 7, .78);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fade .25s var(--ease);
}
.modal {
  width: min(480px, 100%);
  max-height: 90vh; overflow-y: auto;
  border: 1px solid var(--line-hi); border-radius: var(--r-lg);
  padding: clamp(1.4rem, 4vw, 2rem);
  background: linear-gradient(180deg, rgba(24, 11, 30, .99), rgba(9, 5, 14, .99));
  box-shadow: 0 40px 120px rgba(0, 0, 0, .8), var(--glow-md);
  animation: rise .3s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.modal h2 { font-size: 1.25rem; margin-bottom: .6rem; }
.modal > p { color: var(--text-dim); font-size: .9rem; line-height: 1.6; margin: 0 0 1.2rem; }

.how { margin: 0 0 1.4rem; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .45rem; }
.how li { color: var(--text-dim); font-size: .87rem; line-height: 1.5; }
.how b { color: var(--neon-3); font-weight: 600; }

.dc-mark { display: block; margin-bottom: 1rem; filter: drop-shadow(0 0 18px rgba(88, 101, 242, .55)); }

.btn.discord {
  background: linear-gradient(135deg, #5865F2 0%, #7c5cff 100%);
  box-shadow: 0 10px 26px rgba(88, 101, 242, .4), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn.discord:hover {
  box-shadow: 0 18px 44px rgba(88, 101, 242, .55), 0 0 22px rgba(88, 101, 242, .5), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.field { display: block; }
.field span {
  display: block; margin-bottom: .45rem;
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--neon-2); font-weight: 700;
}
.field input {
  width: 100%; padding: .8rem 1rem;
  font-family: inherit; font-size: 1rem; font-variant-numeric: tabular-nums; letter-spacing: .02em;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.field input::placeholder { color: var(--text-mute); }
.field input:focus {
  outline: none; background: rgba(255, 255, 255, .06);
  border-color: var(--neon); box-shadow: 0 0 0 3px rgba(255, 30, 111, .22);
}
.err { color: #ff8fb4; font-size: .84rem; margin: .6rem 0 0; }

.modal-actions { display: flex; gap: .7rem; justify-content: flex-end; margin-top: 1.5rem; }

/* Toast ------------------------------------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60;
  transform: translateX(-50%);
  padding: .85rem 1.4rem; border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(28, 12, 34, .98), rgba(12, 6, 18, .98));
  border: 1px solid var(--line-hi);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .7), var(--glow-sm);
  font-size: .88rem; font-weight: 600; color: #fff;
  animation: pop .3s var(--ease);
  max-width: calc(100vw - 40px);
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 14px); } }

/* Footer ----------------------------------------------------------- */
footer {
  position: relative; margin-top: 5rem; padding: 2.6rem 0 3rem;
  background: linear-gradient(180deg, transparent, rgba(255, 30, 111, .07));
  border-top: 1px solid var(--line);
}
footer::before {
  content: ""; position: absolute; top: -1px; left: 15%; right: 15%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  box-shadow: var(--glow-sm);
}
.foot-in { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.foot-in p { margin: 0; font-size: .83rem; color: var(--text-mute); }
.foot-links { display: flex; gap: 1.2rem; }
.foot-links a { color: var(--text-dim); font-size: .85rem; }

/* Scrollbar -------------------------------------------------------- */
* { scrollbar-width: thin; scrollbar-color: var(--neon) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-2); }
::-webkit-scrollbar-thumb { background: var(--grad-neon); border-radius: var(--r-pill); border: 2px solid var(--ink-2); }

/* Responsive ------------------------------------------------------- */
@media (max-width: 780px) {
  .nav-links { display: none; }
  .account { display: none; }
  .stats { gap: 1.5rem; }
  .stat b { font-size: 1.35rem; }
  body::after { height: 30vh; background-size: 44px 44px; }
  .card:hover { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* =====================================================================
   RULES PAGE
   ===================================================================== */
.rules-hero p { font-size: 1rem; }

.rules-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 2.6rem;
  align-items: start;
  margin-top: 3rem;
}

/* Sticky section index */
.toc {
  position: sticky; top: 92px;
  max-height: calc(100vh - 120px); overflow-y: auto;
  padding: 1.1rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel);
}
.toc-title {
  margin: 0 0 .8rem;
  font-size: .68rem; font-weight: 800; letter-spacing: .22em;
  text-transform: uppercase; color: var(--neon-2);
}
.toc nav { display: flex; flex-direction: column; gap: .1rem; }
.toc a {
  display: block; padding: .42rem .6rem; border-radius: var(--r-sm);
  font-size: .84rem; line-height: 1.35; color: var(--text-dim);
  border-left: 2px solid transparent;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.toc a:hover { background: rgba(255, 30, 111, .1); color: #fff; }
.toc a.active {
  background: rgba(255, 30, 111, .14);
  border-left-color: var(--neon);
  color: #fff; font-weight: 600;
}

.rules-body { display: flex; flex-direction: column; gap: 1.2rem; }

.rule {
  margin: 0; scroll-margin-top: 96px;
  padding: 1.6rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--grad-glass), linear-gradient(180deg, rgba(20, 9, 26, .82), rgba(9, 5, 14, .9));
  box-shadow: 0 14px 40px rgba(0, 0, 0, .4);
  transition: border-color .3s var(--ease);
}
.rule:hover { border-color: var(--line-hi); }

.rule h2 {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1.12rem; margin-bottom: 1rem;
  text-transform: none; letter-spacing: -.01em;
}
.rule-emoji {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  font-size: 1rem; border-radius: 50%;
  background: rgba(255, 30, 111, .12);
  border: 1px solid var(--line-hi);
  box-shadow: inset 0 0 14px rgba(255, 30, 111, .18);
}

.rule p { color: var(--text-dim); font-size: .92rem; line-height: 1.68; margin: 0 0 .9rem; max-width: 72ch; }
.rule p:last-child { margin-bottom: 0; }

.rule ul, .rule ol { margin: 0 0 .9rem; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.rule ul:last-child, .rule ol:last-child { margin-bottom: 0; }
.rule li {
  position: relative; padding-left: 1.5rem;
  color: var(--text-dim); font-size: .92rem; line-height: 1.6; max-width: 72ch;
}
.rule ul li::before {
  content: ""; position: absolute; left: .3rem; top: .62em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--neon); box-shadow: var(--glow-sm);
}
.rule ol.num { counter-reset: n; }
.rule ol.num li { counter-increment: n; }
.rule ol.num li::before {
  content: counter(n); position: absolute; left: 0; top: .05em;
  font-size: .72rem; font-weight: 800; color: var(--neon-2);
}

/* Zero-tolerance section reads hotter than the rest */
#hard-lines-zero-tolerance {
  border-color: rgba(255, 61, 138, .45);
  background: var(--grad-glass), linear-gradient(180deg, rgba(46, 8, 28, .9), rgba(14, 5, 16, .94));
  box-shadow: 0 14px 46px rgba(0, 0, 0, .5), inset 0 0 40px rgba(255, 30, 111, .07);
}

.closing {
  margin: .6rem 0 0; padding: 1.3rem 1.6rem;
  border: 1px solid var(--line-hi); border-radius: var(--r-md);
  background: rgba(255, 30, 111, .07);
  color: var(--neon-3); font-size: .94rem; line-height: 1.6; text-align: center;
}

.nav-links a.here { color: var(--neon-3); }
.nav-links a.here::after { width: 100%; }

@media (max-width: 900px) {
  .rules-layout { grid-template-columns: 1fr; gap: 1.6rem; }
  .toc { position: static; max-height: none; }
  .toc nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .2rem; }
}

.nav-rules {
  position: relative; font-weight: 600; font-size: .9rem;
  color: var(--text); padding: .45rem .1rem;
}
.nav-rules::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; border-radius: 2px;
  background: var(--grad-neon); box-shadow: var(--glow-sm);
  transition: width .28s var(--ease);
}
.nav-rules:hover::after { width: 100%; }
@media (max-width: 780px) { .nav-rules { display: none; } }

/* =====================================================================
   PACKAGE DETAIL MODAL
   ===================================================================== */
.pkg-modal {
  width: min(660px, 100%);
  max-height: 88vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pkg-close {
  position: absolute; top: .7rem; right: .9rem; z-index: 4;
  color: #fff; font-size: 2rem;
  background: rgba(5, 3, 10, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 50%; width: 40px; height: 40px;
  display: grid; place-items: center; padding: 0;
}
.pkg-close:hover { background: rgba(255, 30, 111, .3); }

.pkg-art {
  position: relative; flex: none;
  aspect-ratio: 16 / 8; overflow: hidden;
  background: linear-gradient(160deg, #2a0a2e, #12040f);
}
.pkg-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pkg-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(9, 5, 14, .96) 100%);
}

.pkg-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 1.4rem clamp(1.2rem, 4vw, 2rem) 1.6rem;
  margin-top: -2.6rem; position: relative; z-index: 2;
}
.pkg-body h2 {
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  margin: .7rem 0 1.1rem;
  text-transform: none; letter-spacing: -.02em;
}

/* Tebex-authored copy */
.pkg-desc { color: var(--text-dim); font-size: .93rem; line-height: 1.7; }
.pkg-desc p { margin: 0 0 .85rem; }
.pkg-desc p:last-child { margin-bottom: 0; }
.pkg-desc h1, .pkg-desc h2, .pkg-desc h3 {
  font-size: 1rem; font-weight: 700; color: var(--neon-3);
  text-transform: none; letter-spacing: 0;
  margin: 1.4rem 0 .6rem;
}
.pkg-desc strong { color: #fff; font-weight: 600; }
.pkg-desc em { color: var(--neon-3); font-style: normal; }
.pkg-desc ul, .pkg-desc ol { margin: 0 0 .9rem; padding-left: 1.3rem; display: flex; flex-direction: column; gap: .4rem; }
.pkg-desc li { line-height: 1.6; }
.pkg-desc li::marker { color: var(--neon); }
.pkg-desc hr {
  border: 0; height: 1px; margin: 1.2rem 0;
  background: linear-gradient(90deg, transparent, var(--line-hi), transparent);
}
.pkg-desc blockquote {
  margin: 1rem 0; padding: .8rem 1rem;
  border-left: 2px solid var(--neon);
  background: rgba(255, 30, 111, .07);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.pkg-foot {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem clamp(1.2rem, 4vw, 2rem);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 30, 111, .05), rgba(9, 5, 14, .6));
}

/* Cards advertise that they open */
.card { cursor: pointer; }
.card .hint {
  font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--neon-2); opacity: 0; transform: translateY(4px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.card:hover .hint, .card:focus-visible .hint { opacity: 1; transform: translateY(0); }
@media (hover: none) { .card .hint { opacity: 1; transform: none; } }
