/* Storefront theme. Change the colours in :root to re-skin the whole site. */
:root {
    --bg: #060a16;
    --surface: #0e1731;
    --surface-2: #14204a;
    --line: rgba(150, 175, 255, .13);
    --line-2: rgba(170, 195, 255, .28);
    --text: #eef2fb;
    --muted: #9aa7c4;
    --accent: #3d6bff;      /* royal blue: buttons, active states */
    --accent-2: #cdd5e4;    /* silver: prices, basket, highlights */
    --accent-lo: #1f3fc2;
    --good: #4ade80;
    --bad: #ff5d6c;
    --radius: 20px;
    --shadow: 0 12px 40px -14px rgba(0, 0, 0, .7);
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Oxanium', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    font: 400 15px/1.55 var(--font-body); color: var(--text); -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(1100px 620px at 82% -8%, rgba(61, 107, 255, .24), transparent 60%),
        radial-gradient(900px 520px at -4% 4%, rgba(205, 213, 228, .10), transparent 55%),
        var(--bg);
}
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
/* the hero only belongs on the home view */
body[data-view="category"] .hero, body[data-view="ranks"] .hero { display: none; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* sound on/off */
.sfx-toggle { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.sfx-toggle:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.sfx-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sfx-toggle .sfx-off { display: none; }
.sfx-toggle[aria-pressed="false"] .sfx-on { display: none; }
.sfx-toggle[aria-pressed="false"] .sfx-off { display: block; }

/* ---------- sale banner ---------- */
.sale-banner {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    padding: 9px 18px; text-align: center; font-weight: 700; font-size: 14px; color: #0b1230;
    background: linear-gradient(90deg, var(--accent-2), #8791a8 40%, #e9eefb);
}
.sale-banner-countdown { background: rgba(0, 0, 0, .16); border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
.sale-banner-close { background: rgba(0, 0, 0, .15); border: 0; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; line-height: 1; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 60; padding: 14px 0; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bubble {
    /* frosted glass. Safe to keep: the header never sits over the animated hero, and the hero
       animations pause whenever it is scrolled behind the header. */
    background: rgba(14, 23, 49, .78); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
}
.brand {
    display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px 0 10px; text-decoration: none;
    font: 700 16px var(--font-display); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
}
.brand img { width: 36px; height: 36px; object-fit: contain; }
.nav { display: flex; gap: 4px; padding: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav-pill {
    white-space: nowrap; padding: 9px 16px; border-radius: 10px; text-decoration: none;
    color: var(--muted); font-weight: 600; font-size: 14px; transition: background .15s, color .15s;
}
.nav-pill:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-pill.is-active { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-lo)); box-shadow: 0 8px 20px -8px var(--accent); }
.actions { display: flex; align-items: center; gap: 6px; padding: 6px; }
.user-chip {
    display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 12px 0 6px; border: 0; border-radius: 10px;
    background: transparent; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px;
}
.user-chip:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.user-chip img { width: 30px; height: 30px; border-radius: 8px; image-rendering: pixelated; background: var(--surface-2); }
.basket-fab {
    position: relative; height: 42px; min-width: 46px; padding: 0 12px; border: 0; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: #0b1230;
    background: linear-gradient(135deg, var(--accent-2), #8791a8); box-shadow: 0 8px 20px -8px var(--accent-2);
}
.basket-fab-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.basket-count {
    position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
    background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; border: 2px solid var(--bg);
    display: flex; align-items: center; justify-content: center;
}
@keyframes bump { 30% { transform: scale(1.18); } 60% { transform: scale(.94); } }
.basket-fab.bump { animation: bump .45s; }

/* ---------- buttons + chips ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 50px; padding: 0 24px; border: 0;
    border-radius: 16px; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer;
    transition: transform .15s, filter .15s, box-shadow .15s;
}
.btn-primary {
    color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-lo));
    box-shadow: 0 12px 28px -12px var(--accent), inset 0 -3px 0 rgba(0, 0, 0, .22);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.1); }
.chip {
    display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 18px; border-radius: 16px; cursor: pointer;
    background: rgba(14, 23, 49, .74); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none;
    transition: border-color .15s, transform .15s;
}
.chip:hover { border-color: var(--line-2); transform: translateY(-2px); }
.chip small { color: var(--muted); font-weight: 600; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(74, 222, 128, .18); }
.chip .dot.off { background: #6f7b99; box-shadow: none; }

/* ---------- hero ---------- */
/* the hero IS the photo now (castle + character baked in by the source image) - full quality, no
   dark wash over it. background-image is set inline per-page (index.php) with a cache-bust stamp;
   this just positions and scales it. Sized by viewport width so it looks right at any monitor size,
   clamped so it never gets absurdly tall on huge screens. */
.hero {
    position: relative; overflow: hidden; min-height: min(74vw, 720px); padding: 56px 0;
    display: flex; align-items: center;
    background-color: var(--bg); background-repeat: no-repeat; background-size: cover; background-position: center 40%;
}
/* only a short fade at the very bottom, to blend the photo into the page colour below it - not a
   wash over the whole image */
.hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(to bottom, transparent 82%, var(--bg) 100%);
}
.hero-in { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-2); text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.hero h1 {
    margin: 0 0 16px; font: 700 clamp(40px, 6.6vw, 72px)/1.02 var(--font-display); letter-spacing: -.01em;
    background: linear-gradient(180deg, #fff 35%, #cdd5e4); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 3px 14px rgba(0, 0, 0, .55));
}
.lead { max-width: 520px; margin: 0 0 28px; font-size: 17px; color: var(--muted); text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.embers span {
    position: absolute; bottom: -12px; left: var(--x); width: var(--s); height: var(--s); background: var(--c);
    box-shadow: 0 0 8px var(--c); opacity: 0; animation: rise var(--d) linear infinite; animation-delay: var(--dl);
}
/* stop the ember animation while the hero is scrolled out of view (toggled from index.php) */
body.hero-off .embers span { animation-play-state: paused; }
/* ?fx=off in the address bar switches the embers off, to tell effects apart from other causes of lag */
.no-fx .embers { display: none; }
@keyframes rise { 10% { opacity: .9; } 100% { transform: translate3d(var(--dr), -520px, 0); opacity: 0; } }

/* ---------- sections ---------- */
.section { margin-top: 64px; }
.section-head { margin-bottom: 22px; }
/* headings that can contain a C use weight 500: at 600+ this pixel font closes the C into an O
   ("COINS" reads "OOINS") */
.section-head h2 { margin: 0; font: 700 32px var(--font-display); }
.section-head p { margin: 4px 0 0; color: var(--muted); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.cat-card {
    position: relative; display: flex; flex-direction: column; gap: 16px; padding: 20px; overflow: hidden; text-decoration: none;
    border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
    transition: transform .18s, border-color .18s, box-shadow .18s;
}
.cat-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(260px 160px at 0 0, rgba(61, 107, 255, .16), transparent 70%); pointer-events: none; }
.cat-card:hover { transform: translateY(-4px); border-color: rgba(61, 107, 255, .65); box-shadow: 0 20px 44px -20px rgba(61, 107, 255, .7); }
.cat-ico { position: relative; width: 76px; height: 76px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(145deg, var(--surface-2), #0a1126); border: 1px solid var(--line); }
.cat-ico img { width: 54px; height: 54px; object-fit: contain; image-rendering: pixelated; }
.cat-card h3 { position: relative; margin: 0; font: 800 20px var(--font-body); letter-spacing: -.01em; }
.cat-meta { position: relative; display: flex; align-items: center; justify-content: space-between; margin-top: auto; color: var(--muted); font-size: 13px; }
.cat-go { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .06); transition: background .18s, color .18s; }
.cat-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cat-card:hover .cat-go { background: var(--accent); color: #fff; }

/* supporters */
.support-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; }
.support-grid.no-top { grid-template-columns: 1fr; }
.top-card {
    position: relative; overflow: hidden; min-height: 230px; display: flex; align-items: flex-end; padding: 22px;
    border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(150deg, #1c2c66, #0a1126 70%);
}
.top-card .badge {
    display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 9px;
    background: var(--accent-2); color: #0b1230; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.top-card h3 { margin: 10px 0 2px; font: 800 26px var(--font-body); letter-spacing: -.01em; }
.top-card p { margin: 0; color: var(--muted); font-size: 13px; }
.top-card .skin { position: absolute; right: 8px; bottom: -34px; height: 260px; width: auto; pointer-events: none; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .5)); }
/* Bedrock skins are drawn flat by api/skin.php: whole-number scaling (7x) keeps the pixels crisp */
.top-card .skin-px { right: 36px; bottom: 0; height: 224px; image-rendering: pixelated; }
.pay-card, .goal-card { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.pay-card h3, .goal-card h3 { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pay { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); }
.pay img { width: 34px; height: 34px; border-radius: 9px; image-rendering: pixelated; flex-shrink: 0; }
.pay b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-card { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; }
.ring {
    --p: 0; flex-shrink: 0; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center;
    background: conic-gradient(var(--accent-2) calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0);
}
.ring::after { content: attr(data-label); display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: var(--surface); font-weight: 800; font-size: 15px; }
.goal-card h3 { margin-bottom: 4px; }
.goal-card p { margin: 0; }
.goal-title { font: 800 20px var(--font-body); }

/* support + refund, faq */
.info-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info { padding: 22px; border-radius: var(--radius); border: 1px solid; }
.info h3 { margin: 0 0 6px; font: 800 18px var(--font-body); }
.info p { margin: 0; color: var(--muted); }
.info.support { border-color: rgba(61, 107, 255, .5); background: linear-gradient(160deg, rgba(61, 107, 255, .16), transparent 70%); }
.info.refund { border-color: rgba(205, 213, 228, .5); background: linear-gradient(160deg, rgba(205, 213, 228, .13), transparent 70%); }
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.faq details { padding: 0 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 0; list-style: none; cursor: pointer; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .06); font-size: 18px; }
.faq details[open] summary::after { content: '\2212'; background: var(--accent); }
.faq details[open] { border-color: rgba(61, 107, 255, .45); }
.faq p { margin: 0 0 18px; color: var(--muted); }
.faq-group + .faq-group { margin-top: 28px; }
.faq-group-title { margin: 0 0 12px; color: var(--accent-2); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* Some Tebex package images are saved with a solid black background instead of transparency.
   'screen' blending drops pure black out so the artwork sits straight on the card colour
   (transparent images are unaffected apart from a very slight lift on their brightest edges). */
.pkg-art img, .cat-ico img, .side-link img, .pkg-modal-img, .drawer-item-img { mix-blend-mode: screen; }

/* ---------- footer ---------- */
.footer { margin-top: 84px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .28); }
.footer-in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding: 26px 20px; }
.footer .brand { height: auto; padding: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.legal { border-top: 1px solid var(--line); padding: 14px 20px 22px; color: #6f7b99; font-size: 12px; }
.legal a { color: var(--muted); }

/* ---------- category view ---------- */
.crumbs { margin: 14px 0 18px; color: var(--muted); font-size: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.cat-layout { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: start; padding-bottom: 10px; }
.cat-side { position: sticky; top: 96px; padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.side-link {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none;
    color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, color .15s;
}
.side-link:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.side-link.is-active { color: #fff; background: rgba(61, 107, 255, .2); box-shadow: inset 3px 0 0 var(--accent); }
.side-link img { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; }
.side-group { padding: 12px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6f7b99; }
.side-sub { padding-left: 14px; }
.cat-main h2 { margin: 0; font: 700 32px var(--font-display); }
.cat-main > p { margin: 4px 0 22px; color: var(--muted); }

/* ---------- package cards ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.pkg {
    position: relative; display: flex; flex-direction: column; overflow: hidden; cursor: pointer; user-select: none;
    border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
    transition: transform .18s, border-color .18s, box-shadow .18s;
}
.pkg:hover { transform: translateY(-4px); border-color: rgba(205, 213, 228, .6); box-shadow: 0 20px 44px -22px rgba(205, 213, 228, .55); }
.pkg-art {
    aspect-ratio: 4 / 3; display: grid; place-items: center;
    background: radial-gradient(circle at 50% 42%, rgba(61, 107, 255, .3), transparent 66%), linear-gradient(160deg, #14204a, #0a1126);
}
.pkg-art img { width: 56%; max-height: 78%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); transition: transform .22s; }
.pkg:hover .pkg-art img { transform: scale(1.09) rotate(-2deg); }
.pkg-body { padding: 14px 16px 4px; }
.pkg h3 { margin: 0; font-size: 15px; font-weight: 700; }
.pkg-price { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px; }
.pkg-cta { margin: auto 16px 16px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 13px; font-weight: 700; transition: background .18s, color .18s; }
.pkg:hover .pkg-cta { background: var(--accent); color: #fff; }
.pkg-owned { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 3px 9px; border-radius: 999px; background: var(--good); color: #052e16; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.price-sale-badge { padding: 2px 6px; border-radius: 5px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.price-was { color: var(--muted); text-decoration: line-through; font-weight: 600; font-size: 13px; }
.price-now { color: var(--accent-2); font-weight: 800; }
.pkg-price, .pkg-modal-price { color: var(--accent-2); font-weight: 800; }
.panel-empty { grid-column: 1 / -1; padding: 40px 10px; text-align: center; color: var(--muted); }

.skeleton-grid { display: contents; }
.skeleton-card { min-height: 190px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.skeleton-card::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }
.cat-card, .pkg { animation: rise-in .35s ease backwards; animation-delay: calc(var(--i, 0) * 40ms); }

/* ---------- compare ranks page ---------- */
/* desktop: a side-by-side table, one column per tier, grouped into labelled sections. Hidden
   below 761px in favour of .ranks-cards - two different layouts rather than one that reflows,
   since a feature table and a stack of cards don't share a sensible halfway point. */
.ranks-table { display: none; }
@media (min-width: 761px) {
    .ranks-table { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
    .ranks-row-head, .ranks-group-title, .ranks-row {
        display: grid; grid-template-columns: minmax(210px, 1.15fr) repeat(var(--tiers, 2), minmax(0, 1fr));
    }
    .ranks-row-head { padding: 22px; gap: 20px; align-items: end; border-bottom: 1px solid var(--line); }
    .ranks-row-head .ranks-label { display: flex; flex-direction: column; justify-content: flex-end; }
    .ranks-row-head .ranks-label h2 { margin: 0; font: 700 24px var(--font-display); }
    .ranks-row-head .ranks-label p { margin: 6px 0 0; }
    .ranks-group-title { padding: 10px 22px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
    .ranks-group-title span:first-child { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
    .ranks-row { padding: 14px 22px; border-bottom: 1px solid var(--line); align-items: center; }
    .ranks-row:last-child { border-bottom: none; }
    .ranks-row .ranks-label { font-size: 14px; }
    .ranks-val { display: flex; justify-content: center; }
}
.rank-header { display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; border-radius: 16px; padding: 14px; transition: background .18s; }
.rank-header:hover { background: rgba(255, 255, 255, .04); }
.rank-header.skeleton-card { min-height: 220px; }
.rank-header-art {
    width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; border-radius: 10px; margin-bottom: 10px;
    background: radial-gradient(circle at 50% 42%, rgba(61, 107, 255, .3), transparent 66%), linear-gradient(160deg, #14204a, #0a1126);
}
.rank-header-art img { width: 56%; max-height: 78%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
.rank-header-name { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.rank-header-price { margin: 0 0 12px; color: var(--accent-2); font-weight: 800; }
.rank-header-cadence { color: var(--muted); font-weight: 600; font-size: 12px; }
.rank-header-cta { width: 100%; height: 38px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 13px; font-weight: 700; transition: background .18s, color .18s; }
.rank-header:hover .rank-header-cta { background: var(--accent); color: #fff; }
.ranks-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }

/* mobile: one card per tier, perks listed underneath grouped the same way as the table */
.ranks-cards { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 761px) { .ranks-cards { display: none; } }
.ranks-card { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 18px; }
.ranks-card .rank-header { padding: 0 0 16px; }
.ranks-card-group { padding-top: 14px; border-top: 1px solid var(--line); margin-top: 14px; }
.ranks-card-group:first-of-type { margin-top: 0; }
.ranks-card-group-title { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ranks-card-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ranks-card-group li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }

/* ---------- overlays: package modal, username, basket ---------- */
.pkg-modal-overlay, .username-modal-overlay {
    position: fixed; inset: 0; z-index: 950; display: flex; align-items: center; justify-content: center; padding: 18px;
    background: rgba(3, 6, 14, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.username-modal-overlay { z-index: 970; }
.pkg-modal {
    position: relative; width: 100%; max-width: 780px; max-height: 90vh; overflow-y: auto;
    border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
}
.pkg-modal-close {
    position: absolute; top: 14px; right: 14px; z-index: 3; width: 38px; height: 38px; border: 0; border-radius: 50%;
    background: rgba(0, 0, 0, .5); cursor: pointer; display: grid; place-items: center;
}
.pkg-modal-close:hover { background: rgba(0, 0, 0, .8); }
.pkg-modal-media { position: relative; background: radial-gradient(circle at 50% 45%, rgba(61, 107, 255, .35), transparent 65%), #0a1126; }
.pkg-modal-img { display: block; width: 100%; max-height: 300px; padding: 26px; object-fit: contain; }
.pkg-modal-media-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); cursor: pointer; }
.pkg-modal-media-prev { left: 12px; }
.pkg-modal-media-next { right: 12px; }
.pkg-modal-media-dots { position: absolute; bottom: 10px; left: 0; right: 0; z-index: 2; display: flex; justify-content: center; gap: 6px; }
.pkg-modal-media-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .4); cursor: pointer; }
.pkg-modal-media-dot.is-active { background: var(--accent-2); }
.pkg-modal-body { max-width: 640px; margin: 0 auto; padding: 26px 26px 30px; }
.pkg-modal-name { margin: 0 0 4px; text-align: center; font: 800 26px var(--font-body); letter-spacing: -.01em; }
.pkg-modal-price { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; font-size: 19px; }
.pkg-modal-desc { margin-bottom: 22px; color: var(--muted); line-height: 1.7; }
/* long Tebex descriptions push the button below the fold, so it rides along at the bottom of the
   pop-up while you read; the ring is the pop-up's own colour so text never shows around it */
#pkg-modal-buy { position: sticky; bottom: 12px; z-index: 2; box-shadow: 0 0 0 12px var(--surface), 0 12px 28px -12px var(--accent), inset 0 -3px 0 rgba(0, 0, 0, .22); }
.pkg-modal-desc p { margin: 0 0 10px; }
.pkg-modal-desc ul, .pkg-modal-desc ol { margin: 0 0 10px; padding-left: 22px; }
.pkg-modal-desc li { margin-bottom: 4px; }
.pkg-modal-desc h1, .pkg-modal-desc h2, .pkg-modal-desc h3, .pkg-modal-desc h4 { margin: 20px 0 10px; color: var(--text); text-align: center; line-height: 1.3; }
.pkg-modal-desc strong { color: var(--text); }
.pkg-modal-desc a { color: var(--accent-2); }
.pkg-modal-desc hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.pkg-modal-desc img { display: block; margin: 14px auto; width: auto; max-width: min(100%, 420px); height: auto; border-radius: 10px; }
.pkg-modal-desc div:has(> img) { margin-left: auto !important; margin-right: auto !important; }

.btn-checkout {
    display: block; width: 100%; height: 52px; border: 0; border-radius: 16px; cursor: pointer; font-weight: 800; font-size: 15px; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-lo)); box-shadow: 0 12px 28px -12px var(--accent), inset 0 -3px 0 rgba(0, 0, 0, .22);
    transition: filter .15s, transform .15s;
}
.btn-checkout:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.btn-checkout:disabled { opacity: .7; cursor: default; }

.username-modal { width: 100%; max-width: 400px; padding: 28px; text-align: center; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.username-modal h2 { margin: 0 0 8px; font: 800 21px var(--font-body); }
.username-modal p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.username-modal input, .basket-coupon-input {
    width: 100%; padding: 12px 14px; margin-bottom: 14px; border-radius: 10px; outline: none; color: var(--text); font: inherit;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2);
}
.username-modal input { text-align: center; }
.username-modal input:focus, .basket-coupon-input:focus { border-color: var(--accent); }
.username-modal-error { min-height: 1em; margin: -6px 0 12px; color: var(--bad); font-size: 13px; }

/* login (username) modal: pick Java or Bedrock, then type the name. For Bedrock the "." Geyser
   needs on the front of the name is shown for them and added automatically on save. */
.login-modal { max-width: 460px; }
.login-modal h2 {
    margin: 0 0 20px; font: 700 24px/1.15 var(--font-display); letter-spacing: -.01em;
    background: linear-gradient(180deg, #fff 35%, #cdd5e4); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.edition-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.edition-btn {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; border-radius: 16px; cursor: pointer;
    background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); color: var(--muted);
    font: 700 13px/1.25 var(--font-body); transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.edition-btn svg { width: 28px; height: 28px; flex: none; fill: currentColor; }
.edition-btn small { display: block; font-size: 11px; font-weight: 600; opacity: .75; }
.edition-btn:hover:not(.is-active) { border-color: rgba(61, 107, 255, .55); color: var(--text); }
.edition-btn.is-active { border-color: var(--accent); background: rgba(61, 107, 255, .16); color: var(--text); box-shadow: 0 10px 26px -14px var(--accent); }
.login-modal .login-hint { margin: 0 0 8px; text-align: left; font-size: 12px; font-style: italic; }
.login-row { display: flex; gap: 10px; margin-bottom: 10px; }
.login-field {
    flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 14px; border-radius: 10px; cursor: text;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); transition: border-color .15s;
}
.login-field:focus-within { border-color: var(--accent); }
.login-prefix { margin-right: 2px; color: var(--accent-2); font-weight: 800; font-size: 18px; }
.login-modal .login-field input { flex: 1; min-width: 0; width: auto; margin: 0; padding: 13px 0; border: 0; border-radius: 0; background: none; text-align: left; }
.login-go {
    flex: none; width: 52px; display: grid; place-items: center; border: 0; border-radius: 10px; cursor: pointer; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-lo)); box-shadow: 0 12px 28px -12px var(--accent), inset 0 -3px 0 rgba(0, 0, 0, .22);
    transition: filter .15s, transform .15s;
}
.login-go:hover { filter: brightness(1.1); transform: translateY(-1px); }
.login-go svg { width: 22px; height: 22px; }
.login-modal .username-modal-error { margin: 0 0 4px; text-align: left; }
.login-modal .login-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; }
@media (max-width: 420px) {
    .login-modal { padding: 22px 18px; }
    .login-modal h2 { font-size: 22px; }
    .edition-btn { gap: 8px; padding: 10px; font-size: 12px; }
    .edition-btn svg { width: 24px; height: 24px; }
}

/* basket: slide-in drawer */
.basket-drawer-overlay {
    position: fixed; inset: 0; z-index: 940; display: flex; justify-content: flex-end;
    /* no backdrop blur: an always-mounted full-screen blur layer is re-blurred every frame in Firefox,
       even while invisible. visibility:hidden also takes the closed panel out of rendering entirely. */
    background: rgba(3, 6, 14, .82);
    opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s, visibility 0s linear .2s;
}
/* the blur only exists while the panel is open, so a closed panel costs nothing */
.basket-drawer-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .2s; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.basket-drawer {
    width: 100%; max-width: 440px; height: 100%; display: flex; flex-direction: column; background: var(--surface);
    border-left: 1px solid var(--line-2); box-shadow: -30px 0 80px rgba(0, 0, 0, .6); transform: translateX(100%); transition: transform .25s ease;
}
.basket-drawer-overlay.is-open .basket-drawer { transform: none; }
.basket-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); font: 800 19px var(--font-body); }
.btn-icon { width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .06); cursor: pointer; }
.btn-icon:hover { background: rgba(255, 255, 255, .14); }
.basket-signed-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 22px 0; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, .05); font-size: 13px; color: var(--muted); }
.basket-signed-in > div { display: flex; flex-direction: column; }
.basket-signed-in strong { color: var(--text); font-size: 15px; }
.basket-switch-btn { padding: 0; border: 0; background: none; color: var(--accent-2); font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: underline; }
.basket-drawer-items { flex: 1; overflow-y: auto; padding: 6px 22px; }
.basket-drawer-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.drawer-item-img { width: 48px; height: 48px; flex-shrink: 0; padding: 4px; object-fit: contain; border-radius: 10px; background: var(--surface-2); }
.drawer-item-info { flex: 1; min-width: 0; }
.drawer-item-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.drawer-item-price { display: block; margin-top: 2px; color: var(--accent-2); font-weight: 700; font-size: 13px; }
.drawer-item-qty { display: flex; align-items: center; gap: 6px; }
.drawer-qty-btn { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .08); cursor: pointer; }
.drawer-qty-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .16); }
.drawer-qty-btn:disabled { opacity: .4; cursor: default; }
.drawer-qty-val { min-width: 18px; text-align: center; font-weight: 700; font-size: 14px; }
.drawer-remove-btn { padding: 8px; border: 0; border-radius: 8px; background: none; color: #6f7b99; cursor: pointer; }
.drawer-remove-btn:hover { color: var(--bad); background: rgba(255, 93, 108, .1); }
.drawer-state { margin: 0; padding: 40px 0; text-align: center; color: var(--muted); }
.basket-drawer-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); }
.basket-coupon, .basket-creator { margin-bottom: 12px; }
.basket-coupon-form, .basket-creator-form { display: flex; gap: 8px; }
.basket-coupon-input { margin: 0; padding: 9px 12px; font-size: 14px; }
.basket-coupon-apply-btn { padding: 0 16px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .09); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.basket-coupon-apply-btn:hover { background: rgba(255, 255, 255, .17); }
.basket-coupon-tag { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 12px; border-radius: 999px; background: rgba(205, 213, 228, .13); border: 1px solid rgba(205, 213, 228, .4); color: var(--accent-2); font-size: 13px; font-weight: 700; }
.basket-coupon-tag-remove { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; opacity: .7; }
.basket-code-error { min-height: 1em; margin: 6px 0 0; color: var(--bad); font-size: 12px; }
.basket-discord-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 9px 12px; border-radius: 10px; font-size: 13px; background: rgba(88, 101, 242, .12); border: 1px solid rgba(88, 101, 242, .3); }
.basket-discord-btn { padding: 5px 12px; border: 0; border-radius: 8px; background: #5865f2; color: #fff; font-weight: 700; font-size: 12px; cursor: pointer; }
.basket-discord-btn.unlink { background: rgba(255, 255, 255, .1); color: var(--muted); }
.basket-drawer-total-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; color: var(--muted); }
.basket-drawer-total-row strong { color: var(--text); font-size: 22px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .support-grid, .info-row, .faq { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .cat-layout { grid-template-columns: 1fr; }
    .cat-side { position: static; display: flex; gap: 6px; overflow-x: auto; padding: 8px; scrollbar-width: none; }
    .side-group { display: none; }
    .side-sub { padding-left: 0; display: flex; gap: 6px; }
    .side-link { flex-shrink: 0; }
}
@media (max-width: 760px) {
    .topbar-in { flex-wrap: wrap; }
    .nav { order: 3; width: 100%; }
    .brand { height: 50px; }
    .user-chip span { display: none; }
    .user-chip { padding: 0 6px; }
    /* overlaying text on the photo never reads well at this width (the text always crosses the
       character somewhere), so the photo becomes a plain banner strip up top - shown in full, at
       full quality, character included - and the text sits below it on the ordinary page
       background where it's always legible with no card, no blur, no dimming needed */
    .hero {
        display: block; min-height: 0; overflow: visible; padding: 0 0 28px;
        background-size: 190% auto; background-position: 66% top; background-repeat: no-repeat;
    }
    .hero::before { display: none; }
    .embers { display: none; }
    .hero-in { padding-top: 80vw; }
    .hero-copy { max-width: none; }
    .top-card .skin { height: 200px; }
    .top-card .skin-px { right: 20px; height: 192px; }
    .goal-card { flex-direction: column; align-items: flex-start; }
    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cat-card { padding: 16px; }
    .pkg-modal-body { padding: 20px 18px 24px; }
}
@media (max-width: 420px) {
    .cat-card { padding: 14px; gap: 12px; }
    .cat-ico { width: 60px; height: 60px; }
    .cat-ico img { width: 42px; height: 42px; }
    .cat-card h3 { font-size: 17px; }
}
@media (max-width: 340px) {
    .shop-grid, .cat-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
