/* ==========================================================================
   Nightshift — Tebex theme for FiveM roleplay stores
   Colours marked "theme setting" are overridden from the template settings.
   ========================================================================== */

:root {
  /* theme settings */
  --accent: #a06bff;
  --accent-ink: #0c0a16;
  --deal: #ffb547;
  --bg: #0c0a16;
  /* panels and lines take a faint tint from the accent */
  --tint: color-mix(in srgb, var(--accent) 45%, #ffffff);

  /* derived surfaces */
  --surface: color-mix(in srgb, var(--bg), var(--tint) 5%);
  --raised: color-mix(in srgb, var(--bg), var(--tint) 9%);
  --line: color-mix(in srgb, var(--bg), var(--tint) 15%);
  --line-strong: color-mix(in srgb, var(--bg), var(--tint) 25%);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --deal-soft: color-mix(in srgb, var(--deal) 16%, transparent);
  --ok: #3ddc97;
  --ok-soft: color-mix(in srgb, #3ddc97 14%, transparent);
  --danger: #ff5d6c;
  --danger-soft: color-mix(in srgb, #ff5d6c 14%, transparent);

  --text: #e9f0fa;
  --muted: #98a8c4;
  --faint: #6b7c99;

  --display: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-panel: 18px;
  --r-card: 14px;
  --r-btn: 10px;
  --r-pill: 999px;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --shadow-overlay: 0 28px 70px -18px rgb(0 0 0 / 0.7), 0 0 0 1px var(--line);

  /* Tebex's required legal footer, styled to match */
  --tebex-legal-footer-background-color: var(--bg);
  --tebex-legal-footer-text-color: var(--muted);
  --tebex-legal-footer-border-color: var(--line);
  --tebex-legal-footer-max-width: var(--wrap);
  --tebex-legal-footer-logo-color: var(--muted);

  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: 0.005em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 20px; height: 20px; flex: none; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 28px; height: 28px; }
.ico-xl { width: 48px; height: 48px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: var(--r-btn); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-btn);
  font: 600 1.05rem/1 var(--display); letter-spacing: 0.02em;
  cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, filter 0.15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1.2rem; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 0.98rem; }
.btn-block { width: 100%; }
.btn-square { width: 44px; padding: 0; }
.btn-lg.btn-square { width: 52px; }
.btn-in-cart { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.btn-in-cart .swap { display: none; }
.btn-in-cart:hover { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-in-cart:hover > span:not(.swap), .btn-in-cart:hover .ico { display: none; }
.btn-in-cart:hover .swap { display: inline; }
.btn.is-disabled { opacity: 0.45; pointer-events: none; }

.icon-btn {
  display: inline-grid; place-items: center; position: relative;
  width: 40px; height: 40px; border: 0; border-radius: var(--r-btn);
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn--danger:hover { background: var(--danger-soft); color: var(--danger); }

.chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  font: 600 0.95rem/1 var(--body); cursor: pointer;
}
.chip-btn:hover { border-color: var(--accent); }

.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- forms ---------- */
label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.95rem; }
input[type="text"], input[type="search"], input[type="number"], input[type="email"], select, textarea {
  width: 100%; height: 46px; padding: 0 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-btn);
  font: 400 1rem var(--body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { height: auto; padding: 12px 14px; }
select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: var(--faint); }
.input-row { display: flex; gap: 8px; }
.input-row > input { flex: 1; min-width: 0; }
.input-row--suffix { gap: 0; }
.input-row--suffix > input { border-radius: var(--r-btn) 0 0 var(--r-btn); }
.suffix { display: grid; place-items: center; padding: 0 14px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--r-btn) var(--r-btn) 0; color: var(--muted); font-weight: 600; background: var(--raised); }
.field + .field { margin-top: 20px; }
.hint { margin-top: 6px; font-size: 0.88rem; color: var(--faint); }
.fine { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--faint); }
.fine a { color: var(--accent); }

/* ---------- announcement + header ---------- */
.announce { background: var(--deal-soft); border-bottom: 1px solid color-mix(in srgb, var(--deal) 30%, transparent); font-size: 0.93rem; }
.announce-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; min-height: 40px; padding-block: 6px; text-align: center; }
.announce .ico { color: var(--deal); width: 16px; height: 16px; }
.announce a { color: var(--deal); font-weight: 600; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
/* blur lives on a pseudo-element: a backdrop-filter on the header itself would trap the fixed mobile menu inside it */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header.menu-open { z-index: 75; }
.header-row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; min-width: 0; }
.brand-logo { height: 38px; width: auto; max-width: 160px; object-fit: contain; }
.brand-name { font: 700 1.55rem/1 var(--display); letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.main-nav-head, .main-nav-foot { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  height: 38px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  font: 600 1.08rem/1 var(--display); letter-spacing: 0.02em; cursor: pointer; white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.is-active, .page--home .nav-home { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 8px 8px 0 0; }

.nav-drop { position: relative; }
.nav-drop .ico-sm { transition: transform 0.2s; }
.nav-drop.is-open > button .ico-sm { transform: rotate(180deg); }
.drop-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 50;
  min-width: 210px; padding: 6px;
  background: var(--raised); border-radius: 12px; box-shadow: var(--shadow-overlay);
  display: none;
}
.drop-menu--right { left: auto; right: 0; }
.drop-menu--up { top: auto; bottom: calc(100% + 8px); }
.nav-drop.is-open > .drop-menu { display: block; }
.drop-link { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.drop-link:hover, .drop-link.is-active { color: var(--text); background: var(--line); }
.drop-note { padding: 8px 12px 10px; font-size: 0.9rem; color: var(--faint); border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.drop-note strong { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.count-badge { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font: 700 0.72rem/17px var(--body); text-align: center; }
.account-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 4px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: transparent; cursor: pointer; }
.account-btn:hover { border-color: var(--accent); }
.account-name { font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 1rem/1 var(--display); flex: none; }
.avatar--sm { width: 30px; height: 30px; font-size: 0.95rem; }
.avatar--lg { width: 52px; height: 52px; font-size: 1.5rem; }
.cart-btn { padding: 0 8px 0 12px; }
.cart-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--accent-ink) 22%, transparent); font: 700 0.82rem/1 var(--body); }
.menu-btn { display: none; }

