/* The Backrooms store.
   Layout: utility row, header bar, banner, one main panel (sidebar + page), footer panel.
   Icons: Font Awesome Free 6.5.2 (self-hosted in assets/vendor/fontawesome). Icons CC BY 4.0, fonts SIL OFL 1.1, code MIT.
   Type: Rubik (headings, numbers) + Inter (text). Spacing on an 8px grid. Motion: transform and opacity only.

   Palette. Contrast checked against --panel (#161c31):
   --text 14.9:1, --body 10.1:1, --muted 5.6:1, --accent 10.5:1, --gold 8.4:1, dark text on --go 8.7:1, white on the sale badge 5.5:1. All pass WCAG AA. */
:root {
  --page: #0f1424;      /* page background */
  --side: #121729;      /* sidebar, darker than the content */
  --panel: #161c31;     /* panels */
  --panel-2: #1b2238;   /* boxes inside panels */
  --card: #20283f;      /* cards, a step lighter than their panel */
  --card-2: #283150;    /* hover, steppers, digit boxes */
  --line: #262e48;
  --line-2: #34405f;
  --text: #eef1fa;
  --body: #c3c9df;
  --muted: #8b93b8;
  --accent: #2bbaff;    /* Ender sky blue (sampled from the references): prices, fills, links, highlights */
  --accent-2: #5ccbff;
  --ink: #04223a;       /* dark text on blue fills (white on #2bbaff is only 2.2:1) */
  --go: #5fd068;        /* checkout and buy */
  --go-2: #78dc80;
  --go-ink: #08210b;
  --gold: #f5a524;      /* players online, badges */
  --sale: #ff5a4f;
  --ok: #5fd068;
  --bad: #ff6b61;
  --r-panel: 12px;     /* panels, header bar, footer (Ender ~12 at display scale) */
  --r-card: 9px;       /* cards, boxes, basket tiles (measured 18 on the 2x screenshots) */
  --r: 6px;            /* buttons, inputs, steppers (measured ~12 on the 2x screenshots) */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t: 200ms;
  --f-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-head: "Rubik", "Inter", system-ui, sans-serif;
  --wrap: 1300px;     /* a normal store width, centred */
  --gutter: max(16px, 3vw);
}
/* seasonal looks, switched on by the Tebex sale name (see config.js "seasons") */
:root[data-season="easter"] { --accent: #f5c4e0; --accent-2: #fbd9ec; --gold: #8fe08a; }
:root[data-season="halloween"] { --accent: #ff8a2a; --accent-2: #ffa458; --gold: #c58cff; }
:root[data-season="winter"] { --accent: #9fd8ff; --accent-2: #c2e7ff; --gold: #ffffff; }
:root[data-season="summer"] { --accent: #ffd34a; --accent-2: #ffe07a; --gold: #4fd8e0; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--body); font: 400 14px/1.6 var(--f-ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: color var(--t) var(--ease); }
a:hover { color: var(--accent-2); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-head); color: var(--text); line-height: 1.2; margin: 0 0 8px; font-weight: 700; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 16px; }
[hidden] { display: none !important; }
.wrap { width: min(var(--wrap), calc(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 { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--ink); padding: 8px 16px; border-radius: var(--r); }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.fa-solid, .fa-regular, .fa-brands { line-height: 1; }

/* hallway art behind the top of the page */
.page-bg { position: absolute; inset: 0 0 auto 0; height: 620px; z-index: -1; overflow: hidden; pointer-events: none; }
.page-bg__art { position: absolute; inset: -40px 0 0; background: url("../assets/hero.png?i=22") 50% 40% / cover no-repeat; image-rendering: pixelated; opacity: .16; will-change: transform; }
.page-bg__dim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 20, 36, .1), var(--page) 92%); animation: flicker 10s steps(1) infinite; }
@keyframes flicker { 0%, 78%, 80%, 82.5%, 100% { opacity: 1; } 78.5%, 80.8% { opacity: .6; } }

/* ------------------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r); border: 0;
  font: 700 14px/1 var(--f-head); white-space: nowrap; cursor: pointer; background: var(--go); color: var(--go-ink);
  transition: background-color var(--t) var(--ease), transform var(--t) var(--ease), color var(--t) var(--ease);
}
.btn:hover { background: var(--go-2); color: var(--go-ink); }
.btn:active { transform: translateY(1px); }
.btn--sm { height: 36px; font-size: 13px; }
.btn--lg { height: 48px; font-size: 15px; }
.btn--wide { width: 100%; }
.btn--dark { background: var(--card-2); color: var(--text); }
.btn--dark:hover { background: #33406a; color: var(--text); }
.btn--go { background: var(--go); color: var(--go-ink); }
.btn--yellow { background: var(--accent); color: var(--ink); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.x { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r); background: transparent; border: 0; color: var(--text); font-size: 22px; cursor: pointer; transition: background-color var(--t) var(--ease); }
.x:hover { background: var(--card); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--text); }
.input { width: 100%; min-width: 0; height: 48px; padding: 0 16px; border-radius: var(--r); background: var(--page); color: var(--text); border: 1px solid var(--line-2); font: 500 14px/1 var(--f-ui); transition: border-color var(--t) var(--ease); }
.input::placeholder { color: #6f78a0; }
.input:focus { outline: 0; border-color: var(--accent); }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; font: 600 12px/1 var(--f-ui); background: var(--page); color: var(--text); border: 1px solid var(--line-2); white-space: nowrap; }
.badge--hot { background: var(--gold); color: #1f1300; border-color: transparent; font-weight: 700; }
.badge--sale { background: #c42d24; color: #fff; border-color: transparent; font-weight: 700; }

/* ------------------------------------------------------------ utility row */
.shell { padding-top: 16px; }
.util { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 40px; }
.util__left, .util__right { display: flex; align-items: center; gap: 24px; }
.util__link { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--body); font: 600 13px/1 var(--f-ui); transition: color var(--t) var(--ease); }
.util__link:hover { color: var(--text); }
.util__link i { color: var(--muted); }
.util__link em { font-style: normal; color: var(--accent); }
.util__who img { width: 22px; height: 22px; border-radius: 4px; image-rendering: pixelated; }
.util__count { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--accent); color: var(--ink); font: 700 11px/1 var(--f-ui); }
.util__count.is-bump { animation: bump 450ms var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ------------------------------------------------------------ header bar */
.bar { display: flex; align-items: center; gap: 40px; height: 88px; margin-top: 16px; padding: 0 40px; border-radius: var(--r-panel); background: var(--panel); border: 1px solid var(--line); }
.bar__logo img { display: block; height: 48px; width: auto; image-rendering: pixelated; }
.bar__nav { flex: 1; display: flex; justify-content: space-around; gap: 8px; }
.bar__nav a { padding: 8px; color: var(--body); font: 600 16px/1 var(--f-head); white-space: nowrap; transition: color var(--t) var(--ease); }
.bar__nav a:hover { color: var(--text); }
.bar__nav a[aria-current="page"] { color: var(--accent); }

/* ------------------------------------------------------------ banner */
.banner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; min-height: 120px; margin-top: 24px; padding: 24px 32px; border-radius: var(--r-panel); background: var(--panel); border: 1px solid var(--line); }
.banner__badge { justify-self: start; display: inline-flex; align-items: center; height: 56px; padding: 0 16px; border-radius: var(--r); background: var(--accent); color: var(--ink); font: 800 22px/1 var(--f-head); text-transform: uppercase; }
.banner--sale .banner__badge { background: var(--go); color: var(--go-ink); font-size: 28px; }
.banner__title { display: grid; justify-items: center; gap: 8px; }
.banner__title b { font: 800 30px/1.1 var(--f-head); color: var(--text); text-transform: uppercase; text-align: center; }
.banner__title i { width: 72px; height: 5px; border-radius: 4px; background: var(--accent); }
.banner__side { justify-self: end; display: flex; gap: 8px; align-items: center; }
.banner__side > i { color: var(--gold); }
.banner__side > span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.banner__side > strong { font: 800 24px/1 var(--f-head); color: var(--accent); }
.count-box { display: grid; place-items: center; align-content: center; width: 56px; height: 60px; border-radius: 8px; background: var(--side); }
.count-box b { font: 800 24px/1 var(--f-head); color: var(--sale); }
.count-box small { font: 600 9px/1 var(--f-ui); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }

