/* ===========================================================
   Private Sale — Hub / Entry page
   Inherits the gold-frame visual language of the investor panel
   =========================================================== */

:root {
  --ps-bg-deep: #0b0817;
  --ps-bg-panel: #120c1c;
  --ps-bg-card: #1a1326;
  --ps-bg-card-2: #221831;
  --ps-line: #2a2138;
  --ps-line-2: #3a2e4d;

  --ps-gold-1: #f8e6a6;
  --ps-gold-2: #e8c46a;
  --ps-gold-3: #d4a04c;
  --ps-gold-4: #a87b2c;
  --ps-gold-line: #b88a3c;
  --ps-gold-text: #f3d59a;
  --ps-gold-text-dim: #b8965a;

  --ps-purple-1: #e9c7ff;
  --ps-purple-2: #c084fc;
  --ps-purple-3: #a855f7;
  --ps-purple-4: #7c3aed;
  --ps-purple-5: #4c1d95;
  --ps-purple-glow: rgba(168, 85, 247, 0.55);

  --ps-green: #6cd24f;
  --ps-green-glow: rgba(108, 210, 79, 0.45);

  --ps-font-display: 'Marcellus SC', 'Trajan Pro', 'Times New Roman', serif;
  --ps-font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===========================================================
   Page base
   =========================================================== */
.private-sale-main {
  position: relative;
  min-height: 100vh;
  color: #efe7d7;
  background-color: var(--ps-bg-deep);
  background-image:
    radial-gradient(ellipse 1100px 700px at 50% -140px, rgba(168, 85, 247, 0.2), transparent 70%),
    radial-gradient(ellipse 900px 600px at 0% 60%, rgba(124, 58, 237, 0.12), transparent 70%),
    radial-gradient(ellipse 900px 600px at 100% 70%, rgba(108, 210, 79, 0.05), transparent 70%);
  overflow: hidden;
  font-family: var(--ps-font-body);
}

.private-sale-main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  z-index: 0;
  background:
    repeating-linear-gradient(45deg, rgba(216, 160, 76, 0.04) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-45deg, rgba(168, 85, 247, 0.03) 0 1px, transparent 1px 3px);
}

/* ===========================================================
   Wall banners (left = purple CLEG, right = green GOBG)
   =========================================================== */
.ps-walls {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.ps-wall {
  position: absolute;
  top: 80px;
  max-width: 280px;
  width: 18vw;
  min-width: 140px;
  opacity: 0.92;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
}
.ps-wall-left  { left: 0; }
.ps-wall-right { right: 0; }

@media (max-width: 991px) {
  .ps-wall { display: none; }
}

/* ===========================================================
   Hero
   =========================================================== */
.ps-hub {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}
@media (max-width: 768px) {
  .ps-hub { padding: 96px 18px 64px; }
}

.ps-hero {
  text-align: center;
  padding: 40px 0 28px;
}

.ps-title {
  font-family: var(--ps-font-display);
  font-weight: 700;
  font-size: clamp(34px, 5.2vw, 64px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ps-gold-2);
  margin: 0 0 22px;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.45),
    0 0 34px rgba(232, 196, 106, 0.55);
  background: linear-gradient(180deg, #fff5cf 0%, #f6d271 38%, #e6ab44 72%, #c88f2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ps-intro {
  max-width: 760px;
  margin: 0 auto;
  color: #d8ccb6;
  font-size: 15px;
  line-height: 1.7;
}
.ps-intro p { margin: 0 0 10px; }

/* Gold pill row "EARLY ACCESS ◆ LIMITED ALLOCATION ◆ EXCLUSIVE PARTICIPATION" */
.ps-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin: 26px 0 36px;
  font-family: var(--ps-font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--ps-gold-3);
}
.ps-tagline .diamond {
  color: var(--ps-gold-2);
  font-size: 10px;
  opacity: 0.85;
}

/* ===========================================================
   Primary CTA buttons (CLEG V2 / GOBG)
   =========================================================== */
.ps-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
}
.ps-cta-row.is-single {
  grid-template-columns: minmax(280px, 460px);
  justify-content: center;
}

@media (max-width: 700px) {
  .ps-cta-row { grid-template-columns: 1fr; }
  .ps-cta-row.is-single { grid-template-columns: 1fr; }
}

/* ---- Start CTA button (under CLEG V2 card) ---- */
.ps-start-row {
  display: flex;
  justify-content: center;
  margin: 26px auto 0;
}
.ps-start-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 220px;
  padding: 14px 38px;
  background: linear-gradient(180deg, #2a1a3a 0%, #160e22 100%);
  border: 1px solid var(--ps-gold-2);
  border-radius: 8px;
  color: var(--ps-gold-text);
  font-family: var(--ps-font-display);
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 150, 0.08),
    0 10px 30px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(168, 85, 247, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  outline: none;
}
.ps-start-btn::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(184, 138, 60, 0.32);
  border-radius: 4px;
  pointer-events: none;
}
.ps-start-btn-corner { display: none; }
.ps-start-btn:hover {
  transform: translateY(-1px);
  border-color: var(--ps-gold-1);
  color: var(--ps-gold-1);
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 150, 0.14),
    0 14px 40px rgba(0, 0, 0, 0.65),
    0 0 36px var(--ps-purple-glow);
}
.ps-start-btn-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--ps-gold-2);
  pointer-events: none;
}
.ps-start-btn-corner.tl { top: -1px;    left: -1px;    border-right: none; border-bottom: none; }
.ps-start-btn-corner.tr { top: -1px;    right: -1px;   border-left: none;  border-bottom: none; }
.ps-start-btn-corner.bl { bottom: -1px; left: -1px;    border-right: none; border-top: none; }
.ps-start-btn-corner.br { bottom: -1px; right: -1px;   border-left: none;  border-top: none; }
.ps-start-btn-text { line-height: 1; }
.ps-start-btn-arrow { display: inline-flex; flex-shrink: 0; transform: translateX(2px); }

.ps-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 22px 28px;
  background: linear-gradient(180deg, #1c1429 0%, #110b1c 100%);
  border: 1px solid var(--ps-gold-line);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-align: left;
  color: var(--ps-gold-text);
  font-family: inherit;
  outline: none;
}
.ps-cta::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(184, 138, 60, 0.25);
  pointer-events: none;
}
.ps-cta:hover {
  transform: translateY(-2px);
  border-color: var(--ps-gold-2);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(216, 160, 76, 0.18);
}
.ps-cta.is-cleg:hover { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 36px var(--ps-purple-glow); }
.ps-cta.is-gobg:hover { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 36px var(--ps-green-glow); }

.ps-cta .corner {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
  z-index: 4;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}
.ps-cta .corner img { display: block; width: 100%; height: 100%; }
.ps-cta .corner.bl { bottom: 0; left: 0; }
.ps-cta .corner.br { bottom: 0; right: 0; transform: scaleX(-1); }
.ps-cta .corner.tl { top: 0; left: 0; transform: scaleY(-1); }
.ps-cta .corner.tr { top: 0; right: 0; transform: scale(-1, -1); }

.ps-cta-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6));
}
.ps-cta.is-cleg .ps-cta-icon { filter: drop-shadow(0 0 18px var(--ps-purple-glow)); }
.ps-cta.is-gobg .ps-cta-icon { filter: drop-shadow(0 0 16px var(--ps-green-glow)); }

.ps-cta-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ps-cta-label .name {
  font-family: var(--ps-font-display);
  font-size: 26px;
  letter-spacing: 0.08em;
  color: var(--ps-gold-text);
  text-transform: uppercase;
  line-height: 1;
}
.ps-cta-label .sub {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #b9a98a;
}