@media (max-width: 1024px) {
  .menu-btn { display: inline-grid; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; z-index: 70;
    width: min(360px, 88vw); height: 100dvh;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 24px; overflow-y: auto;
    background: var(--surface); border-left: 1px solid var(--line);
    transform: translateX(100%); visibility: hidden;
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.26s;
  }
  .main-nav.is-open { transform: none; visibility: visible; transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .main-nav-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); font: 700 1.3rem var(--display); }
  .main-nav-foot { display: block; margin-top: auto; padding-top: 20px; }
  .nav-link { width: 100%; height: 46px; justify-content: space-between; font-size: 1.25rem; }
  .nav-link.is-active, .page--home .nav-home { box-shadow: inset 3px 0 0 var(--accent); border-radius: 0 8px 8px 0; }
  .main-nav .drop-menu { position: static; box-shadow: none; background: transparent; padding: 0 0 6px 12px; min-width: 0; }
  .header-row { gap: 12px; }
}
/* same drawer menu, switched on by nightshift.js when the categories don't fit in one row */
.site-header.is-compact .menu-btn { display: inline-grid; }
.site-header.is-compact .main-nav {
  position: fixed; inset: 0 0 0 auto; z-index: 70;
  width: min(360px, 88vw); height: 100dvh;
  flex-direction: column; align-items: stretch; gap: 2px;
  padding: 12px 16px 24px; overflow-y: auto;
  background: var(--surface); border-left: 1px solid var(--line);
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.26s;
}
.site-header.is-compact .main-nav.is-open { transform: none; visibility: visible; transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
.site-header.is-compact .main-nav-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); font: 700 1.3rem var(--display); }
.site-header.is-compact .main-nav-foot { display: block; margin-top: auto; padding-top: 20px; }
.site-header.is-compact .nav-link { width: 100%; height: 46px; justify-content: space-between; font-size: 1.25rem; }
.site-header.is-compact .nav-link.is-active, .page--home .site-header.is-compact .nav-home { box-shadow: inset 3px 0 0 var(--accent); border-radius: 0 8px 8px 0; }
.site-header.is-compact .main-nav .drop-menu { position: static; box-shadow: none; background: transparent; padding: 0 0 6px 12px; min-width: 0; }
.site-header.is-compact .header-row { gap: 12px; }
@media (max-width: 640px) {
  .announce { font-size: 0.87rem; }
  .announce .ico { display: none; }
  .login-btn span, .account-name, .cart-btn-label, .currency-drop { display: none; }
  .login-btn { width: 40px; padding: 0; }
  .account-btn { padding: 0 4px; }
  .brand-name { font-size: 1.3rem; }
  .brand-logo { height: 32px; max-width: 110px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-block: clamp(56px, 9vw, 112px) clamp(48px, 7vw, 88px);
  background:
    radial-gradient(1100px 560px at 88% -12%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 62%),
    radial-gradient(760px 380px at 4% 112%, color-mix(in srgb, var(--deal) 11%, transparent), transparent 62%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero--image {
  background:
    linear-gradient(90deg, var(--bg) 8%, color-mix(in srgb, var(--bg) 72%, transparent) 46%, color-mix(in srgb, var(--bg) 30%, transparent) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 45%),
    var(--hero-img) center / cover no-repeat,
    var(--bg);
}
/* long-exposure traffic trails behind the headline */
.hero-streaks {
  position: absolute; inset: 0 -12%; z-index: -1; pointer-events: none;
  transform: rotate(-7deg) translateY(8%);
  background:
    linear-gradient(90deg, transparent 4%, color-mix(in srgb, var(--accent) 85%, #fff) 34%, transparent 66%) 0 58% / 100% 2px no-repeat,
    linear-gradient(90deg, transparent 18%, var(--accent) 52%, transparent 88%) 0 61% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 30%, color-mix(in srgb, var(--accent) 60%, transparent) 60%, transparent 96%) 0 64% / 100% 3px no-repeat,
    linear-gradient(90deg, transparent 26%, var(--deal) 62%, transparent 94%) 0 69% / 100% 2px no-repeat,
    linear-gradient(90deg, transparent 6%, color-mix(in srgb, var(--deal) 70%, transparent) 38%, transparent 72%) 0 72% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 40%, color-mix(in srgb, var(--deal) 55%, transparent) 74%, transparent 100%) 0 75% / 100% 2px no-repeat;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 70%, transparent));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  opacity: 0.9;
  animation: trails 1.8s cubic-bezier(0.16, 0.8, 0.2, 1) 0.1s both;
}
.hero--image .hero-streaks { opacity: 0.55; }
@keyframes trails { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: end; }
.hero-copy > * { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.06s; }
.hero-copy > :nth-child(3) { animation-delay: 0.12s; }
.hero-copy > :nth-child(4) { animation-delay: 0.18s; }
.hero-copy > :nth-child(5) { animation-delay: 0.24s; }
.server-card { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; margin-bottom: 22px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 0.93rem; font-weight: 600; color: var(--text);
}
.hero-badge .ico { color: var(--accent); }
.hero-title {
  font-size: clamp(3.4rem, 8.6vw, 7.2rem); font-weight: 800; line-height: 0.9;
  letter-spacing: -0.008em; max-width: 11ch; text-wrap: balance;
}
.hero-sub { margin-top: 22px; max-width: 46ch; font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 48px); margin: 44px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-stat { display: flex; flex-direction: column-reverse; }
.hero-stat dd { margin: 0; font: 700 2.4rem/1 var(--display); font-variant-numeric: tabular-nums; }
.hero-stat dt { margin-top: 6px; color: var(--muted); font-size: 0.93rem; }

.server-card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line-strong); border-radius: var(--r-panel);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.server-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.server-state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; color: var(--muted); }
.server-state .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.server-state.is-online { color: var(--ok); }
.server-state.is-online .dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.server-state.is-offline { color: var(--danger); }
.server-state.is-offline .dot { background: var(--danger); }
.server-name { font: 600 1.05rem var(--display); color: var(--muted); }
.server-count { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; color: var(--muted); }
.server-count strong { font: 800 3.6rem/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.meter { height: 6px; margin-top: 14px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.server-actions { display: grid; gap: 8px; margin-top: 20px; }
.server-discord { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.server-discord .ico { color: #8c9eff; }
.server-discord strong { color: var(--text); }
.server-discord:hover { color: var(--text); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero-streaks { transform: rotate(-7deg) translateY(-6%); }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section + .section { padding-top: 0; }
.section--panel { background: var(--surface); border-block: 1px solid var(--line); padding-block: clamp(56px, 8vw, 88px); }
.section--panel + .section { padding-top: clamp(56px, 8vw, 96px); }
.section-tight { padding-block: 32px clamp(56px, 8vw, 96px); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.85rem); }
.section-head p { color: var(--muted); max-width: 52ch; }

/* categories */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cat-tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 132px; padding: 20px;
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface);
  transition: border-color 0.15s;
}
.cat-tile:hover { border-color: var(--accent-line); }
.cat-name { font-size: 1.75rem; font-weight: 700; }
.cat-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cat-cta { color: var(--accent); font-weight: 600; font-size: 0.95rem; }
.cat-subs { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-subs a { padding: 5px 12px; border-radius: var(--r-pill); background: var(--raised); color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.cat-subs a:hover { background: var(--accent-soft); color: var(--text); }

/* modules on the homepage: nightshift.js moves goals, payments and the like into the rail */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; align-items: start; }
.module-layout.has-rail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.module-layout.has-rail .module-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.module-rail { display: grid; gap: 16px; }
.module-rail:empty { display: none; }
@media (max-width: 960px) { .module-layout.has-rail { grid-template-columns: 1fr; } }

/* perks */
.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.perk { padding: 4px 32px 4px 0; }
.perk + .perk { padding-left: 32px; border-left: 1px solid var(--line); }
.perk .ico { color: var(--accent); }
.perk h3 { margin: 16px 0 8px; font-size: 1.6rem; }
.perk p { color: var(--muted); max-width: 38ch; }
@media (max-width: 780px) {
  .perk, .perk + .perk { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .perk:first-child { border-top: 0; padding-top: 0; }
}

/* reviews */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.review { margin: 0; padding-top: 20px; border-top: 2px solid var(--line-strong); display: flex; flex-direction: column; gap: 18px; }
.stars { display: flex; gap: 3px; color: var(--deal); }
.stars .ico { fill: currentColor; }
.review blockquote { margin: 0; font-size: 1.12rem; line-height: 1.55; flex: 1; }
.review figcaption { display: flex; align-items: center; gap: 12px; }
.review figcaption strong { display: block; font-weight: 600; }
.review figcaption small { display: block; color: var(--faint); font-size: 0.88rem; }

/* faq */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq-intro h2 { font-size: clamp(2rem, 4vw, 2.85rem); }
.faq-intro p { margin: 14px 0 22px; color: var(--muted); max-width: 40ch; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; cursor: pointer; list-style: none;
  font: 600 1.38rem/1.2 var(--display);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ico { color: var(--muted); transition: transform 0.2s; }
.faq-item[open] summary .ico { transform: rotate(45deg); color: var(--accent); }
.faq-item summary:hover { color: var(--accent); }
.faq-answer { padding: 0 0 22px; color: var(--muted); max-width: 64ch; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

/* call to action */
.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line-strong); border-radius: var(--r-panel);
  background:
    radial-gradient(600px 300px at 100% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
}
.cta-band h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 800; }
.cta-band p { margin-top: 10px; color: var(--muted); max-width: 46ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* homepage / cms text */
.prose { color: var(--muted); max-width: 72ch; }
.prose > * + * { margin-top: 0.9em; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: 1.4em; }
.prose h1 { font-size: 2.4rem; } .prose h2 { font-size: 1.9rem; } .prose h3 { font-size: 1.5rem; }
.prose strong, .prose b { color: var(--text); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose li + li { margin-top: 0.35em; }
.prose img { border-radius: var(--r-btn); height: auto; }
.prose hr { border: 0; border-top: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.prose iframe { max-width: 100%; border-radius: var(--r-btn); }
.home-text { max-width: 76ch; }

/* ---------- page head ---------- */
.page-head {
  padding-block: clamp(36px, 6vw, 64px) 28px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(800px 260px at 0% 0%, var(--accent-soft), transparent 70%);
}
.page-head--slim { padding-block: 20px; background: none; }
.page-head h1 { margin-top: 12px; font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 800; }
.page-lede { margin-top: 12px; color: var(--muted); max-width: 64ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.92rem; color: var(--faint); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--text); }

/* ---------- catalogue ---------- */
.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.sidebar { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 1024px) { .has-sidebar { grid-template-columns: 1fr; } .sidebar { position: static; } }

.catalog-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.catalog-bar p { color: var(--muted); }
.sort { display: flex; align-items: center; gap: 10px; margin: 0; }
.sort span { color: var(--muted); font-weight: 500; }
.sort select { width: auto; height: 40px; }

.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.pkg-card {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface);
  overflow: hidden; transition: border-color 0.15s;
}
.pkg-card:hover { border-color: var(--line-strong); }
.pkg-card.is-in-cart { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pkg-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--raised); overflow: hidden; }
.pkg-grid--square .pkg-media { aspect-ratio: 1; }
.pkg-media img { width: 100%; height: 100%; object-fit: cover; }
.pkg-fallback {
  display: grid; place-items: center; width: 100%; height: 100%;
  font: 800 4rem/1 var(--display); color: var(--accent);
  background: radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 70%), var(--raised);
}
.deal-tag {
  position: absolute; top: 12px; left: 12px;
  padding: 3px 9px 2px; border-radius: 6px;
  background: var(--deal); color: #1d1304;
  font: 700 1rem/1.2 var(--display); letter-spacing: 0.02em;
}
.heart {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--text);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer;
}
.heart:hover { color: var(--accent); }
.heart[aria-pressed="true"], .heart-btn[aria-pressed="true"] { color: var(--accent); }
.heart[aria-pressed="true"] .ico, .heart-btn[aria-pressed="true"] .ico { fill: currentColor; }
.pkg-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 16px 16px 18px; }
.pkg-name { font-size: 1.4rem; font-weight: 600; line-height: 1.12; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pkg-name a:hover { color: var(--accent); }
.countdown { display: inline-flex; align-items: center; gap: 6px; color: var(--deal); font-size: 0.9rem; font-weight: 600; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: auto; }
.price-now { font: 700 1.55rem/1 var(--display); font-variant-numeric: tabular-nums; }
.price-now small { font-size: 0.62em; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
.price-was { color: var(--faint); font: 600 1.05rem/1 var(--display); }
.pkg-actions { display: flex; gap: 8px; }
.pkg-actions > .btn:first-child { flex: 1; }

.pkg-grid--list { grid-template-columns: 1fr; gap: 12px; }
.pkg-grid--list .pkg-card { flex-direction: row; align-items: stretch; }
.pkg-grid--list .pkg-media { width: 200px; flex: none; aspect-ratio: auto; min-height: 112px; }
.pkg-grid--list .pkg-body { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 20px; }
.pkg-grid--list .pkg-name { flex: 1 1 220px; }
.pkg-grid--list .price { margin-top: 0; }
.pkg-grid--list .heart { left: 160px; right: auto; }
@media (max-width: 640px) {
  .pkg-grid--list .pkg-media { width: 112px; }
  .pkg-grid--list .heart { left: 72px; }
  .pkg-grid--list .pkg-body { padding: 14px; }
}

/* ---------- package detail (page and quick view) ---------- */
.pkg-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: start; }
.pkg-detail-media { position: relative; border-radius: var(--r-panel); overflow: hidden; background: var(--raised); aspect-ratio: 16 / 10; position: sticky; top: calc(var(--header-h) + 20px); }
.pkg-detail-media img { width: 100%; height: 100%; object-fit: cover; }
.pkg-detail-info { display: flex; flex-direction: column; gap: 18px; }
.pkg-detail-name { font-size: clamp(2.3rem, 4.4vw, 3.4rem); font-weight: 800; line-height: 0.98; }
.price--lg .price-now { font-size: 2.4rem; }
.price--lg .price-was { font-size: 1.35rem; }
.buy-row { display: flex; flex-wrap: wrap; gap: 10px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-btn); background: var(--deal-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--deal) 35%, transparent); }
.notice .ico { color: var(--deal); margin-top: 3px; }
.gift { border: 1px solid var(--line); border-radius: var(--r-card); }
.gift summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; font-weight: 600; list-style: none; }
.gift summary::-webkit-details-marker { display: none; }
.gift summary .ico { color: var(--accent); }
.gift-form { padding: 0 16px 16px; }
.assurances { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 0.93rem; }
.assurances li { display: inline-flex; align-items: center; gap: 8px; }
.assurances .ico { color: var(--accent); }
.pkg-description { padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .pkg-detail { grid-template-columns: 1fr; }
  .pkg-detail-media { position: relative; top: 0; }
}