/* ------------------------------------------------------------ main panel */
.panel { display: grid; grid-template-columns: minmax(260px, 24%) minmax(0, 1fr); margin-top: 24px; border-radius: var(--r-panel); background: var(--panel); border: 1px solid var(--line); }
.side { padding: 32px 24px; background: var(--side); border-radius: var(--r-panel) 0 0 var(--r-panel); display: grid; gap: 40px; align-content: start; text-align: center; }
.side__block h3 { font-size: 18px; margin: 12px 0 4px; font-weight: 800; }
.side__small { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.side__accent { margin: 8px 0 0; color: var(--gold); font: 700 15px/1 var(--f-head); }
.side__online .side__small { font-size: 15px; color: var(--body); margin-top: 4px; }
.digits { display: flex; justify-content: center; gap: 6px; }
.digits span { display: grid; place-items: center; width: 40px; height: 52px; border-radius: 8px; background: var(--card-2); color: var(--text); font: 800 28px/1 var(--f-head); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
[data-on="0"] .side__accent { color: var(--muted); }
.side__icon { width: 104px; height: 104px; display: block; margin: 0 auto; transition: transform 400ms var(--ease); }
.side__block:hover .side__icon { transform: rotate(-6deg) scale(1.05); }
.side__promo .btn { margin-top: 16px; }
.goal { position: relative; margin: 40px 0 8px; }
.goal__bubble { position: absolute; top: -32px; transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: var(--card-2); color: var(--text); font: 700 12px/1 var(--f-head); }
.goal__bubble::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--card-2); }
.goal__bar { height: 12px; border-radius: 999px; background: var(--page); border: 1px solid var(--line-2); overflow: hidden; }
.goal__bar i { display: block; height: 100%; border-radius: 999px; background: var(--gold); transform-origin: left; animation: grow 900ms var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.pay-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; text-align: left; }
.pay-list li { display: flex; gap: 12px; align-items: center; font-size: 13px; line-height: 1.4; color: var(--muted); }
.pay-list img { width: 36px; height: 36px; border-radius: 6px; image-rendering: pixelated; flex: none; }
.pay-list b { color: var(--body); }
.pay-list em { font-style: normal; color: var(--muted); }
.content { min-width: 0; padding: 32px; }

/* ------------------------------------------------------------ home */
.strip { display: flex; align-items: center; gap: 16px; padding: 16px 24px; border-radius: var(--r-card); background: var(--panel-2); margin-bottom: 24px; }
.strip img { width: 44px; height: 44px; flex: none; border-radius: 6px; image-rendering: pixelated; }
.strip--daily img { image-rendering: auto; }
.strip__text { flex: 1; min-width: 0; }
.strip__text b { display: block; color: var(--text); font: 700 15px/1.3 var(--f-head); }
.strip__text span { color: var(--muted); font-size: 13px; }
.strip .btn { width: 240px; }
.strip--daily .btn:not(.btn--dark) { background: var(--accent); color: var(--ink); }

.cats { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cat { display: flex; align-items: center; gap: 24px; min-height: 152px; padding: 16px 24px; border-radius: var(--r-card); background: var(--panel-2); color: var(--body); transition: transform 260ms var(--ease), background-color var(--t) var(--ease); }
.cat:hover { transform: translateY(-2px); background: var(--card); color: var(--body); }
.cat img { width: 120px; height: 120px; flex: none; transition: transform 400ms var(--ease); }
.cat:hover img { transform: rotate(-8deg) scale(1.06); }
.cat h3 { font-size: 26px; margin: 0 0 4px; font-weight: 800; }
.cat__go { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font: 500 14px/1 var(--f-ui); }
.cat__go i { transition: transform var(--t) var(--ease); }
.cat:hover .cat__go { color: var(--accent); }
.cat:hover .cat__go i { transform: translateX(4px); }
.welcome { margin-top: 40px; max-width: 900px; }
.welcome h2 { font-size: 24px; font-weight: 800; }
.welcome p { color: var(--body); margin: 0 0 8px; }
.welcome b { color: var(--text); }

/* ------------------------------------------------------------ page headers and tabs */
.head-box { padding: 24px; border-radius: var(--r-card); background: var(--panel-2); margin-bottom: 24px; }
.head-box h1 { font-size: 26px; font-weight: 800; margin: 0 0 4px; }
.head-box .lead { color: var(--body); max-width: 110ch; }
.head-box .lead p { margin: 0; }
.head-box .note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.head-box .note b { color: var(--text); }
.tabs { display: flex; gap: 8px; margin: -8px 0 24px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r); background: var(--panel-2); color: var(--body); font: 600 14px/1 var(--f-head); }
.tabs a:hover { color: var(--text); background: var(--card); }
.tabs a[aria-current="page"] { background: var(--accent); color: var(--ink); }
.section { margin-top: 40px; }