/* ---- Locked round card ---- */
.ps-cta.is-locked {
  cursor: not-allowed;
  opacity: 0.6;
  filter: grayscale(0.45);
}
.ps-cta.is-locked:hover {
  transform: none;
  border-color: var(--ps-gold-line);
  box-shadow: none;
}
.ps-cta.is-locked .ps-cta-icon { filter: grayscale(0.5) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6)); }
.ps-cta-lock {
  position: absolute;
  top: 10px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid rgba(184, 138, 60, 0.42);
  border-radius: 999px;
  background: rgba(20, 14, 28, 0.88);
  color: var(--ps-gold-text);
  font-family: var(--ps-font-display);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  z-index: 5;
}
.ps-cta-lock-icon { display: inline-flex; }
.ps-cta-lock svg { width: 12px; height: 12px; }

/* ===========================================================
   Gold-frame (shared by About + Bottom CTA)
   =========================================================== */
.ps-frame {
  position: relative;
  background: linear-gradient(180deg, #1a1224 0%, #14101e 100%);
  border: 1px solid var(--ps-gold-line);
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 150, 0.06),
    inset 0 1px 0 rgba(255, 220, 150, 0.08),
    0 22px 70px rgba(0, 0, 0, 0.6);
  margin-top: 48px;
}
.ps-frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(184, 138, 60, 0.22);
  pointer-events: none;
  z-index: 1;
}
.ps-frame .corner {
  position: absolute;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 4;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}
.ps-frame .corner img { display: block; width: 100%; height: 100%; }
.ps-frame .corner.bl { bottom: 0; left: 0; }
.ps-frame .corner.br { bottom: 0; right: 0; transform: scaleX(-1); }
.ps-frame .corner.tl { top: 0; left: 0; transform: scaleY(-1); }
.ps-frame .corner.tr { top: 0; right: 0; transform: scale(-1, -1); }

/* ===========================================================
   About this Private Sale
   =========================================================== */
.ps-about {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) 1.95fr;
  gap: 36px;
  align-items: center;
  padding: 38px 44px;
  position: relative;
  z-index: 2;
}
@media (max-width: 900px) {
  .ps-about { grid-template-columns: 1fr; padding: 28px 22px; }
}

.ps-about-portal {
  display: block;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  filter: drop-shadow(0 12px 30px var(--ps-purple-glow));
}

.ps-about-body h2 {
  font-family: var(--ps-font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ps-gold-2);
  font-size: 22px;
  margin: 0 0 12px;
}
.ps-about-body > p {
  color: #cfc2ac;
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 22px;
  max-width: 560px;
}

.ps-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
}
@media (max-width: 600px) {
  .ps-feature-grid { grid-template-columns: 1fr; }
}

.ps-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.ps-feature img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}
.ps-feature .title {
  font-family: var(--ps-font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ps-gold-2);
  font-size: 13px;
  margin: 4px 0 4px;
}
.ps-feature .text {
  color: #b9a98a;
  font-size: 12.5px;
  line-height: 1.55;
  margin: 0;
}

/* ===========================================================
   Bottom CTA strip (badge + headline + chest)
   =========================================================== */
.ps-bottom-cta {
  display: grid;
  grid-template-columns: 80px 1fr 360px;
  align-items: center;
  gap: 22px;
  padding: 18px 28px;
  position: relative;
  z-index: 2;
  min-height: 130px;
  margin-bottom: 60px;
}
@media (max-width: 900px) {
  .ps-bottom-cta {
    grid-template-columns: 64px 1fr;
    padding: 18px;
  }
  .ps-bottom-chest { display: none; }
}

.ps-bottom-badge {
  width: 64px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
}

.ps-bottom-text h3 {
  font-family: var(--ps-font-display);
  letter-spacing: 0.06em;
  color: var(--ps-gold-2);
  font-size: 18px;
  margin: 0 0 4px;
}
.ps-bottom-text p {
  color: #b9a98a;
  font-size: 13px;
  margin: 0;
}

.ps-bottom-chest {
  height: 130px;
  object-fit: contain;
  object-position: right center;
  justify-self: end;
  filter: drop-shadow(0 10px 24px rgba(168, 85, 247, 0.25));
  margin-right: -10px;
}

/* ===========================================================
   Connect Wallet button shim (header)
   reuse the same wallet styles from investor-panel
   =========================================================== */
.ps-wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--ps-gold-line);
  background: transparent;
  color: var(--ps-gold-text);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ps-wallet-btn:hover {
  background: rgba(184, 138, 60, 0.08);
  border-color: var(--ps-gold-2);
}
.ps-wallet-btn svg { color: currentColor; }

/* ===========================================================
   CLEG V2 — Intro view (S2)
   =========================================================== */
.ps-cleg-wrap {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 110px 24px 80px;
}
@media (max-width: 768px) {
  .ps-cleg-wrap { padding: 88px 18px 64px; }
}

/* Back-to-hub row above the CLEG V2 sub-page */
.ps-sub-back-row {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 18px;
}

/* Ornate gold-frame using image corners (cleg-intro/corner-gold.png) */
.ps-ornate-frame {
  position: relative;
  border-radius: 25px;
  background:
    radial-gradient(ellipse at top, rgba(168, 85, 247, 0.06), transparent 70%),
    linear-gradient(180deg, #150e21 0%, #0d0917 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 150, 0.05),
    0 24px 70px rgba(0, 0, 0, 0.7);
  padding: 28px 36px;
}
.ps-ornate-frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(184, 138, 60, 0.25);
  pointer-events: none;
}
.ps-ornate-frame + .ps-ornate-frame { margin-top: 22px; }

/* corner-gold.png has its L-bend anchored at the asset's top-left.
   Pull the asset outward by --orn-offset so the bend sits flush at the
   frame's outer corner, with arms running along the gold border. */
.ps-orn-corner {
  position: absolute;
  width: 78px;
  height: 78px;
  --orn-offset: -1px;
  pointer-events: none;
  z-index: 4;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}
.ps-orn-corner img { display: block; width: 100%; height: 100%; }
.ps-orn-corner.tl { top: var(--orn-offset);    left: var(--orn-offset); }
.ps-orn-corner.tr { top: var(--orn-offset);    right: var(--orn-offset); transform: scaleX(-1); }
.ps-orn-corner.bl { bottom: var(--orn-offset); left: var(--orn-offset);  transform: scaleY(-1); }
.ps-orn-corner.br { bottom: var(--orn-offset); right: var(--orn-offset); transform: scale(-1, -1); }

/* Close (X) button in the top-right of the intro frame */
.ps-close-btn {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 6;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ps-gold-2);
  cursor: pointer;
  border-radius: 50%;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.ps-close-btn:hover {
  color: var(--ps-gold-1);
  background: rgba(216, 160, 76, 0.1);
  transform: scale(1.05);
}

/* ---- Top intro frame ---- */
.ps-cleg-intro {
  padding: 36px 48px 40px;
}
.ps-cleg-intro-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1.25fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .ps-cleg-intro { padding: 24px; }
  .ps-cleg-intro-grid { grid-template-columns: 1fr; gap: 24px; }
}

.ps-cleg-hero {
  position: relative;
  border-radius: 0;
  overflow: hidden;
}
.ps-cleg-hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  filter: drop-shadow(0 14px 36px rgba(168, 85, 247, 0.35));
}

.ps-cleg-intro-body { padding: 0 8px 0 0; }

.ps-cleg-h1 {
  font-family: var(--ps-font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fcebb4 0%, #d49f3e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin: 0 0 10px;
}

.ps-divider {
  display: block;
  width: 240px;
  height: auto;
  margin: 0 auto 22px;
  opacity: 0.95;
}

.ps-cleg-intro-body p {
  color: #d8ccb6;
  font-size: 14.5px;
  line-height: 1.75;
  margin: 0 0 14px;
}
.ps-highlight {
  color: var(--ps-gold-2);
  font-weight: 600;
}

/* ---- Overview frame ---- */
.ps-cleg-overview { padding: 30px 32px 40px; }
.ps-cleg-overview-head {
  text-align: center;
  margin-bottom: 22px;
}
.ps-cleg-h2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-family: var(--ps-font-display);
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ps-gold-2);
  margin: 0 0 6px;
}
.ps-h2-text { white-space: nowrap; }