/* ---------- checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.basket { display: grid; gap: 12px; }
.basket-row {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 14px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface);
}
.basket-name { font: 600 1.35rem/1.15 var(--display); }
.basket-name:hover { color: var(--accent); }
.basket-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 0.9rem; color: var(--muted); }
.basket-unit { margin-top: 6px; font: 700 1.2rem var(--display); display: flex; gap: 10px; align-items: baseline; }
.basket-unit small { color: var(--muted); font-size: 0.75em; }
.basket-controls { display: flex; align-items: center; gap: 8px; }
.qty { margin: 0; }
.qty input { width: 68px; height: 40px; text-align: center; padding: 0 6px; }
.basket .text-link { margin-top: 8px; justify-self: start; }
.summary {
  position: sticky; top: calc(var(--header-h) + 16px);
  display: flex; flex-direction: column; gap: 18px;
  padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--r-panel); background: var(--surface);
}
.summary h2 { font-size: 1.75rem; }
.coupon-form label { color: var(--muted); font-weight: 500; }
.coupons { display: grid; gap: 8px; }
.coupons li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: var(--r-btn); background: var(--ok-soft); }
.coupon-code { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ok); }
.coupon-desc { flex: 1; color: var(--muted); font-size: 0.9rem; }
.coupons .icon-btn { margin-left: auto; width: 32px; height: 32px; }
.total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.total-row span { color: var(--muted); }
.total-row strong { font: 700 1.6rem/1 var(--display); }
.total-row small { font-size: 0.6em; color: var(--muted); }
.total-row--lg { padding-top: 18px; border-top: 1px solid var(--line); }
.total-row--lg strong { font-size: 2.3rem; }
.summary .assurances { flex-direction: column; }
.signed-in { display: block; }
@media (max-width: 960px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 560px) {
  .basket-row { grid-template-columns: 60px minmax(0, 1fr); }
  .basket-row .line-thumb--lg { width: 60px; height: 60px; }
  .basket-controls { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---------- login + options ---------- */