/* ------------------------------------------------------------ package grid */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 16px 16px; border-radius: var(--r-card); background: var(--card); transition: transform 260ms var(--ease), box-shadow 260ms var(--ease); }
.card:hover, .card:focus-within { transform: translateY(-4px); box-shadow: 0 16px 32px -16px rgba(0, 0, 0, .6); }
.card__flags { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px; }
.card__art { position: relative; width: 100%; height: 200px; display: grid; place-items: center; }
.card__art img { position: absolute; width: 184px; height: 184px; transition: opacity 240ms var(--ease); }
.card--tok .card__art img { width: calc(190px * var(--grow, 1)); height: calc(190px * var(--grow, 1)); bottom: 0; }
.card__still { animation: float 6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -900ms); }
.card__spin { opacity: 0; }
.card.is-spinning .card__still { opacity: 0; }
.card.is-spinning .card__spin { opacity: 1; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.card h3 { margin: 16px 0 4px; font-size: 18px; font-weight: 700; }
.card__open { all: unset; cursor: pointer; }
.card__open::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.card__open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.price { color: var(--body); font: 500 15px/1.2 var(--f-ui); }
.price s { color: var(--sale); margin-right: 4px; }
.card__extra { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.card__deal { margin: 8px 0 0; color: var(--gold); font-size: 12px; font-weight: 600; }
.card__buy { margin-top: 16px; width: 100%; position: relative; z-index: 1; display: grid; gap: 8px; }
.card__buy .btn { width: 100%; height: 48px; font-size: 16px; }
.stepper { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; height: 48px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel); }
.stepper button { height: 100%; background: none; border: 0; cursor: pointer; color: var(--text); transition: background-color var(--t) var(--ease); border-radius: var(--r); }
.stepper button:hover { background: var(--card-2); }
.stepper span { color: var(--text); font: 600 14px/1 var(--f-ui); display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.card__links { display: flex; justify-content: center; gap: 16px; font-size: 12px; }
.card__links button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.card__links button:hover { color: var(--text); }
.card--best { box-shadow: 0 0 0 2px var(--accent); }
.grid--tok { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ------------------------------------------------------------ rank table */
.ranks { border-radius: var(--r-card); background: var(--panel-2); padding: 8px 24px 24px; }
.rt { width: 100%; border-collapse: separate; border-spacing: 12px 0; table-layout: fixed; }
.rt th, .rt td { padding: 0; }
.rt thead th { position: sticky; top: 0; z-index: 3; background: var(--panel-2); vertical-align: bottom; padding: 16px 0 12px; }
.rt .rt__corner { text-align: left; vertical-align: bottom; width: 28%; }
.rt__corner span { display: block; color: var(--muted); font-size: 13px; font-weight: 400; max-width: 30ch; }
.rt__head { display: grid; justify-items: center; gap: 4px; text-align: center; position: relative; padding-top: 24px; }
.rt__head img { width: 96px; height: 96px; }
.rt__head b { color: var(--text); font: 700 15px/1.2 var(--f-head); }
.rt__head small { color: var(--body); font-size: 13px; }
.rt__head small s { color: var(--sale); }
.rt__head .btn { width: 100%; height: 40px; font-size: 14px; margin-top: 8px; }
.rt__head .badge { position: absolute; top: 0; }
.rt .sec td { padding: 24px 0 8px; border-bottom: 1px solid var(--line); }
.rt .sec button { all: unset; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; color: var(--muted); font: 600 13px/1 var(--f-head); }
.rt .sec button:hover { color: var(--text); }
.rt .sec button i { transition: transform var(--t) var(--ease); }
.rt .sec button[aria-expanded="false"] i { transform: rotate(-90deg); }
.rt tbody th, .rt tbody td { height: 44px; border-bottom: 1px solid var(--line); }
.rt tbody th { text-align: left; color: var(--body); font-weight: 400; font-size: 13px; }
.rt tbody td { text-align: center; color: var(--text); font-size: 13px; }
.rt td.hl, .rt th.hl { background: rgba(43, 186, 255, .06); }
.rt thead th.hl { background: #232a42; box-shadow: inset 0 3px 0 var(--accent); border-radius: 10px 10px 0 0; }
.rt .v { font: 600 13px/1 var(--f-head); }
.yes { color: var(--ok); font-size: 15px; }
.no { color: var(--bad); font-size: 15px; opacity: .85; }
.tip { position: relative; color: var(--muted); cursor: help; margin-left: 4px; }
.tip::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); width: 240px; padding: 8px 12px; border-radius: 8px;
  background: #0b0f1c; color: var(--text); font: 400 12px/1.45 var(--f-ui); box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  opacity: 0; transform: translate(-50%, 4px); pointer-events: none; transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); z-index: 5;
}
.tip:hover::after, .tip:focus::after { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ rank path */
.path { position: relative; display: grid; gap: 8px; padding-left: 56px; max-width: 980px; }
.path::before { content: ""; position: absolute; left: 19px; top: 24px; bottom: 24px; width: 3px; border-radius: 3px; background: var(--line-2); }
.path__node { position: relative; display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--r-card); background: var(--card); border: 2px solid transparent; }
.path__node--hl { border-color: var(--accent); }
.path__dot { position: absolute; left: -56px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--panel); border: 3px solid var(--accent); color: var(--text); font: 800 15px/1 var(--f-head); }
.path__card { all: unset; cursor: pointer; flex: 1; display: flex; gap: 16px; align-items: center; min-width: 0; }
.path__card img { width: 88px; height: 88px; flex: none; transition: transform 300ms var(--ease); }
.path__card:hover img { transform: rotate(-6deg) scale(1.05); }
.path__text b { display: flex; align-items: center; gap: 8px; color: var(--text); font: 700 18px/1.2 var(--f-head); }
.path__text small { display: block; color: var(--muted); font-size: 13px; margin: 2px 0 8px; }
.path__text small s { color: var(--sale); }
.path__gain { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; color: var(--body); }
.path__gain li::before { content: "+ "; color: var(--ok); font-weight: 700; }
.path__node .btn { flex: none; width: 140px; }
.path__up { position: relative; margin: 0 0 0 0; padding: 4px 0 4px 16px; color: var(--muted); font-size: 13px; }
.path__up b { color: var(--accent); }
.path__up i { color: var(--ok); margin-right: 4px; }

/* ------------------------------------------------------------ patrons */
.patron-hero { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: center; padding: 24px; border-radius: var(--r-card); background: var(--card); }
.patron-hero > img { width: 220px; height: 220px; animation: float 6s ease-in-out infinite; }
.patron-hero h2 { font-size: 26px; font-weight: 800; margin: 12px 0 4px; }
.patron-hero__buy { display: grid; gap: 8px; justify-items: start; margin-top: 16px; }
.patron-hero__buy .btn { background: var(--accent); color: var(--ink); }
.patron-hero__buy .btn s { color: #7a4b00; }
.patron-hero__buy .muted { font-size: 12px; max-width: 70ch; }
.list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.patrons { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 16px; }
.patron { display: grid; justify-items: center; gap: 8px; padding: 16px; border-radius: var(--r-card); background: var(--card); text-align: center; }
.patron img { width: 64px; height: 64px; border-radius: 8px; image-rendering: pixelated; }
.patron b { color: var(--text); font: 700 14px/1.2 var(--f-head); word-break: break-all; }

/* ------------------------------------------------------------ gift cards */
.gcs { display: grid; gap: 16px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.gc { all: unset; box-sizing: border-box; grid-column: span 2; display: flex; flex-direction: column; justify-content: space-between; min-height: 200px; padding: 24px; border-radius: var(--r-card); background: var(--card); cursor: pointer; transition: background-color var(--t) var(--ease), transform 260ms var(--ease); }
.gc--wide { grid-column: span 3; min-height: 300px; }
.gc__top { display: flex; align-items: center; gap: 12px; }
.gc__top i { font-size: 32px; color: var(--muted); }
.gc__top b { font: 800 40px/1 var(--f-head); color: var(--text); }
.gc__top img { margin-left: auto; height: 36px; width: auto; image-rendering: pixelated; }
.gc--wide .gc__top img { height: 52px; }
.gc__code { align-self: flex-end; color: var(--muted); font: 500 18px/1 var(--f-ui); letter-spacing: .04em; }
.gc:hover, .gc:focus-visible { background: var(--accent); transform: translateY(-2px); }
.gc:hover i, .gc:hover b, .gc:hover .gc__code, .gc:focus-visible i, .gc:focus-visible b, .gc:focus-visible .gc__code { color: var(--ink); }
.gc--off { cursor: not-allowed; opacity: .55; }
.gc--off:hover { background: var(--card); transform: none; }
.gc--off:hover i, .gc--off:hover .gc__code { color: var(--muted); }
.gc--off:hover b { color: var(--text); }
.gc__note { margin-top: 24px; font-size: 13px; }

/* ------------------------------------------------------------ loading + reveal */
.skel { position: relative; overflow: hidden; height: 152px; border-radius: var(--r-card); background: var(--panel-2); }
.skel--strip { height: 76px; margin-bottom: 24px; }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .05) 45%, transparent 70%); transform: translateX(-100%); animation: shimmer 1.4s var(--ease) infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ease) calc(var(--i, 0) * 60ms), transform 500ms var(--ease) calc(var(--i, 0) * 60ms); }
.reveal.is-in { opacity: 1; transform: none; }
.card.reveal.is-in, .cat.reveal.is-in, .gc.reveal.is-in { transition: opacity 500ms var(--ease) calc(var(--i, 0) * 60ms), transform 260ms var(--ease), box-shadow 260ms var(--ease), background-color var(--t) var(--ease); }
.view-in { animation: viewIn 360ms var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------ basket drawer */
.drawer { position: fixed; inset: 0; z-index: 80; pointer-events: none; visibility: hidden; transition: visibility 0s linear 340ms; }
.drawer__shade { position: absolute; inset: 0; background: rgba(5, 8, 16, .7); opacity: 0; transition: opacity 300ms var(--ease); }
.drawer__box { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); display: flex; flex-direction: column; background: var(--panel); transform: translateX(100%); transition: transform 340ms var(--ease); }
.drawer.is-open { pointer-events: auto; visibility: visible; transition: none; }
.drawer.is-open .drawer__shade { opacity: 1; }
.drawer.is-open .drawer__box { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 24px 0 56px; }
.drawer__head h2 { margin: 24px 0 0; font-size: 34px; font-weight: 800; display: flex; align-items: center; gap: 16px; }
.drawer__head h2 i { font-size: 28px; }
.drawer__body { flex: 1; display: flex; flex-direction: column; overflow-y: auto; padding: 40px 32px 32px 56px; }
.bl { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 24px; }
.bl li { display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: center; animation: viewIn 260ms var(--ease) both; }
.bl__img { display: grid; place-items: center; width: 120px; height: 120px; border-radius: var(--r-card); background: var(--side); }
.bl__img img { width: 96px; height: 96px; }
.bl b { display: block; color: var(--text); font: 800 18px/1.3 var(--f-head); }
.bl__price { display: block; color: var(--accent); font-size: 15px; margin: 2px 0 8px; }
.bl small { display: block; color: var(--muted); font-size: 12px; margin: -4px 0 8px; }
.qty { display: inline-grid; grid-template-columns: 36px 28px 36px; align-items: center; height: 32px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--side); }
.qty button { height: 100%; background: none; border: 0; cursor: pointer; color: var(--body); font-size: 12px; }
.qty button:hover { color: var(--text); }
.qty span { text-align: center; font-weight: 600; font-size: 15px; color: var(--text); }
.rm { display: block; margin-top: 6px; background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.rm:hover { color: var(--bad); }
.drawer__foot { margin-top: auto; display: grid; gap: 16px; }
.infobar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-radius: var(--r-card); background: var(--accent); color: var(--ink); font-size: 15px; line-height: 1.4; }
.infobar i { font-size: 26px; }
.totalbox { padding: 16px; border-radius: var(--r-card); background: var(--side); display: grid; gap: 16px; }
.totalbox__row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0 0; }
.totalbox__row span { color: var(--body); font-size: 15px; text-transform: uppercase; }
.totalbox__row strong { font: 500 22px/1 var(--f-ui); color: var(--accent); }
.empty { text-align: center; padding: 32px 8px; }
.empty img { width: 104px; height: 104px; }
.empty p { color: var(--muted); }