/* divider-single.png: gold taper with purple diamond on the left edge.
   - right-side decoration uses the asset as-is (diamond near text)
   - left-side decoration is mirrored horizontally (diamond stays near text) */
.ps-h2-divider {
  width: 180px;
  max-width: 22vw;
  height: auto;
  flex-shrink: 1;
  opacity: 0.95;
  display: block;
}
.ps-h2-divider-left { transform: scaleX(-1); }
.ps-cleg-overview-head p {
  color: #b9a98a;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 4px auto 0;
  max-width: 760px;
}

/* ---- 6-card overview grid ---- */
.ps-ov-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  padding: 8px 0 4px;
}
@media (max-width: 1200px) { .ps-ov-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .ps-ov-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px)  { .ps-ov-grid { grid-template-columns: 1fr; } }

.ps-ov-card {
  position: relative;
  aspect-ratio: 400 / 667;
  isolation: isolate;
}
.ps-ov-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}
.ps-ov-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 14% 9% 10%;
  text-align: center;
}
.ps-ov-icon {
  width: 72%;
  height: auto;
  max-width: 120px;
  margin-bottom: 4px;
  filter: drop-shadow(0 6px 14px rgba(168, 85, 247, 0.35));
}
.ps-ov-title {
  font-family: var(--ps-font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ps-gold-2);
  font-size: 12.5px;
  line-height: 1.25;
  margin: 4px 0 10px;
  min-height: 2.4em;
}
.ps-ov-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  width: 100%;
}
.ps-ov-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  color: #cec1aa;
  font-size: 10.5px;
  line-height: 1.4;
  margin-bottom: 6px;
}
.ps-ov-diamond {
  color: var(--ps-purple-3);
  font-size: 7px;
  line-height: 1.6;
  flex-shrink: 0;
}
.ps-ov-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ===========================================================
   CLEG V2 — S3 Preview (carousel + active glow + description)
   =========================================================== */
.ps-cleg-preview {
  padding: 30px 36px 36px;
}

.ps-pv-carousel {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 18px;
}

.ps-pv-arrow {
  flex-shrink: 0;
  align-self: center;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(184, 138, 60, 0.4);
  background: transparent;
  color: var(--ps-gold-2);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ps-pv-arrow:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: var(--ps-purple-3);
  color: var(--ps-gold-1);
}

/* Horizontal scroll carousel — 5 cards visible per row, snap-aligned */
.ps-pv-row {
  --pv-visible: 5;
  --pv-gap: 16px;
  display: flex;
  gap: var(--pv-gap);
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding: 6px 4px 8px;
}
.ps-pv-row::-webkit-scrollbar { display: none; }

@media (max-width: 1100px) { .ps-pv-row { --pv-visible: 4; } }
@media (max-width: 860px)  { .ps-pv-row { --pv-visible: 3; } }
@media (max-width: 620px)  { .ps-pv-row { --pv-visible: 2; } }
@media (max-width: 420px)  { .ps-pv-row { --pv-visible: 1.2; } }

.ps-pv-card {
  position: relative;
  flex: 0 0 calc((100% - var(--pv-gap) * (var(--pv-visible) - 1)) / var(--pv-visible));
  scroll-snap-align: start;
  background: linear-gradient(180deg, #1a1224 0%, #0d0917 100%);
  border: 1.5px solid rgba(168, 85, 247, 0.25);
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ps-pv-card:hover {
  transform: translateY(-2px);
  border-color: var(--ps-purple-3);
}
.ps-pv-card.is-active {
  border-color: var(--ps-purple-2);
  box-shadow:
    0 0 0 2px rgba(168, 85, 247, 0.35),
    0 0 28px rgba(168, 85, 247, 0.55),
    inset 0 0 18px rgba(168, 85, 247, 0.18);
}

.ps-pv-img-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: #0d0917;
}
.ps-pv-img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ps-pv-card-title {
  display: block;
  font-family: var(--ps-font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ps-gold-2);
  font-size: 14px;
  line-height: 1.3;
  padding: 16px 14px 22px;
  min-height: 70px;
}

/* ---- Description box ---- */
.ps-pv-desc {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 22px;
  align-items: center;
  margin-top: 18px;
  padding: 20px 28px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 4px;
  background:
    radial-gradient(ellipse at top, rgba(168, 85, 247, 0.08), transparent 70%),
    linear-gradient(180deg, #150e21 0%, #0d0917 100%);
}
@media (max-width: 700px) {
  .ps-pv-desc { grid-template-columns: 1fr; text-align: center; }
}

.ps-pv-desc-icon {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
}
.ps-pv-desc-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px var(--ps-purple-glow));
}
@media (max-width: 700px) {
  .ps-pv-desc-icon { margin: 0 auto; }
}

.ps-pv-desc-body h3 {
  font-family: var(--ps-font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ps-gold-2);
  font-size: 16px;
  margin: 0 0 8px;
}
.ps-pv-desc-body p {
  color: #cfc2ac;
  font-size: 13.5px;
  line-height: 1.7;
  margin: 0;
}

/* ---- Pagination dots ---- */
.ps-pv-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.ps-pv-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(184, 138, 60, 0.25);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.ps-pv-dot:hover { background: rgba(184, 138, 60, 0.55); }
.ps-pv-dot.is-active {
  background: var(--ps-gold-2);
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(216, 160, 76, 0.6);
}

/* ===========================================================
   CLEG V2 — S4 Roadmap (horizontal timeline)
   =========================================================== */
.ps-cleg-roadmap {
  padding: 30px 36px 40px;
}