.auth-wrap { display: grid; place-items: center; padding-block: clamp(40px, 8vw, 96px); }
.auth-card {
  width: min(460px, 100%); padding: clamp(24px, 4vw, 36px);
  display: flex; flex-direction: column; gap: 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-panel); background: var(--surface);
}
.auth-card--wide { width: min(620px, 100%); }
.auth-card h1 { font-size: 2.4rem; font-weight: 800; }
.auth-card > p { color: var(--muted); }
.auth-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.auth-form { display: grid; gap: 12px; }
.auth-form label { margin: 0; }
.legacy-login input { margin-bottom: 10px; }
.legacy-login button, .legacy-login input[type="submit"] { width: 100%; height: 52px; border: 0; border-radius: var(--r-btn); background: var(--accent); color: var(--accent-ink); font: 600 1.2rem var(--display); cursor: pointer; }
.options-form { margin-top: 8px; }
.discord-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-btn); color: var(--muted); }
.discord-link strong { color: var(--text); }
.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }

/* ---------- sidebar modules ---------- */
.module { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--raised); }
.section--panel .module { background: var(--bg); }
.section--panel .module.pkg-card { background: var(--bg); padding: 0; }
.module.pkg-card { padding: 0; background: var(--surface); }
.module-title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 1.3rem; font-weight: 600; }
.module-title .ico { color: var(--accent); }
.module-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.module-kicker .ico { fill: currentColor; }
.module-note { color: var(--muted); font-size: 0.93rem; }
.module-note.is-error { color: var(--danger); margin-top: 10px; }
.module-note strong { color: var(--text); }
.module-text { color: var(--muted); }
.goal-figure { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: 0.93rem; }
.goal-figure strong { font: 800 2.3rem/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.goal-image { width: 100%; border-radius: var(--r-btn); margin-bottom: 12px; }
.bar { height: 8px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; margin-bottom: 12px; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.bar--animated span { background-image: linear-gradient(135deg, rgb(255 255 255 / 0.22) 25%, transparent 25% 50%, rgb(255 255 255 / 0.22) 50% 75%, transparent 75%); background-size: 16px 16px; animation: stripes 1s linear infinite; }
@keyframes stripes { to { background-position: 16px 0; } }
.feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; padding-bottom: 0; }
.feed-main { min-width: 0; }
.feed-main strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-sub { display: block; color: var(--faint); font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-side { text-align: right; }
.feed-price { display: block; font: 700 1.05rem var(--display); }
.feed-time { display: block; color: var(--faint); font-size: 0.82rem; }
.top-row { display: flex; align-items: center; gap: 14px; }
.top-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--line); }
.top-name { display: block; font: 700 1.5rem/1.1 var(--display); }
.module--status .server-state { margin-bottom: 10px; }
.giftcard-form { margin-bottom: 4px; }