/* ------------------------------------------------------------ pop-ups */
.modal { width: min(820px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border-radius: var(--r-panel); background: var(--panel); color: var(--body); border: 1px solid var(--line-2); }
.modal--sm { width: min(760px, calc(100% - 32px)); }
.modal[open] { animation: pop 260ms var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.modal::backdrop { background: rgba(5, 8, 16, .75); animation: fade 260ms var(--ease); }
@keyframes fade { from { opacity: 0; } }
.modal__close { position: absolute; top: 12px; right: 12px; margin: 0; z-index: 2; }
.modal__body { padding: 24px; }
.pv { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 24px; }
.pv__left { position: relative; display: grid; gap: 12px; align-content: start; padding: 16px; border-radius: var(--r-card); background: var(--side); text-align: center; }
.pv__save { position: absolute; top: 12px; right: 12px; }
.pv__left img { width: 176px; height: 176px; margin: 8px auto 0; }
.pv__price { font: 600 16px/1 var(--f-ui); color: var(--text); }
.pv__price s { color: var(--sale); }
.pv__gift { display: flex; align-items: center; gap: 8px; justify-content: center; background: var(--panel-2); border: 0; border-radius: var(--r); height: 44px; cursor: pointer; color: var(--text); font: 700 14px/1 var(--f-head); }
.pv__gift:hover { background: var(--card); }
.pv__gift i:first-child { color: var(--accent); }
.pv__right h2 { font-size: 22px; font-weight: 800; padding-right: 32px; }
.pv__flavour { color: var(--muted); margin: 0 0 16px; }
.list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.list li { position: relative; padding-left: 24px; color: var(--body); }
.list li::before { content: "\f00c"; font: var(--fa-font-solid); position: absolute; left: 0; top: .25em; font-size: 12px; color: var(--ok); }
.list li.from { color: var(--text); font-weight: 600; }
.list li.from::before { content: "\2b"; color: var(--accent); }
.pv__note { font-size: 13px; color: var(--muted); padding: 12px 16px; border-radius: var(--r); background: var(--side); margin: 0; }
.lg { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: center; }
.lg__avatar { display: grid; place-items: center; width: 220px; height: 220px; border-radius: 999px; background: var(--side); overflow: hidden; }
.lg__avatar img { width: 136px; height: 136px; image-rendering: pixelated; }
.lg h2 { font-size: 30px; font-weight: 800; }
.lg form { display: grid; gap: 12px; }
.lg .btn { background: var(--accent); color: var(--ink); }
.err { color: var(--bad); margin: 0; min-height: 1.2em; font-size: 13px; }

/* ------------------------------------------------------------ toasts */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 90; display: grid; gap: 8px; width: min(360px, calc(100% - 48px)); pointer-events: none; }
.toast { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 8px 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line-2); color: var(--text); font-size: 13px; font-weight: 600; animation: toastIn 300ms var(--ease) both; }
.toast img { width: 40px; height: 40px; margin-left: -8px; }
.toast i { color: var(--ok); font-size: 18px; }
.toast--error i { color: var(--bad); }
.toast.is-out { animation: toastOut 240ms var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
.thanks { text-align: center; padding: 32px 8px; }
.thanks img { width: 144px; height: 144px; }

/* ------------------------------------------------------------ footer */
.foot { margin-top: 32px; padding-bottom: 24px; }
.foot__panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; padding: 32px 40px; border-radius: var(--r-panel); background: var(--panel); border: 1px solid var(--line); }
.foot__panel h3 { font-size: 19px; font-weight: 800; margin: 0 0 4px; }
.foot__panel p { color: var(--muted); font-size: 13px; margin: 0 0 16px; max-width: 44ch; }
.foot__links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 14px; }
.foot__links a { color: var(--body); }
.foot__links a:hover { color: var(--accent); }
.foot__legal, .foot__tebex { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 16px 8px 0; font-size: 12px; color: var(--muted); }
.foot__legal p, .foot__tebex p { margin: 0; }
.foot__legal p:first-child { font-weight: 700; }
.foot__tebex nav { display: flex; gap: 16px; }
.foot__tebex a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1400px) {
  .grid--tok { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .bar { height: auto; flex-wrap: wrap; gap: 8px; padding: 16px; }
  .bar__logo { margin: 0 auto; }
  .bar__nav { flex-basis: 100%; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
  .gcs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gc, .gc--wide { grid-column: span 1; min-height: 180px; }
  .gc--wide:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .panel { grid-template-columns: 1fr; }
  .side { order: 2; border-radius: 0 0 var(--r-panel) var(--r-panel); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .banner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .banner__badge, .banner__side { justify-self: center; }
  .patron-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .patron-hero__buy { justify-items: center; }
  .list--2 { grid-template-columns: 1fr; text-align: left; }
  /* rank table: scroll sideways with the feature names pinned */
  .ranks { overflow-x: auto; padding: 8px 12px 16px; }
  .rt { min-width: 760px; }
  .rt .rt__corner, .rt tbody th { position: sticky; left: 0; z-index: 2; background: var(--panel-2); }
  .rt thead .rt__corner { z-index: 4; }
}
@media (max-width: 640px) {
  :root { --gutter: 12px; }
  .util__left { gap: 16px; }
  .util__link span[data-ip] { display: none; }
  .bar__nav a { font-size: 14px; padding: 6px; }
  .banner { min-height: 0; padding: 16px; gap: 12px; }
  .banner__badge { height: 40px; font-size: 16px; }
  .banner__title b { font-size: 20px; }
  .count-box { width: 48px; height: 52px; }
  .content { padding: 16px; }
  .strip { flex-wrap: wrap; padding: 16px; }
  .strip .btn { width: 100%; }
  .cats { grid-template-columns: 1fr; }
  .cat { min-height: 112px; }
  .cat img { width: 88px; height: 88px; }
  .cat h3 { font-size: 21px; }
  .grid, .grid--tok { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card { padding: 20px 10px 12px; }
  .card__art { height: 128px; }
  .card__art img { width: 120px; height: 120px; }
  .card--tok .card__art img { width: calc(128px * var(--grow, 1)); height: calc(128px * var(--grow, 1)); }
  .card h3 { font-size: 15px; }
  .card__buy .btn, .stepper { height: 42px; font-size: 13px; }
  .stepper { grid-template-columns: 36px 1fr 36px; }
  .path { padding-left: 44px; }
  .path::before { left: 15px; }
  .path__dot { left: -44px; width: 32px; height: 32px; font-size: 13px; }
  .path__node { flex-wrap: wrap; }
  .path__node .btn { width: 100%; }
  .path__card img { width: 64px; height: 64px; }
  .gcs { grid-template-columns: 1fr; }
  .gc__top b { font-size: 32px; }
  .pv, .lg { grid-template-columns: 1fr; }
  .lg__avatar { width: 120px; height: 120px; margin: 0 auto; }
  .lg__avatar img { width: 80px; height: 80px; }
  .drawer__head { padding: 16px 16px 0 24px; }
  .drawer__head h2 { font-size: 28px; margin-top: 8px; }
  .drawer__body { padding: 24px; }
  .bl li { grid-template-columns: 88px 1fr; gap: 16px; }
  .bl__img { width: 88px; height: 88px; }
  .bl__img img { width: 72px; height: 72px; }
  .foot__panel { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .toasts { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .reveal { opacity: 1; transform: none; }
  .card:hover, .cat:hover, .gc:hover { transform: none; }
}

/* rank comparison uses the whole panel, like Ender's rank page */
.panel--full { grid-template-columns: 1fr; }
.panel--full .side { display: none; }
.gc--off.reveal.is-in { opacity: .55; }
@media (max-width: 900px) {
  .rt .sec button { position: sticky; left: 0; width: auto; justify-content: flex-start; padding-left: 4px; }
}

/* ------------------------------------------------------------ banner (sale and default share one design) */
.banner { position: relative; overflow: hidden; isolation: isolate; min-height: 128px; }
.banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../assets/hero.png?i=22") 70% 45% / cover no-repeat; image-rendering: pixelated; opacity: .1; }
:root[data-season] .banner::before { opacity: .16; }
.banner__badge { background: var(--go); color: var(--go-ink); font-size: 28px; height: 60px; padding: 0 20px; border-radius: var(--r-card); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); }
.banner__title b { font-size: 34px; }
.banner__title i { width: 72px; height: 6px; background: var(--accent); }
.count-box { width: 60px; height: 64px; }
.count-box b { font-size: 26px; }
.feat { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: var(--r-card); background: var(--side); transition: background-color var(--t) var(--ease); }
.feat:hover { background: var(--card); }
.feat img { width: 52px; height: 52px; }
.feat b { display: block; color: var(--text); font: 700 15px/1.2 var(--f-head); }
.feat em { font-style: normal; color: var(--accent); font: 600 14px/1.2 var(--f-ui); }
.feat em s { color: var(--sale); margin-right: 4px; }
.feat > i { color: var(--muted); margin-left: 8px; }
@media (max-width: 640px) {
  .banner__badge { height: 44px; font-size: 18px; }
  .banner__title b { font-size: 22px; }
  .count-box { width: 52px; height: 56px; }
  .count-box b { font-size: 21px; }
}
.side__head { width: 88px; height: 88px; border-radius: var(--r); image-rendering: pixelated; margin: 12px auto 8px; display: block; }
.side__name { margin: 0; color: var(--text); font: 700 15px/1.2 var(--f-head); }
.side__name i { color: var(--gold); }

/* ------------------------------------------------------------ rank table (Ender-style: column header box, strip rows) */
.rk { --label: minmax(220px, 1.3fr); overflow-x: auto; padding-bottom: 8px; }
.rk__heads, .rk__row { display: grid; grid-template-columns: var(--label) repeat(var(--cols), minmax(150px, 1fr)); gap: 16px; align-items: center; min-width: calc(240px + var(--cols) * 166px); }
.rk__heads { align-items: end; padding: 16px 24px 0 16px; }
.rk__box { grid-column: 2 / -1; display: grid; grid-template-columns: subgrid; align-items: end; padding: 24px 0; border-radius: var(--r-card); background: var(--panel-2); box-shadow: 0 0 0 12px var(--panel-2); }
.rk__corner { align-self: stretch; }
.rk__col { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; }
.rk__img { all: unset; cursor: pointer; display: grid; place-items: center; width: 140px; height: 140px; }
.rk__img img { width: 140px; height: 140px; transition: transform 300ms var(--ease); }
.rk__img:hover img { transform: translateY(-4px) rotate(-3deg); }
.rk__col b { color: var(--text); font: 700 17px/1.2 var(--f-head); margin-top: 8px; }
.rk__col small { color: var(--muted); font-size: 14px; }
.rk__col small s { color: var(--sale); margin-right: 4px; }
.rk__col .btn { width: 100%; height: 44px; margin-top: 12px; font-size: 15px; }
.rk__flag { position: absolute; top: -8px; left: 0; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--sale); color: #fff; font: 700 11px/1 var(--f-ui); background: #c42d24; }
.rk__body { display: grid; gap: 8px; margin-top: 16px; }
.rk__sec { display: flex; align-items: center; gap: 16px; padding: 16px 0 4px; min-width: calc(240px + var(--cols) * 166px); }
.rk__sec::before, .rk__sec::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.rk__sec button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: var(--body); font: 700 14px/1 var(--f-head); }
.rk__sec button:hover { color: var(--text); }
.rk__sec button i { font-size: 11px; color: var(--muted); transition: transform var(--t) var(--ease); }
.rk__sec button[aria-expanded="false"] i { transform: rotate(-90deg); }
.rk__row { min-height: 52px; padding: 8px 24px 8px 16px; border-radius: var(--r); background: var(--panel-2); transition: background-color var(--t) var(--ease); }
.rk__row:hover { background: var(--card); }
.rk__label { color: var(--body); font-size: 14px; }
.rk__cell { text-align: center; color: var(--text); font-size: 15px; }
.rk__v { font: 600 15px/1 var(--f-head); }
.rk__tag { display: inline-block; padding: 4px 8px; border-radius: 4px; border: 2px solid var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); font: 800 12px/1 var(--f-head); letter-spacing: .04em; }
.rk .yes { color: var(--ok); }
.rk .no { color: var(--bad); }
@media (max-width: 900px) {
  .rk__label { position: sticky; left: 0; z-index: 1; background: inherit; padding-right: 8px; }
  .rk__corner { position: sticky; left: 0; }
}

/* ------------------------------------------------------------ rank path (Ender-style vertical event path) */
/* states */
@media (max-width: 640px) {
}
.lg__hint { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.lg__hint i { color: var(--accent); }

/* ------------------------------------------------------------ in-game rank tags (pack sprites, 12 frames of 9 px) */
.rtag {
  display: inline-block; vertical-align: middle; flex: none;
  width: calc(var(--w) * var(--px) * 1px); height: calc(9px * var(--px));
  background-repeat: no-repeat; background-size: calc(var(--w) * var(--px) * 1px) calc(108px * var(--px));
  background-position: 0 0; image-rendering: pixelated;
  animation: rtag 1.8s steps(12) infinite;   /* the tab list cycles one frame every 3 ticks (150 ms) */
}
@keyframes rtag { to { background-position: 0 calc(-108px * var(--px)); } }
.rmoon {
  display: inline-block; vertical-align: middle; width: calc(9px * var(--px)); height: calc(9px * var(--px));
  background: url("../assets/ranks/moon.png?i=22") 0 0 / calc(108px * var(--px)) calc(9px * var(--px)) no-repeat; image-rendering: pixelated;
  animation: rmoon 1.8s steps(12) infinite;
}
@keyframes rmoon { to { background-position: calc(-108px * var(--px)) 0; } }
/* title tags: pixel caps in their catalog colour, with the game's text shadow */
.ttag { position: relative; display: inline-block; font: 400 13px/1.2 "Silkscreen", var(--f-head); color: var(--c); text-shadow: 2px 2px 0 rgba(0, 0, 0, .55); letter-spacing: .02em; white-space: nowrap; }
.ttag--gold { background: linear-gradient(100deg, #c9962e 0%, #ffd870 35%, #fffbe0 50%, #ffd870 65%, #c9962e 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .55)); animation: tshine 2.2s linear infinite; }
@keyframes tshine { from { background-position: 125% 0; } to { background-position: -125% 0; } }
.ttag--prism { background: linear-gradient(90deg, #ff6a5a, #ffd870, #7af07a, #40e0d0, #8a78ff, #f08cd0, #ff6a5a) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .55)); animation: tprism 3s linear infinite; }
@keyframes tprism { to { background-position: -200% 0; } }
.ttag--glitch { animation: tglitch 1.6s steps(1) infinite; }
.ttag--glitch::before, .ttag--glitch::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; text-shadow: none; opacity: 0; }
.ttag--glitch::before { color: #40e0d0; animation: tglitchA 1.6s steps(1) infinite; }
.ttag--glitch::after { color: #ff3fd0; animation: tglitchB 1.6s steps(1) infinite; }
@keyframes tglitch { 0%, 100% { transform: none; } 62% { transform: translateX(1px); } 64% { transform: translateX(-2px); } 66% { transform: none; } }
@keyframes tglitchA { 0%, 58%, 70%, 100% { opacity: 0; } 60%, 66% { opacity: .9; transform: translate(-2px, -1px); clip-path: inset(0 0 55% 0); } }
@keyframes tglitchB { 0%, 58%, 70%, 100% { opacity: 0; } 61%, 67% { opacity: .9; transform: translate(2px, 1px); clip-path: inset(50% 0 0 0); } }
.rk__titles { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
.rk__tagline { display: block; margin: 4px 0 2px; min-height: 18px; }
.pv__tag { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 13px; }
.pv__you { font: 400 15px/1 "Silkscreen", var(--f-head); color: var(--text); text-shadow: 2px 2px 0 rgba(0, 0, 0, .55); }
.strip__text b .rtag { margin-left: 8px; }
.pay-list .rtag { margin: 2px 0; }

.badge--free { background: rgba(95, 208, 104, .16); color: var(--ok); border-color: rgba(95, 208, 104, .4); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* basket control in the utility row (Ender keeps it a plain icon + label link; ours adds the count and total) */
.util__link[data-open-basket] { gap: 8px; }
.util__link[data-open-basket]:hover, .util__who:hover { color: var(--accent); }
.util__link[data-open-basket]:hover i, .util__who:hover i { color: var(--accent); }
.util__sum { color: var(--accent); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .rtag { animation: none; background-position: 0 calc(-9px * var(--px) * var(--still)); }
  .rmoon { animation: none; }
}

/* 3D logo in the header bar; the flicker version plays on hover */
.bar__logo { position: relative; display: block; flex: none; }
.bar__logo img { display: block; height: 64px; width: auto; image-rendering: auto; }
.gc__top img { image-rendering: auto; height: 44px; }
.gc--wide .gc__top img { height: 64px; }
/* community goal icon: still render, spins on hover like the cards */
.side__spin { position: relative; display: block; width: 104px; height: 104px; margin: 0 auto; }
.side__spin img { position: absolute; inset: 0; transition: opacity var(--t) var(--ease); }
.side__spin .card__spin { opacity: 0; }
.side__spin.is-spinning .card__still { opacity: 0; }
.side__spin.is-spinning .card__spin { opacity: 1; }
@media (max-width: 1100px) { .bar__logo img { height: 56px; } }
@media (max-width: 640px) { .bar__logo img { height: 48px; } }

/* ------------------------------------------------------------ rank path (Ender event path layout) */
.ep { max-width: 940px; }
.ep__head { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--accent); font: 600 13px/1.4 var(--f-ui); }
.ep__track { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.ep__track::before { content: ""; position: absolute; left: 39px; top: 0; bottom: 0; width: 2px; background: #222b47; }
.ep__step { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 16px; align-items: center; }
.ep__node { position: relative; z-index: 1; justify-self: center; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px; background: var(--panel); border: 3px solid #2f3a5c; color: #7f8ab3; font-size: 14px; }
.ep__card { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: var(--r-card); background: var(--panel-2); border: 1px solid transparent; cursor: pointer; transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease); }
.ep__card:hover { background: var(--card); }
.ep__card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ep__img { flex: none; display: grid; place-items: center; width: 150px; height: 150px; border-radius: var(--r-card); background: var(--side); }
.ep__img img { width: 128px; height: 128px; transition: transform 300ms var(--ease); }
.ep__card:hover .ep__img img { transform: scale(1.04); }
.ep__text { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.ep__text b { display: flex; align-items: center; gap: 8px; color: var(--text); font: 800 17px/1.25 var(--f-head); }
.ep__free { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: rgba(95, 208, 104, .18); color: var(--ok); font: 800 12px/1 var(--f-head); text-transform: uppercase; }
.ep__price { color: var(--body); font-size: 14px; }
.ep__price s { color: var(--sale); margin-right: 4px; }
.ep__desc { color: var(--muted); font-size: 14px; }
.ep__lock { display: inline-flex; align-items: center; gap: 8px; color: var(--bad); font-size: 14px; }
.ep__up { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.ep__up i { color: var(--accent); }
.ep__undo { all: unset; cursor: pointer; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.ep__undo:hover { color: var(--bad); }
.ep__text .btn { margin-top: 8px; height: 44px; padding: 0 18px; font-size: 15px; }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-2); color: var(--ink); }
.ep__final { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px; background: rgba(245, 165, 36, .2); color: var(--gold); font: 800 12px/1 var(--f-head); text-transform: uppercase; }
/* done: compact card, green ring and border with a soft glow */
.ep__step--done .ep__node { border-color: #7ad23a; color: #fff; box-shadow: 0 0 14px rgba(122, 210, 58, .55); }
.ep__step--done .ep__card { border-color: rgba(122, 210, 58, .7); box-shadow: 0 0 14px -4px rgba(122, 210, 58, .5); }
.ep__step--done .ep__img { width: 88px; height: 88px; }
.ep__step--done .ep__img img { width: 72px; height: 72px; }
/* current: blue ring with an open lock, blue border, the button */
.ep__step--now .ep__node { border-color: var(--accent); color: #fff; box-shadow: 0 0 14px rgba(43, 186, 255, .55); }
.ep__step--now .ep__card { border-color: rgba(43, 186, 255, .7); box-shadow: 0 0 16px -4px rgba(43, 186, 255, .45); }
/* final reward: gold border */
.ep__step--final .ep__card { border-color: rgba(245, 165, 36, .7); box-shadow: 0 0 14px -4px rgba(245, 165, 36, .45); }
@media (max-width: 640px) {
  .ep__track::before { left: 23px; }
  .ep__step { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
  .ep__node { width: 40px; height: 40px; font-size: 12px; }
  .ep__card { flex-direction: column; align-items: flex-start; }
  .ep__img { width: 112px; height: 112px; }
  .ep__img img { width: 96px; height: 96px; }
}

/* Lunar moon on the Patrons page: always animated, pixel-crisp */
.patron-hero__moon, .moon-ico { display: inline-block; flex: none; }
.patron-hero__moon img, .moon-ico img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.patron-hero__moon { width: 220px; height: 220px; }
.patron-hero > .patron-hero__moon { animation: none; }
.moon-ico { width: 18px; height: 18px; vertical-align: -3px; }

/* shown while preview (mock) data is on: localhost only, or an explicit ?mock= */
.preview-tag { position: fixed; left: 16px; bottom: 16px; z-index: 95; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r); background: #ff7a1a; color: #1d0c00; font: 700 12px/1 var(--f-ui); box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }
.preview-tag a { color: #1d0c00; text-decoration: underline; font-weight: 600; }

/* "hot" badge with a fire icon (Most picked, Best value, sale discounts), like Ender's red fire badge */
.badge--fire { background: #d8352a; color: #fff; border-color: transparent; font-weight: 700; }
.badge--fire i { color: #ffd166; }

/* ------------------------------------------------------------ Monthly / patrons page */
.ph { display: grid; grid-template-columns: minmax(260px, 38%) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px; border-radius: var(--r-card); background: var(--panel-2); }
.ph__art { display: grid; place-items: center; min-height: 300px; border-radius: var(--r-card);
  background: radial-gradient(closest-side, rgba(150, 130, 255, .22), rgba(150, 130, 255, 0) 70%), var(--side); }
.ph__moon { width: 240px; height: 240px; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 22px 14px rgba(0, 0, 0, .55)) drop-shadow(0 0 24px rgba(160, 140, 255, .25)); }
.ph__moon img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.ph__text { display: grid; gap: 12px; justify-items: start; }
.ph__eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #b9a7e8; font: 700 13px/1 var(--f-head); text-transform: uppercase; letter-spacing: .06em; }
.ph__text h1 { font-size: 34px; font-weight: 800; margin: 0; }
.ph__lead { color: var(--body); font-size: 16px; margin: 0; max-width: 56ch; }
.ph__buy { display: flex; align-items: center; gap: 20px; margin-top: 8px; padding: 16px 16px 16px 20px; border-radius: var(--r-card); background: var(--side); }
.ph__price { font: 800 28px/1 var(--f-head); color: var(--text); }
.ph__price s { color: var(--sale); font-size: 18px; margin-right: 6px; }
.ph__buy .btn { height: 48px; padding: 0 24px; }
.ph__note { display: flex; gap: 8px; color: var(--muted); font-size: 13px; margin: 0; max-width: 64ch; }
.ph__note i { margin-top: 3px; }
.ph__h { font-size: 22px; font-weight: 800; margin: 0 0 16px; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.perk { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--r-card); background: var(--panel-2); color: var(--body); font-size: 14px; line-height: 1.45; }
.perk i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: rgba(95, 208, 104, .15); color: var(--ok); font-size: 12px; }
.moon-ico { width: 18px; height: 18px; image-rendering: pixelated; vertical-align: middle; }
.patron__line { color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .ph { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .ph__art { min-height: 220px; }
  .ph__moon { width: 180px; height: 180px; }
  .ph__buy { flex-wrap: wrap; width: 100%; }
  .ph__buy .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .ph__moon { animation: none; } }

/* progress bar, Ender style: slim pill track, solid warm orange fill, bubble tag above the fill end */
.goal { position: relative; margin: 44px 4px 10px; }
.goal__bar { height: 10px; border-radius: 999px; background: #0f1424; border: 1px solid #2a3352; overflow: hidden; }
.goal__bar i { display: block; height: 100%; border-radius: 999px; background: #ef9a4a; box-shadow: none; }
.goal__bubble { position: absolute; top: -34px; transform: translateX(-50%); padding: 5px 8px; border-radius: 6px; background: #3a4566; color: #fff; font: 800 12px/1 var(--f-head); white-space: nowrap; }
.goal__bubble::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: #3a4566; }
.goal + .side__small { text-align: center; color: var(--muted); font-size: 13px; }
/* token cards at normal store width: names stay on one line, buttons line up */
.grid--tok { gap: 12px; }
.grid--tok .card { padding: 24px 12px 14px; }
.grid--tok .card h3 { font-size: 15px; white-space: nowrap; min-height: 0; }
.grid--tok .card__buy { margin-top: auto; padding-top: 16px; }
.grid--tok .card__buy .btn { font-size: 14px; }
.grid--tok .card__flags .badge { font-size: 11px; height: 22px; padding: 0 6px; }

/* gift cards: compact text wordmark top right, blue fill on hover (never the seasonal sale accent) */
.gc__mark { margin-left: auto; font: 400 18px/1 "Silkscreen", var(--f-head); letter-spacing: .04em; color: #eef1fa; text-shadow: 2px 2px 0 rgba(0, 0, 0, .45); white-space: nowrap; }
.gc--wide .gc__mark { font-size: 24px; }
.gc:hover, .gc:focus-visible { background: #2bbaff; }
.gc:hover .gc__mark, .gc:focus-visible .gc__mark { color: #04223a; text-shadow: 1px 1px 0 rgba(255, 255, 255, .35); }
.gc--off:hover { background: var(--card); }
.gc--off:hover .gc__mark { color: #eef1fa; text-shadow: 2px 2px 0 rgba(0, 0, 0, .45); }
.gc.is-hover { background: #2bbaff; }
.gc.is-hover i, .gc.is-hover b, .gc.is-hover .gc__code { color: var(--ink); }
.gc.is-hover .gc__mark { color: #04223a; text-shadow: 1px 1px 0 rgba(255, 255, 255, .35); }
.gc:not(.gc--wide) .gc__mark { font-size: 13px; letter-spacing: .02em; }
.gc:not(.gc--wide) .gc__top b { font-size: 34px; }
.gc__top { min-width: 0; }

/* gift card logo image (logo_card.png) */
img.gc__mark { height: 26px; width: auto; max-width: 52%; object-fit: contain; object-position: right center; flex-shrink: 1; min-width: 0; image-rendering: pixelated; text-shadow: none; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.gc--wide img.gc__mark { height: 30px; }
.gc:not(.gc--wide) img.gc__mark { height: 20px; }

/* 2D pixel icons: keep crisp at every size */
img[src*="assets/icons/"], img[data-src*="assets/icons/"] { image-rendering: pixelated; }