.ps-rm-timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  margin-top: 28px;
}
@media (max-width: 900px) {
  .ps-rm-timeline {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.ps-rm-phase {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 14px;
  text-align: center;
}

.ps-rm-badge {
  position: relative;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  z-index: 2;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
}
.ps-rm-badge-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.ps-rm-num {
  position: relative;
  z-index: 1;
  font-family: var(--ps-font-display);
  font-size: 22px;
  color: var(--ps-gold-2);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

/* Connector line + arrowhead going to the next phase */
.ps-rm-connector {
  position: absolute;
  top: 39px;
  left: calc(50% + 44px);
  right: calc(-50% + 44px);
  height: 2px;
  background: linear-gradient(90deg, var(--ps-gold-line), rgba(184, 138, 60, 0.35));
  z-index: 1;
}
.ps-rm-connector::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid var(--ps-gold-line);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
@media (max-width: 900px) {
  .ps-rm-connector { display: none; }
}

.ps-rm-body { width: 100%; }

.ps-rm-quarter {
  font-family: var(--ps-font-body);
  font-size: 12.5px;
  color: #b9a98a;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.ps-rm-title {
  font-family: var(--ps-font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ps-gold-2);
  font-size: 14px;
  margin-bottom: 10px;
}

.ps-rm-mini-divider {
  display: block;
  width: 80px;
  height: auto;
  margin: 0 auto 12px;
  opacity: 0.95;
}

.ps-rm-desc {
  color: #cfc2ac;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0;
}

.ps-rm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ps-rm-item {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  color: #d7cab2;
  font-size: 12.5px;
  line-height: 1.4;
}
.ps-rm-item-dot {
  flex-shrink: 0;
  font-size: 8px;
  color: var(--ps-gold-3);
}

/* ===========================================================
   CLEG V2 — Buy Now standalone button
   =========================================================== */
.ps-buy-row {
  display: flex;
  justify-content: center;
  margin: 40px 0 22px;
  position: relative;
}
.ps-buy-btn {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-block;
  line-height: 0;
  transition: transform 0.15s ease, filter 0.15s ease;
  filter: drop-shadow(0 14px 28px rgba(216, 160, 76, 0.25));
}
.ps-buy-btn img {
  display: block;
  width: clamp(260px, 38vw, 520px);
  height: auto;
}
.ps-buy-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: drop-shadow(0 18px 36px rgba(216, 160, 76, 0.45));
}
.ps-buy-btn:active { transform: translateY(0) scale(0.99); }

/* ===========================================================
   CLEG V2 — Purchase History
   =========================================================== */
.ps-cleg-history {
  margin-top: 20px;
  padding: 30px 36px 40px;
}

/* Small floating diamond ornament sitting on the top edge of the frame */
.ps-cleg-history::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 16px;
  height: 16px;
  background: var(--ps-purple-3);
  transform: translateX(-50%) rotate(45deg);
  box-shadow:
    0 0 16px var(--ps-purple-glow),
    inset 0 0 0 1px var(--ps-gold-2);
  z-index: 5;
}

.ps-h2-bookmark {
  display: inline-flex;
  align-items: center;
  color: var(--ps-gold-2);
  margin-right: -4px;
}

/* ---- Table header ---- */
.ps-hist-table-wrap {
  position: relative;
  margin-top: 18px;
}
.ps-hist-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.ps-hist-table thead th {
  font-family: var(--ps-font-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--ps-gold-2);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(184, 138, 60, 0.35);
}
.ps-hist-table thead th:first-child { padding-left: 20px; }
.ps-hist-table thead th:last-child  { padding-right: 20px; text-align: right; }

.ps-hist-table tbody td {
  padding: 14px 16px;
  font-size: 13px;
  color: #d8ccb6;
  border-bottom: 1px solid rgba(168, 85, 247, 0.12);
}
.ps-hist-table tbody tr:last-child td { border-bottom: 0; }

/* ---- Status pill ---- */
.ps-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.ps-status--completed { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.ps-status--pending   { background: rgba(216, 160, 76, 0.15); color: var(--ps-gold-2); }
.ps-status--failed    { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }

.ps-hist-action {
  background: transparent;
  border: 1px solid rgba(184, 138, 60, 0.45);
  color: var(--ps-gold-2);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ps-hist-action:hover {
  background: rgba(184, 138, 60, 0.1);
  color: var(--ps-gold-1);
  border-color: var(--ps-gold-2);
}

/* ---- Empty state ---- */
.ps-hist-empty {
  display: grid;
  grid-template-columns: auto 1px 1fr;
  gap: 28px;
  align-items: center;
  padding: 36px 24px 28px;
}
@media (max-width: 720px) {
  .ps-hist-empty { grid-template-columns: 1fr; text-align: center; }
  .ps-hist-empty-divider { display: none; }
}

.ps-hist-empty-icon {
  position: relative;
  width: 140px;
  height: 140px;
  display: grid;
  place-items: center;
}
/* Soft glow ring around the shield (purple sparkles in the reference) */
.ps-hist-empty-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(168, 85, 247, 0.22), transparent 60%);
}
.ps-hist-empty-halo::before,
.ps-hist-empty-halo::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(168, 85, 247, 0.35);
  border-radius: 50%;
}
.ps-hist-empty-halo::after {
  inset: 16px;
  border-color: rgba(184, 138, 60, 0.25);
  border-style: dotted;
}
.ps-hist-empty-icon img {
  position: relative;
  z-index: 1;
  width: 78px;
  height: auto;
  filter: drop-shadow(0 6px 16px var(--ps-purple-glow));
}

.ps-hist-empty-divider {
  width: 1px;
  height: 90px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(184, 138, 60, 0.4),
    transparent
  );
}

.ps-hist-empty-body h3 {
  font-family: var(--ps-font-display);
  color: var(--ps-gold-2);
  font-size: 20px;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}
.ps-hist-empty-body p {
  color: #b9a98a;
  font-size: 13.5px;
  line-height: 1.7;
  margin: 0 0 4px;
  max-width: 540px;
}

/* ---- History notice action button (Connect Wallet / Try Again) ---- */
.ps-hist-notice-action {
  margin-top: 14px;
}
.ps-hist-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  background: linear-gradient(180deg, #2a1a3a 0%, #160e22 100%);
  border: 1px solid var(--ps-gold-2);
  border-radius: 8px;
  color: var(--ps-gold-text);
  font-family: var(--ps-font-display);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.ps-hist-cta:hover {
  transform: translateY(-1px);
  border-color: var(--ps-gold-1);
  color: var(--ps-gold-1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 22px var(--ps-purple-glow);
}

/* Loading state: pulse the shield while history is fetched */
.ps-hist-empty.is-loading .ps-hist-empty-icon img {
  animation: ps-hist-pulse 1.2s ease-in-out infinite;
}
@keyframes ps-hist-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.96); }
  50%      { opacity: 1;    transform: scale(1.04); }
}

/* ===========================================================
   S6 + S7 + S8 — Contribution Packages page
   =========================================================== */

.ps-pkg-page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 140px 24px 80px;
}
@media (max-width: 768px) {
  .ps-pkg-page { padding: 88px 18px 64px; }
}

/* ---- Page header (Back button + title + tagline + rate pill) ---- */
.ps-pkg-page-head {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: start;
  gap: 16px;
  margin-bottom: 28px;
}
.ps-pkg-page-head-spacer {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}
@media (max-width: 700px) {
  .ps-pkg-page-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ps-pkg-page-head-spacer { justify-content: center; }
}

.ps-back-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--ps-gold-line);
  border-radius: 6px;
  color: var(--ps-gold-text);
  font-family: var(--ps-font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ps-back-btn:hover {
  background: rgba(216, 160, 76, 0.12);
  border-color: var(--ps-gold-2);
  color: var(--ps-gold-1);
}
.ps-back-icon { display: inline-flex; }

.ps-pkg-page-title-wrap { text-align: center; }
.ps-pkg-page-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 8px;
  font-family: var(--ps-font-display);
  font-size: clamp(26px, 3vw, 30px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fcebb4 0%, #d49f3e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ps-pkg-page-title .ps-h2-divider {
  width: 130px;
  max-width: 18vw;
}

.ps-pkg-page-sub {
  color: #cfc2ac;
  font-size: 14px;
  margin: 0 0 14px;
}

.ps-rate-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px;
  border: 1px solid var(--ps-gold-line);
  border-radius: 4px;
  font-family: var(--ps-font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ps-gold-2);
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(40, 28, 12, 0.18) 0%, rgba(20, 12, 30, 0.45) 100%);
}
.ps-rate-pill-icon {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 8px var(--ps-purple-glow));
}
.ps-rate-pill-sep {
  color: var(--ps-purple-3);
  font-size: 9px;
}
.ps-rate-pill-value {
  color: #f7eccf;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ---- Package list ---- */
.ps-pkg-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
}

.ps-pkg-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(120px, 1fr) 2fr minmax(120px, 0.9fr) 36px;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  background: linear-gradient(180deg, rgba(28, 18, 42, 0.65) 0%, rgba(16, 10, 26, 0.7) 100%);
  border: 1px solid rgba(110, 70, 160, 0.35);
  border-radius: 6px;
  color: #efe7d7;
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.ps-pkg-row:hover {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.12) inset;
}
.ps-pkg-row.is-selected {
  border-color: var(--ps-purple-3);
  box-shadow:
    0 0 0 1px var(--ps-purple-3) inset,
    0 0 28px rgba(168, 85, 247, 0.35);
}