/* ---------- drawers, search, modal ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgb(2 6 14 / 0.62); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.22s; }
.scrim.is-open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; z-index: 80;
  display: flex; flex-direction: column;
  width: min(420px, 100vw); height: 100dvh;
  background: var(--surface); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 16px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.7rem; }
.drawer .line-items { flex: 1; overflow-y: auto; padding: 4px 22px; }
.line-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line-thumb { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-btn); overflow: hidden; background: var(--raised); color: var(--accent); font: 800 1.5rem var(--display); }
.line-thumb--lg { width: 76px; height: 76px; }
.line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-name { display: block; font: 600 1.15rem/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-name:hover { color: var(--accent); }
.line-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 0.9rem; }
.line-actions { display: flex; gap: 4px; }
.drawer-foot { display: grid; gap: 14px; padding: 20px 22px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--raised); }
.drawer .empty { flex: 1; }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 24px; text-align: center; }
.empty .ico-xl { color: var(--faint); margin-bottom: 6px; }
.empty h2, .empty h3 { font-size: 1.7rem; }
.empty p { color: var(--muted); max-width: 36ch; margin-bottom: 10px; }
.empty--wide { padding: clamp(48px, 8vw, 96px) 24px; border: 1px dashed var(--line-strong); border-radius: var(--r-panel); }

.search-sheet {
  position: fixed; z-index: 80; left: 50%; top: min(12vh, 120px);
  width: min(680px, 100vw - 24px); max-height: 76vh;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--shadow-overlay);
  transform: translate(-50%, -8px); opacity: 0; transition: transform 0.2s, opacity 0.2s;
}
.search-sheet.is-open { transform: translate(-50%, 0); opacity: 1; }
.search-box { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 20px; border-bottom: 1px solid var(--line); }
.search-box > .ico { color: var(--muted); }
.search-box input { flex: 1; height: 48px; border: 0; background: transparent; padding: 0; font-size: 1.15rem; box-shadow: none; }
.search-box input:focus { box-shadow: none; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-status { padding: 14px 20px 6px; color: var(--faint); font-size: 0.92rem; }
.search-results { overflow-y: auto; padding: 6px 10px 12px; }
.search-results a { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px; border-radius: 12px; }
.search-results a:hover, .search-results a:focus-visible { background: var(--raised); outline: none; }
.search-results .line-thumb { width: 48px; height: 48px; font-size: 1.3rem; }
.search-results strong { display: block; font: 600 1.15rem/1.2 var(--display); }
.search-results small { color: var(--faint); }
.search-results .price-now { font-size: 1.2rem; }
.search-results mark { background: none; color: var(--accent); }

.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.modal-panel {
  position: relative; pointer-events: auto;
  width: min(980px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--shadow-overlay);
  transform: translateY(10px) scale(0.985); opacity: 0; transition: transform 0.22s, opacity 0.22s;
}
.modal.is-open .modal-panel { transform: none; opacity: 1; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 3; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.modal-body { padding: clamp(18px, 3vw, 28px); }
.modal-body .pkg-detail-media { position: relative; top: 0; }
.modal-loading { display: grid; place-items: center; min-height: 320px; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(380px, 100vw - 40px); }
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px 12px 16px; border-radius: 12px;
  background: var(--raised); box-shadow: var(--shadow-overlay);
  border-left: 4px solid var(--accent);
  animation: rise 0.25s ease both;
}
.toast p { flex: 1; }
.toast--success { border-left-color: var(--ok); }
.toast--danger, .toast--error { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--deal); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; }

/* ---------- footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg), #000 22%); padding-top: clamp(48px, 7vw, 72px); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-brand p { margin: 16px 0 18px; color: var(--muted); max-width: 40ch; }
.socials { display: flex; flex-wrap: wrap; gap: 6px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-btn); border: 1px solid var(--line); color: var(--muted); }
.socials a:hover { color: var(--text); border-color: var(--accent); }
.footer-col h2 { margin-bottom: 12px; font-size: 1.15rem; font-weight: 600; color: var(--text); }
.footer-col a { display: block; padding: 4px 0; color: var(--muted); }
.footer-col a:hover { color: var(--text); }
.footer-base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 48px; padding-block: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.88rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Standalone site additions
   ========================================================================== */
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; padding: 1px 6px; border-radius: 6px; background: var(--raised); color: var(--text); }
.demo-bar { background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); font-size: 0.92rem; padding-block: 8px; text-align: center; }
.demo-bar strong { color: var(--accent); }