/* VIP packages — gold-tinted to set them apart from standard tiers */
.ps-pkg-row.is-vip {
  border-color: rgba(184, 138, 60, 0.5);
  background: linear-gradient(180deg, rgba(48, 34, 20, 0.55) 0%, rgba(24, 16, 28, 0.7) 100%);
}
.ps-pkg-row.is-vip:hover {
  border-color: rgba(216, 160, 76, 0.7);
  box-shadow: 0 0 18px rgba(216, 160, 76, 0.14) inset;
}
.ps-pkg-row.is-vip.is-selected {
  border-color: var(--ps-gold-2, #d8a04c);
  box-shadow:
    0 0 0 1px var(--ps-gold-2, #d8a04c) inset,
    0 0 28px rgba(216, 160, 76, 0.4);
}
.ps-pkg-vip-tag {
  position: absolute;
  top: -9px;
  right: 16px;
  z-index: 3;
  padding: 2px 11px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #1a1208;
  background: linear-gradient(180deg, #f2cd7e 0%, #d8a04c 100%);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* ============================================================
   Packages toolbar + Cards/List view toggle
   ============================================================ */
.ps-pkg-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.ps-pkg-toolbar-label {
  font-family: var(--ps-font-display);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ps-gold-text-dim);
}
.ps-pkg-view-toggle {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid rgba(110, 70, 160, 0.4);
  border-radius: 10px;
  background: rgba(16, 10, 26, 0.6);
}
.ps-pvt-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--ps-gold-text-dim);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.ps-pvt-btn:hover { color: var(--ps-gold-text); }
.ps-pvt-btn.is-active {
  color: #efe7d7;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.55) 0%, rgba(76, 29, 149, 0.55) 100%);
  box-shadow: 0 0 0 1px var(--ps-purple-3) inset, 0 0 14px rgba(168, 85, 247, 0.25);
}
.ps-pvt-btn svg { display: block; }
@media (max-width: 480px) {
  .ps-pkg-toolbar-label { display: none; }
  .ps-pkg-toolbar { justify-content: flex-end; }
}

/* ============================================================
   Package cards (grid variant)
   ============================================================ */
.ps-pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.ps-pkg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, rgba(28, 18, 42, 0.7) 0%, rgba(15, 9, 24, 0.8) 100%);
  border: 1px solid rgba(110, 70, 160, 0.35);
  border-radius: 12px;
  color: #efe7d7;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.ps-pkg-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(168, 85, 247, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.ps-pkg-card:hover {
  border-color: rgba(168, 85, 247, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.ps-pkg-card:hover::before { opacity: 1; }
.ps-pkg-card.is-selected {
  border-color: var(--ps-purple-3);
  box-shadow: 0 0 0 1px var(--ps-purple-3) inset, 0 0 26px rgba(168, 85, 247, 0.35);
}
.ps-pkg-card.is-selected::before { opacity: 1; }

.ps-pkg-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ps-pkg-card-tier {
  font-family: var(--ps-font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ps-gold-text);
}
.ps-pkg-card-bonus {
  flex-shrink: 0;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ps-purple-1);
  background: rgba(124, 58, 237, 0.22);
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 20px;
}
.ps-pkg-card-cleg {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.ps-pkg-card-cleg-num {
  font-family: var(--ps-font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
}
.ps-pkg-card-cleg-unit {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ps-gold-text-dim);
}
.ps-pkg-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid rgba(110, 70, 160, 0.25);
}
.ps-pkg-card-bnb {
  font-size: 15px;
  font-weight: 600;
  color: var(--ps-gold-1);
}
.ps-pkg-card-usd {
  font-size: 12px;
  color: var(--ps-gold-text-dim);
}
.ps-pkg-card-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--ps-gold-text);
  background: rgba(184, 138, 60, 0.1);
  border: 1px solid rgba(184, 138, 60, 0.25);
  border-radius: 7px;
}
.ps-pkg-card-summary-icon {
  display: inline-flex;
  color: var(--ps-gold-3);
}

/* Always-visible bonus metadata at the end of the card */
.ps-pkg-card-bonus-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid rgba(110, 70, 160, 0.25);
}
.ps-pkg-card-bonus-meta-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ps-gold-text-dim);
}
.ps-pkg-card-bonus-meta-pct {
  font-weight: 700;
  color: var(--ps-purple-1);
}
.ps-pkg-card.is-vip .ps-pkg-card-bonus-meta-pct { color: var(--ps-gold-1); }
.ps-pkg-card-bonus-meta-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ps-pkg-card-bonus-meta-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  line-height: 1.35;
  color: #cdc2d8;
}
.ps-pkg-card-bonus-meta-dot {
  flex-shrink: 0;
  font-size: 8px;
  color: var(--ps-purple-2);
}
.ps-pkg-card.is-vip .ps-pkg-card-bonus-meta-dot { color: var(--ps-gold-3); }

.ps-pkg-card-check {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ps-purple-4);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.ps-pkg-card.is-selected .ps-pkg-card-check {
  opacity: 1;
  transform: scale(1);
}
.ps-pkg-card.is-selected .ps-pkg-card-top { padding-right: 28px; }

/* VIP cards — gold accent */
.ps-pkg-card-vip {
  flex-shrink: 0;
  padding: 1px 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--ps-gold-1);
  background: rgba(184, 138, 60, 0.14);
  border: 1px solid rgba(216, 160, 76, 0.5);
  border-radius: 20px;
}
.ps-pkg-card.is-vip {
  border-color: rgba(184, 138, 60, 0.5);
  background: linear-gradient(180deg, rgba(48, 34, 20, 0.6) 0%, rgba(20, 13, 24, 0.8) 100%);
}
.ps-pkg-card.is-vip:hover {
  border-color: rgba(216, 160, 76, 0.7);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(216, 160, 76, 0.14);
}
.ps-pkg-card.is-vip.is-selected {
  border-color: var(--ps-gold-2);
  box-shadow: 0 0 0 1px var(--ps-gold-2) inset, 0 0 26px rgba(216, 160, 76, 0.4);
}
.ps-pkg-card.is-vip .ps-pkg-card-check {
  background: var(--ps-gold-3);
  color: #1a1208;
  box-shadow: 0 0 12px rgba(216, 160, 76, 0.55);
}
.ps-pkg-card.is-vip .ps-pkg-card-bonus {
  color: var(--ps-gold-1);
  background: rgba(184, 138, 60, 0.18);
  border-color: rgba(216, 160, 76, 0.5);
}
@media (max-width: 420px) {
  .ps-pkg-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ps-pkg-card { padding: 14px 13px 13px; }
  .ps-pkg-card-cleg-num { font-size: 20px; }
}
@media (max-width: 720px) {
  .ps-pkg-row {
    /* minmax(0, 1fr) lets the middle column shrink below the CLEG number's
       intrinsic width so the bonus/info column can't be pushed off-screen. */
    grid-template-columns: 30px minmax(0, 1fr) auto;
    grid-template-areas:
      "radio bnb info"
      "radio receive bonus";
    gap: 8px 12px;
    padding: 14px 16px;
  }
  .ps-pkg-row > .ps-pkg-radio   { grid-area: radio; }
  .ps-pkg-row > .ps-pkg-bnb     { grid-area: bnb; min-width: 0; }
  .ps-pkg-row > .ps-pkg-receive { grid-area: receive; min-width: 0; }
  .ps-pkg-row > .ps-pkg-bonus-wrap { grid-area: bonus; }
  .ps-pkg-row > .ps-pkg-info    { grid-area: info; justify-self: end; }
}

/* Slimmer bonus trigger on phones so the row fits without clipping */
@media (max-width: 420px) {
  .ps-pkg-bonus-trigger { padding: 6px 12px; letter-spacing: 0.12em; }
}

.ps-pkg-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--ps-purple-3);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.3);
}
.ps-pkg-radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.ps-pkg-row.is-selected .ps-pkg-radio-dot {
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.ps-pkg-bnb {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.ps-pkg-bnb-num {
  font-family: var(--ps-font-display);
  font-size: clamp(20px, 2vw, 28px);
  color: var(--ps-gold-2);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ps-pkg-bnb-label {
  font-family: var(--ps-font-display);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: #d9c896;
}

.ps-pkg-receive {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-pkg-receive-label {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: #b9a98a;
  text-transform: uppercase;
}
.ps-pkg-receive-value {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.ps-pkg-cleg {
  font-family: var(--ps-font-display);
  font-size: clamp(18px, 1.8vw, 24px);
  color: var(--ps-purple-2);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ps-pkg-cleg-unit {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #c8b7df;
}

.ps-pkg-bonus-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ps-pkg-bonus-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 22px;
  border: 1px solid var(--ps-purple-3);
  border-radius: 4px;
  background: transparent;
  color: var(--ps-purple-2);
  font-family: var(--ps-font-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: help;
  transition: background 0.15s ease, color 0.15s ease;
}
.ps-pkg-bonus-trigger:hover,
.ps-pkg-bonus-trigger:focus-visible {
  background: rgba(168, 85, 247, 0.18);
  color: var(--ps-purple-1);
  outline: none;
}

.ps-pkg-info {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(168, 85, 247, 0.55);
  color: var(--ps-purple-2);
  cursor: help;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ps-pkg-info:hover {
  background: rgba(168, 85, 247, 0.18);
  color: var(--ps-purple-1);
  border-color: var(--ps-purple-2);
}

/* ---- S7 Bonus tooltip ---- */
.ps-bonus-tip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 290px;
  max-width: 360px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #1c1029 0%, #120a1f 100%);
  border: 1px solid var(--ps-purple-3);
  border-radius: 6px;
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.25) inset,
    0 18px 40px rgba(0, 0, 0, 0.7);
  color: #e6d9c2;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 50;
  text-align: left;
  cursor: default;
}
.ps-bonus-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--ps-purple-3);
}
.ps-pkg-bonus-wrap:hover .ps-bonus-tip,
.ps-pkg-bonus-trigger:focus-visible + .ps-bonus-tip,
.ps-pkg-bonus-wrap:focus-within .ps-bonus-tip,
.ps-ss-bonus-trigger:hover .ps-bonus-tip,
.ps-ss-bonus-trigger:focus-visible .ps-bonus-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-2px);
  transition: opacity 0.15s ease, transform 0.18s ease, visibility 0s linear 0s;
}

.ps-bonus-tip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ps-font-display);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--ps-purple-1);
  margin-bottom: 10px;
}
.ps-bonus-tip-gift {
  display: inline-flex;
  color: var(--ps-purple-2);
}
.ps-bonus-tip-body {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  align-items: start;
}
.ps-bonus-tip-alloc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.ps-bonus-tip-pct {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--ps-purple-3);
  border-radius: 4px;
  font-family: var(--ps-font-display);
  font-size: 16px;
  color: var(--ps-gold-2);
  background: rgba(168, 85, 247, 0.08);
  letter-spacing: 0.04em;
}
.ps-bonus-tip-alloc-label {
  font-family: var(--ps-font-display);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #c8b7df;
  text-transform: uppercase;
  line-height: 1.25;
}
.ps-bonus-tip-inc-head {
  font-family: var(--ps-font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ps-gold-text-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ps-bonus-tip-inc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ps-bonus-tip-inc li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #e6d9c2;
  font-size: 12.5px;
  line-height: 1.45;
  margin-bottom: 4px;
}
.ps-bonus-tip-dot {
  color: var(--ps-purple-3);
  font-size: 8px;
  line-height: 1.6;
}

/* ---- S8 Stake Summary ---- */
.ps-stake-summary {
  margin-top: 24px;
  padding: 26px 32px 32px;
}
.ps-ss-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  margin-bottom: 22px;
}
.ps-ss-title {
  font-family: var(--ps-font-display);
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: 0.18em;
  color: var(--ps-gold-2);
  text-transform: uppercase;
  margin: 0;
}
.ps-ss-head .ps-h2-divider { width: 140px; max-width: 22vw; }

.ps-ss-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 26px;
  align-items: stretch;
}
@media (max-width: 800px) {
  .ps-ss-grid { grid-template-columns: 1fr; }
  .ps-stake-summary { padding: 22px 18px 24px; }
}

.ps-ss-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(15, 9, 24, 0.6);
  border: 1px solid rgba(110, 70, 160, 0.25);
  border-radius: 6px;
}
.ps-ss-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-bottom: 1px dashed rgba(110, 70, 160, 0.18);
}
.ps-ss-row:last-child { border-bottom: 0; }
.ps-ss-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(168, 85, 247, 0.55);
  color: var(--ps-purple-2);
  flex-shrink: 0;
}
.ps-ss-label {
  color: #d8ccb6;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.ps-ss-value {
  color: var(--ps-gold-2);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-align: right;
}

.ps-ss-bonus-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  margin-left: 8px;
  border: 1px solid var(--ps-purple-3);
  border-radius: 3px;
  background: transparent;
  color: var(--ps-purple-2);
  font-family: var(--ps-font-display);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: help;
}
.ps-ss-bonus-trigger:hover {
  background: rgba(168, 85, 247, 0.18);
  color: var(--ps-purple-1);
}

.ps-ss-reward-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1.5px dashed rgba(168, 85, 247, 0.45);
  border-radius: 6px;
  padding: 14px;
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.08), transparent 70%);
}
.ps-ss-reward-img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  height: auto;
  filter: drop-shadow(0 14px 30px rgba(168, 85, 247, 0.35));
}

.ps-ss-disclaimer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 22px auto 18px;
  font-size: 12.5px;
  color: #b9a98a;
  width: 100%;
  justify-content: center;
  text-align: center;
}
.ps-ss-disc-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(168, 85, 247, 0.55);
  color: var(--ps-purple-2);
  flex-shrink: 0;
}

.ps-ss-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

/* Big BUY button (variant of the standalone Buy Now) */
.ps-buy-btn-big {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.ps-buy-btn-big img {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
}
.ps-buy-btn-big .ps-buy-btn-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--ps-font-display);
  font-size: clamp(26px, 2.6vw, 34px);
  letter-spacing: 0.16em;
  color: #2e1a05;
  /* Visually hidden — the asset already contains "BUY NOW" text */
  opacity: 0;
}
.ps-buy-btn-big:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 12px 30px rgba(216, 160, 76, 0.45));
}