.type-tag { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--bg) 78%, transparent); color: var(--text); font: 600 0.85rem/1.4 var(--body); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.type-tag .ico { color: var(--accent); }
.price-period { color: var(--muted); font-size: 0.95rem; }
.badge { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 5px 12px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--text); font-size: 0.92rem; font-weight: 600; }
.badge .ico { color: var(--accent); }
.btn.is-busy { opacity: 0.6; cursor: progress; }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.cat-chips a { padding: 7px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.cat-chips a:hover { color: var(--text); border-color: var(--accent); }
.cat-chips a.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.drawer-content { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.drawer-content .line-items { flex: 1; overflow-y: auto; padding: 4px 22px; }

.modal-panel--sm { width: min(460px, 100%); }
.login-body { display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 4vw, 34px); }
.login-body h2 { font-size: 2.1rem; font-weight: 800; padding-right: 40px; }
.login-body > p { color: var(--muted); }
.login-options { display: grid; gap: 10px; }
.modal-loading--sm { min-height: 120px; }
.options-wrap { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.options-wrap h2 { font-size: 2.1rem; font-weight: 800; padding-right: 40px; }
.options-wrap > p { color: var(--muted); }
.options-form .form-actions { margin-top: 24px; }

.promo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.promo-row select { grid-column: 1 / -1; }

.thanks .ico-xl { color: var(--ok); }
.legal-note { padding-block: 0 28px; }
.legal-note p { max-width: 80ch; color: var(--faint); font-size: 0.84rem; }

/* toasts sit bottom-left so they never cover the cart drawer or the pay button */
.toasts { left: 20px; right: auto; }
@media (max-width: 640px) { .toasts { top: 12px; bottom: auto; left: 12px; right: 12px; width: auto; } }
.modal-panel.is-narrow { width: min(620px, 100%); }

/* ---------- script store: hero code card ---------- */
.code-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: var(--r-panel);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both;
}
.code-tab { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0 16px; padding: 6px 12px; border-radius: 8px 8px 0 0; background: var(--bg); color: var(--muted); font: 500 0.88rem var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); border: 1px solid var(--line); border-bottom: 0; }
.code-tab .ico { color: var(--accent); }
.code-body { margin: 0; padding: 18px 20px 20px; background: var(--bg); border-top: 1px solid var(--line); font: 500 0.98rem/1.9 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-x: auto; }
.code-body code { background: none; padding: 0; font: inherit; color: var(--text); }
.code-line { display: block; white-space: pre; animation: type-in 0.4s ease both; animation-delay: calc(0.55s + var(--i) * 0.22s); }
.code-line:last-child::after { content: ""; display: inline-block; width: 0.55em; height: 1.1em; margin-left: 4px; vertical-align: -0.18em; background: var(--accent); opacity: 0.85; }
@keyframes type-in { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
.c-com { color: var(--faint); }
.c-kw { color: var(--accent); }
.code-foot { padding: 16px 20px 0; }
.code-foot p { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.fw-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fw-list li { padding: 5px 12px; border-radius: var(--r-pill); border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--text); font: 600 0.92rem/1.3 var(--body); }
.code-card .server-discord { margin: 16px 20px 0; padding: 14px 0 18px; }
.code-card > :last-child:not(.server-discord):not(.code-body) { padding-bottom: 20px; }

/* ---------- package screenshots ---------- */
.pkg-detail-visual { display: grid; gap: 10px; position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
.pkg-detail-visual .pkg-detail-media { position: relative; top: 0; }
.gallery { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.gallery-thumb { flex: none; width: 96px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--raised); cursor: pointer; opacity: 0.7; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.is-active { border-color: var(--accent); opacity: 1; }
.modal-body .pkg-detail-visual { position: relative; top: 0; }
@media (max-width: 860px) { .pkg-detail-visual { position: relative; top: 0; } }

/* ---------- logo ---------- */
.brand-logo { height: 46px; max-width: 150px; filter: drop-shadow(0 2px 6px rgb(0 0 0 / 0.45)); }
.site-footer .brand-logo { height: 64px; max-width: 200px; }
.hero-logo { margin: -8px 0 0 -10px; line-height: 0; }
.hero-logo img { width: min(560px, 100%); height: auto; filter: drop-shadow(0 18px 40px rgb(0 0 0 / 0.55)) drop-shadow(0 0 60px color-mix(in srgb, var(--accent) 22%, transparent)); }
@media (max-width: 640px) {
  .brand-logo { height: 38px; max-width: 110px; }
  .hero-logo { margin-left: -6px; }
}