.ps-cancel-btn {
  background: transparent;
  border: 1px solid rgba(184, 138, 60, 0.5);
  color: #c8b780;
  font-family: var(--ps-font-display);
  font-size: 13px;
  letter-spacing: 0.22em;
  padding: 10px 36px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ps-cancel-btn:hover {
  background: rgba(216, 160, 76, 0.12);
  border-color: var(--ps-gold-2);
  color: var(--ps-gold-text);
}

/* ===========================================================
   Web3 integration — wallet pill, modal scaffold, buy modal
   =========================================================== */

/* ---- Hub topbar containing the wallet pill on the entry page ---- */
.ps-hub-topbar {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  margin: 0 0 22px;
}

/* On the CLEG sub-pages, the back row already lives at the top — flex the pill to the right */
.ps-sub-back-row {
  justify-content: space-between !important;
  align-items: center;
}

/* ---- Wallet pill ---- */
.ps-wallet-pill-wrap {
  position: relative;
  display: inline-flex;
}
.ps-wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: linear-gradient(180deg, #1f1730 0%, #130d1f 100%);
  border: 1px solid var(--ps-gold-line);
  border-radius: 6px;
  color: var(--ps-gold-text);
  font-family: var(--ps-font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  outline: none;
}
.ps-wallet-pill:hover {
  background: rgba(216, 160, 76, 0.12);
  border-color: var(--ps-gold-2);
  color: var(--ps-gold-1);
}
.ps-wallet-pill.is-connected {
  border-color: var(--ps-gold-2);
  background: linear-gradient(180deg, #251b3a 0%, #170f24 100%);
}
.ps-wp-icon { display: inline-flex; }
.ps-wp-label { line-height: 1; }
.ps-wp-caret {
  display: inline-flex;
  transition: transform 0.18s ease;
}
.ps-wallet-pill-wrap.is-open .ps-wp-caret { transform: rotate(180deg); }

/* ---- Wallet menu dropdown ---- */
.ps-wallet-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  background: linear-gradient(180deg, #1a1228 0%, #110b1c 100%);
  border: 1px solid var(--ps-gold-line);
  border-radius: 6px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.7);
  padding: 14px;
  z-index: 10;
}
.ps-wm-head { margin-bottom: 12px; }
.ps-wm-addr {
  font-family: monospace;
  font-size: 12px;
  color: var(--ps-gold-text);
  word-break: break-all;
  line-height: 1.5;
}
.ps-wm-type {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: #b9a98a;
  text-transform: uppercase;
  margin-top: 4px;
}
.ps-wm-balances {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid rgba(184, 138, 60, 0.25);
  border-bottom: 1px solid rgba(184, 138, 60, 0.25);
  margin-bottom: 12px;
}
.ps-wm-bal {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #d8ccb6;
}
.ps-wm-bal > span:first-child { color: #b9a98a; letter-spacing: 0.12em; }
.ps-wm-actions { display: grid; gap: 6px; }
.ps-wm-btn {
  background: transparent;
  border: 1px solid var(--ps-gold-line);
  color: var(--ps-gold-text);
  font-family: var(--ps-font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}
.ps-wm-btn:hover { background: rgba(216, 160, 76, 0.12); color: var(--ps-gold-1); }
.ps-wm-btn-danger { border-color: rgba(180, 80, 80, 0.5); color: #e8a4a4; }
.ps-wm-btn-danger:hover { background: rgba(180, 80, 80, 0.12); color: #ffb8b8; }

/* ---- Modal scaffold ---- */
body.ps-modal-locked { overflow: hidden; }
.ps-modal-root {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 5, 12, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  animation: psModalFadeIn 0.18s ease both;
}
@keyframes psModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ps-modal {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(184, 138, 60, 0.5) transparent;
  animation: psModalSlide 0.22s ease both;
}
.ps-modal::-webkit-scrollbar { width: 8px; }
.ps-modal::-webkit-scrollbar-track { background: transparent; }
.ps-modal::-webkit-scrollbar-thumb {
  background: rgba(184, 138, 60, 0.45);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.ps-modal::-webkit-scrollbar-thumb:hover { background: rgba(184, 138, 60, 0.7); background-clip: padding-box; }
@keyframes psModalSlide {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.ps-modal-card {
  padding: 32px 36px;
}
@media (max-width: 600px) {
  .ps-modal-card { padding: 24px 20px; }
}
.ps-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ps-gold-2);
  cursor: pointer;
  border-radius: 50%;
  transition: color 0.15s ease, background 0.15s ease;
}
.ps-modal-close:hover { color: var(--ps-gold-1); background: rgba(216, 160, 76, 0.12); }

.ps-modal-title {
  font-family: var(--ps-font-display);
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  background: linear-gradient(180deg, #fcebb4 0%, #d49f3e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 4px 0 6px;
}
.ps-modal-sub {
  text-align: center;
  color: #cfc2ac;
  font-size: 13.5px;
  margin: 0 0 20px;
}
.ps-modal-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  font-size: 13px;
  color: #b9a98a;
  width: 100%;
}
.ps-modal-error {
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(180, 80, 80, 0.4);
  background: rgba(180, 80, 80, 0.12);
  color: #f3c0c0;
  border-radius: 4px;
  font-size: 12.5px;
  text-align: center;
}

/* ---- Spinner ---- */
.ps-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(216, 160, 76, 0.25);
  border-top-color: var(--ps-gold-2);
  border-radius: 50%;
  animation: psSpin 0.85s linear infinite;
}
@keyframes psSpin { to { transform: rotate(360deg); } }

/* ---- Wallet selector ---- */
.ps-wallet-options {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.ps-wallet-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #1c1429 0%, #110b1c 100%);
  border: 1px solid var(--ps-gold-line);
  color: var(--ps-gold-text);
  font-family: inherit;
  cursor: pointer;
  border-radius: 6px;
  text-align: left;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.ps-wallet-option:hover:not([disabled]) {
  transform: translateY(-1px);
  border-color: var(--ps-gold-2);
  background: rgba(216, 160, 76, 0.08);
}
.ps-wallet-option[disabled] { opacity: 0.6; cursor: not-allowed; }
.ps-wo-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ps-gold-line);
  border-radius: 6px;
  color: var(--ps-gold-2);
}
.ps-wo-text { display: flex; flex-direction: column; gap: 2px; }
.ps-wo-name {
  font-family: var(--ps-font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
}
.ps-wo-sub { font-size: 12px; color: #b9a98a; }

/* ---- Buy modal ---- */
.ps-buy-modal { max-width: 580px; }
.ps-bm-summary {
  padding: 16px 18px;
  border: 1px solid rgba(184, 138, 60, 0.35);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(60, 30, 90, 0.18) 0%, rgba(10, 6, 16, 0.5) 100%);
  margin: 8px 0 18px;
}
.ps-bm-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.ps-bm-tier {
  font-family: var(--ps-font-display);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ps-gold-1);
}
.ps-bm-bonus {
  font-family: var(--ps-font-display);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  padding: 4px 10px;
  border: 1px solid var(--ps-purple-3);
  border-radius: 4px;
  color: var(--ps-purple-2);
  background: rgba(168, 85, 247, 0.12);
}
.ps-bm-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ps-bm-pay, .ps-bm-recv {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.ps-bm-num {
  font-family: var(--ps-font-display);
  font-size: 26px;
  background: linear-gradient(180deg, #fcebb4 0%, #d49f3e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.ps-bm-unit {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #b9a98a;
  margin-top: 2px;
}
.ps-bm-usd {
  font-size: 12px;
  color: #b9a98a;
  margin-top: 4px;
}
.ps-bm-arrow { color: var(--ps-gold-2); flex-shrink: 0; }

/* ---- Pay token tabs + balance ---- */
.ps-bm-pay-section { margin-bottom: 18px; }
.ps-bm-pay-label {
  font-family: var(--ps-font-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b9a98a;
  margin-bottom: 8px;
}
.ps-pay-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.ps-pay-tab {
  padding: 10px 12px;
  background: linear-gradient(180deg, #1c1429 0%, #110b1c 100%);
  border: 1px solid var(--ps-gold-line);
  color: var(--ps-gold-text);
  font-family: var(--ps-font-display);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ps-pay-tab:hover { border-color: var(--ps-gold-2); color: var(--ps-gold-1); }
.ps-pay-tab.is-active {
  background: linear-gradient(180deg, #2a1a3a 0%, #160e22 100%);
  border-color: var(--ps-gold-1);
  color: var(--ps-gold-1);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 150, 0.14), 0 0 18px var(--ps-purple-glow);
}

.ps-bm-balance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12.5px;
  color: #cfc2ac;
  padding: 8px 12px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.18);
}
.ps-bm-balance-val { color: var(--ps-gold-text); font-family: var(--ps-font-display); letter-spacing: 0.08em; }
.ps-bm-balance.is-low { border: 1px solid rgba(180, 80, 80, 0.4); background: rgba(180, 80, 80, 0.08); }
.ps-bm-balance-warn { color: #f3c0c0; font-size: 11.5px; flex-basis: 100%; }

.ps-bm-amount {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(184, 138, 60, 0.35);
  border-radius: 4px;
}
.ps-bm-amount > span:first-child {
  font-family: var(--ps-font-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #b9a98a;
}
.ps-bm-amount-val {
  font-family: var(--ps-font-display);
  font-size: 17px;
  color: var(--ps-gold-1);
  letter-spacing: 0.08em;
}

/* ---- VIP upsell row ---- */
.ps-vip-upsell {
  margin: 6px 0 18px;
  padding: 12px;
  border: 1px dashed rgba(168, 85, 247, 0.4);
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.06);
}
.ps-vip-upsell-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ps-font-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ps-purple-2);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ps-vip-upsell-icon { display: inline-flex; }
.ps-vip-upsell-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.ps-vip-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px;
  background: linear-gradient(180deg, #1a1130 0%, #0e0719 100%);
  border: 1px solid var(--ps-gold-line);
  border-radius: 4px;
  color: var(--ps-gold-text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}
.ps-vip-chip:hover {
  border-color: var(--ps-gold-2);
  transform: translateY(-1px);
}
.ps-vip-chip.is-selected {
  border-color: var(--ps-purple-2);
  box-shadow: 0 0 14px var(--ps-purple-glow);
}
.ps-vip-chip-tier {
  font-family: var(--ps-font-display);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--ps-purple-2);
}
.ps-vip-chip-bnb {
  font-family: var(--ps-font-display);
  font-size: 14px;
  color: var(--ps-gold-1);
  margin-top: 2px;
}
.ps-vip-chip-cleg {
  font-size: 11px;
  color: #cfc2ac;
}
.ps-vip-chip-bonus {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ps-purple-2);
  margin-top: 2px;
}
@media (max-width: 520px) {
  .ps-vip-upsell-row { grid-template-columns: 1fr; }
}

/* ---- Buy modal actions ---- */
.ps-bm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}
.ps-bm-confirm {
  padding: 14px 32px;
  background: linear-gradient(180deg, #2a1a3a 0%, #160e22 100%);
  border: 1px solid var(--ps-gold-2);
  border-radius: 6px;
  color: var(--ps-gold-text);
  font-family: var(--ps-font-display);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 150, 0.08),
    0 0 18px var(--ps-purple-glow);
}
.ps-bm-confirm:hover:not([disabled]) {
  transform: translateY(-1px);
  border-color: var(--ps-gold-1);
  color: var(--ps-gold-1);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 150, 0.16), 0 0 28px var(--ps-purple-glow);
}
.ps-bm-confirm[disabled] { opacity: 0.5; cursor: not-allowed; }
.ps-bm-disclaimer {
  margin: 14px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: #8e7f64;
  line-height: 1.5;
}

/* ---- Pending / Success / Error states ---- */
.ps-buy-status {
  text-align: center;
  padding-top: 36px;
  padding-bottom: 28px;
}
.ps-status-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.ps-status-icon .ps-spinner {
  width: 44px;
  height: 44px;
  border-width: 3px;
}
.ps-status-icon-ok {
  color: #6cd24f;
  filter: drop-shadow(0 0 14px rgba(108, 210, 79, 0.45));
}
.ps-status-icon-err {
  color: #e88080;
  filter: drop-shadow(0 0 14px rgba(232, 128, 128, 0.35));
}
.ps-tx {
  margin: 12px auto 18px;
  text-align: center;
}
.ps-tx-link {
  color: var(--ps-gold-2);
  font-family: var(--ps-font-display);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-decoration: none;
  border-bottom: 1px solid rgba(216, 160, 76, 0.4);
  padding-bottom: 2px;
}
.ps-tx-link:hover { color: var(--ps-gold-1); border-bottom-color: var(--ps-gold-1); }

.ps-modal-error-msg {
  word-break: break-word;
  color: #f3c0c0;
}

/* ---- Mobile pill tweaks ---- */
@media (max-width: 520px) {
  .ps-wp-label { display: none; }
  .ps-wallet-pill { padding: 8px 12px; }
  .ps-wallet-menu { min-width: 240px; right: -8px; }
}

/* ===========================================================
   Responsive refinements (tablet & mobile)
   -----------------------------------------------------------
   The ornate section headings (.ps-cleg-h2 / .ps-ss-head) place a
   `white-space: nowrap` title between two `22vw` decorative dividers.
   On narrow viewports the rigid title (e.g. "Chain of Legends V2
   Overview" is ~395px) plus the dividers grow wider than the screen
   and get clipped by the page's `overflow: hidden`. These rules let
   the title wrap, shrink the dividers, and reclaim frame padding so
   every heading fits. Desktop layout (>768px) is untouched.
   =========================================================== */

/* ---- Section headings with flanking dividers ---- */
@media (max-width: 768px) {
  .ps-cleg-h2,
  .ps-ss-head,
  .ps-pkg-page-title {
    flex-wrap: nowrap;
    gap: 12px;
    max-width: 100%;
    align-items: center;
  }
  .ps-cleg-h2 .ps-h2-text,
  .ps-ss-head .ps-ss-title,
  .ps-pkg-page-title > span {
    white-space: normal;     /* allow long titles to wrap instead of overflowing */
    min-width: 0;
    flex: 0 1 auto;
  }
  .ps-cleg-h2 .ps-h2-divider,
  .ps-ss-head .ps-h2-divider,
  .ps-pkg-page-title .ps-h2-divider {
    width: 48px;
    max-width: 48px;
    flex: 0 0 auto;
  }
  /* The page-head is a single-column grid here; keep its cells from being
     stretched past the viewport by the inline-flex title's min-content. */
  .ps-pkg-page-head,
  .ps-pkg-page-title-wrap { min-width: 0; max-width: 100%; }
}

@media (max-width: 480px) {
  /* Decorative dividers are aria-hidden — drop them so the wrapped
     title gets the full content width. */
  .ps-cleg-h2 .ps-h2-divider,
  .ps-ss-head .ps-h2-divider,
  .ps-pkg-page-title .ps-h2-divider { display: none; }
  .ps-cleg-h2,
  .ps-ss-head,
  .ps-pkg-page-title { gap: 8px; }
}

/* ---- Private-sale rate pill: wrap instead of clipping on tiny screens ---- */
@media (max-width: 420px) {
  .ps-rate-pill {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 8px 14px;
    gap: 4px 10px;
  }
  .ps-rate-pill-sep { display: none; }
}

/* ---- Bonus tooltip: keep within the viewport if focus-triggered on touch ---- */
@media (max-width: 480px) {
  .ps-bonus-tip {
    min-width: 0;
    max-width: min(86vw, 320px);
  }
}

/* ---- Reclaim oversized ornate-frame padding on small screens ---- */
@media (max-width: 600px) {
  .ps-cleg-overview,
  .ps-cleg-preview,
  .ps-cleg-roadmap,
  .ps-cleg-history { padding-left: 18px; padding-right: 18px; }
  .ps-ornate-frame { padding-left: 18px; padding-right: 18px; }
}

/* ===========================================================
   Purchase history table
   =========================================================== */

/* When there are no rows the markup renders `<table><thead></table>`
   followed by the empty-state block, leaving the column header floating
   above the graphic. The thead is then the table's last child — hide it
   so the empty state reads cleanly on every viewport. */
.ps-hist-table thead:last-child { display: none; }

/* A populated 6-column table would crush/overlap on a phone. Let it
   scroll horizontally instead, keeping each column legible. Scoped with
   :has(tbody) so the empty state never triggers a phantom scrollbar. */
@media (max-width: 720px) {
  .ps-hist-table-wrap:has(tbody) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ps-hist-table:has(tbody) { min-width: 560px; }
}
