/* SunMC store. Written for this store from scratch; light and dark share every rule and only swap tokens. */

:root {
  --sun: #FFD34E;
  --sun-deep: #E39B12;
  --sun-ink: #2A1A04;
  --orange: #F39A38;
  --teal: #36BFC2;
  --ok: #7BD88F;
  --err: #FF5A5A;
  --discord: #5865F2;
  --discord-deep: #3C46C4;
  --sale: #E5483F;

  --radius: 12px;
  --radius-sm: 8px;
  --pixel: 'Jersey 10', 'Poppins', sans-serif;
  --body: 'Poppins', system-ui, sans-serif;

  /* dark (default) */
  --bg: #0F0B08;
  --panel: #1A1510;
  --panel-2: #241D16;
  --panel-3: #30281E;
  --line: #2A231B;
  --line-strong: #433729;
  --text: #F4ECDA;
  --muted: #B3A493;
  --faint: #85776A;
  --accent-text: #F7B955;
  --link: #4CC8CB;
  --ok-text: #80D993;
  --err-text: #FF7A6E;
  --sale-text: #FF7A6E;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --hero-img: url('/img/hero-dark.png');
  --hero-blur: 5px;
  --mote: #FFD34E;
  --hero-fade: #0F0B08;
  --hero-wash: rgba(12, 7, 4, .38);
  --hero-veil: rgba(15, 11, 8, 0);
  --hero-clear: 35%;
  --hero-solid: 100%;
  --hero-title: #FFF8E8;
  --hero-title-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  --hero-eyebrow: #FFD34E;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F4EEE1;
    --panel: #FCF9F2;
    --panel-2: #F7F0E1;
    --panel-3: #EEE2C8;
    --line: #E4D6B8;
    --line-strong: #D3BF96;
    --text: #2A1F12;
    --muted: #6B5A45;
    --faint: #998770;
    --accent-text: #A0580A;
    --link: #0F7075;
    --ok-text: #2E8B45;
    --err-text: #BE3A2E;
  --sale-text: #C9362B;
    --sun-deep: #D9950F;
    --shadow: 0 8px 24px rgba(110, 80, 30, .10);
    --hero-img: url('/img/hero-light.png');
    --hero-blur: 3px;
    --mote: #FFFFFF;
    --hero-fade: #F4EEE1;
    --hero-wash: rgba(255, 248, 235, .12);
    --hero-veil: rgba(255, 255, 255, .6);
  --hero-clear: 24%;
    --hero-solid: 44%;
    --hero-title: #2A1F12;
    --hero-title-shadow: 0 3px 0 rgba(255, 255, 255, .55);
    --hero-eyebrow: #A0580A;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F4EEE1;
  --panel: #FCF9F2;
  --panel-2: #F7F0E1;
  --panel-3: #EEE2C8;
  --line: #E4D6B8;
  --line-strong: #D3BF96;
  --text: #2A1F12;
  --muted: #6B5A45;
  --faint: #998770;
  --accent-text: #A0580A;
  --link: #0F7075;
  --ok-text: #2E8B45;
  --err-text: #BE3A2E;
  --sale-text: #C9362B;
  --sun-deep: #D9950F;
  --shadow: 0 8px 24px rgba(110, 80, 30, .10);
  --hero-img: url('/img/hero-light.png');
    --hero-blur: 3px;
    --mote: #FFFFFF;
  --hero-fade: #F4EEE1;
  --hero-wash: rgba(255, 248, 235, .12);
  --hero-veil: rgba(255, 255, 255, .6);
  --hero-clear: 24%;
  --hero-solid: 44%;
  --hero-title: #2A1F12;
  --hero-title-shadow: 0 3px 0 rgba(255, 255, 255, .55);
  --hero-eyebrow: #A0580A;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.no-scroll { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--body);
  overflow-x: hidden;
  font-synthesis: none;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }

.pixel-icon { display: inline-flex; line-height: 0; }
.pixel-icon svg { display: block; }

/* ---------- hero image ---------- */
.hero {
  position: absolute;
  inset: 0 0 auto;
  height: 560px;
  overflow: hidden;
  z-index: -1;
}
/* The photo sits blurred behind everything and drifts very slowly. */
.hero-img {
  position: absolute;
  inset: -40px;
  background: var(--hero-img) center 60% / cover no-repeat;
  filter: blur(var(--hero-blur)) saturate(1.05);
  animation: hero-drift 60s ease-in-out infinite alternate;
}
@keyframes hero-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--hero-wash), var(--hero-wash)),
    linear-gradient(180deg, transparent 0%, var(--hero-veil) var(--hero-clear), var(--hero-fade) var(--hero-solid));
}
/* Sun motes: a handful of slow, faint specks over the banner only. */
.motes { position: absolute; inset: 0 0 35%; z-index: 1; pointer-events: none; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }
.motes span {
  position: absolute;
  left: var(--x); top: var(--y);
  width: var(--s); height: var(--s);
  background: var(--mote);
  opacity: 0;
  animation: mote var(--d) linear var(--delay) infinite;
}
@keyframes mote {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  20% { opacity: var(--o); }
  80% { opacity: var(--o); }
  100% { opacity: 0; transform: translate3d(var(--dx), -60px, 0); }
}

/* ---------- page grid ---------- */
.shell {
  width: min(1240px, 100% - 40px);
  margin: 0 auto;
  padding: 28px 0 64px;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  grid-template-areas: "brand top" "side main";
  column-gap: 28px;
  row-gap: 28px;
}
.brand-cell { grid-area: brand; display: flex; align-items: center; }
.top-cell { grid-area: top; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.sidebar { grid-area: side; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.view { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 22px; }

.brand { display: block; width: 100%; }
.brand img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); }

/* ---------- account bar ---------- */
.account-bar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(10, 8, 6, .55);
  color: #F6EEDC;
  display: grid; place-items: center;
}
.theme-toggle:hover { background: rgba(10, 8, 6, .75); }
.account { display: flex; align-items: center; }
.pill-basket {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px;
  padding: 0 18px 0 16px;
  border: 0;
  border-radius: 999px 0 0 999px;
  background: var(--sun);
  color: var(--sun-ink);
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.pill-basket .count {
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  background: var(--sun-ink); color: var(--sun);
  font-size: 11px; line-height: 20px; text-align: center;
}
.pill-user {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px;
  margin-left: -20px;
  padding: 0 4px 0 30px;
  border-radius: 0 999px 999px 0;
  background: rgba(10, 8, 6, .72);
  color: #F6EEDC;
  font-weight: 600;
  font-size: 14px;
  border: 0;
}
.pill-user img { width: 32px; height: 32px; border-radius: 50%; image-rendering: pixelated; background: #3A2F24; }
.pill-user .logout { border: 0; background: none; color: #A8998A; padding: 0 6px; }
.pill-user .logout:hover { color: #F6EEDC; }
.pill-login {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 18px 0 6px;
  border: 0; border-radius: 0 999px 999px 0;
  margin-left: -20px; padding-left: 30px;
  background: rgba(10, 8, 6, .72); color: #F6EEDC; font-weight: 600; font-size: 14px;
}

/* ---------- play / discord ---------- */
.cta-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cta {
  display: flex; align-items: center; gap: 14px;
  min-height: 72px;
  padding: 12px 20px 12px 14px;
  border: 2px solid rgba(255, 255, 255, .32);
  border-radius: var(--radius);
  text-align: left;
  background-repeat: no-repeat;
  background-size: auto 100%, auto;
  background-position: right 0 center, 0 0;
  transition: transform .15s, box-shadow .2s, background-position .6s ease, filter .15s;
}
.cta:hover { transform: translateY(-2px); background-position: right -24px center, 0 0; filter: brightness(1.04); }
.cta:active { transform: translateY(1px); }
.cta-play {
  background-image: url('/img/cta-play.svg'), linear-gradient(135deg, #FFE07A, #FFC93C);
  background-color: var(--sun);
  color: var(--sun-ink);
  box-shadow: inset 0 -4px 0 var(--sun-deep);
}
.cta-play:hover { box-shadow: inset 0 -4px 0 var(--sun-deep), 0 10px 24px rgba(255, 196, 60, .32); }
.cta-discord {
  background-image: url('/img/cta-discord.svg'), linear-gradient(135deg, #6D78F7, #5865F2);
  background-color: var(--discord);
  color: #fff;
  box-shadow: inset 0 -4px 0 var(--discord-deep);
}
.cta-discord:hover { box-shadow: inset 0 -4px 0 var(--discord-deep), 0 10px 24px rgba(88, 101, 242, .35); }
.cta-arrow { transition: transform .15s; }
.cta:hover .cta-arrow { transform: translateX(3px); }
.cta-icon {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 17px;
}
.cta-play .cta-icon { background: var(--sun-ink); color: var(--sun); }
.cta-discord .cta-icon { background: #fff; color: var(--discord); font-size: 20px; }
.cta-text { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.cta-title { font-weight: 700; font-size: 17px; line-height: 1.2; white-space: nowrap; }
.cta-sub { font-size: 12.5px; font-weight: 500; opacity: .8; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta-meta { font-size: 12px; font-weight: 600; opacity: .75; white-space: nowrap; }
.cta-arrow { font-size: 13px; opacity: .8; }

/* ---------- shared blocks ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.title-pixel { font-family: var(--pixel); font-weight: 400; letter-spacing: .01em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: transform .1s, filter .1s;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sun { background: linear-gradient(135deg, #FFE07A, #FFC93C); color: var(--sun-ink); box-shadow: inset 0 -3px 0 var(--sun-deep), inset 0 0 0 1px rgba(255, 255, 255, .35); transition: transform .1s, filter .1s, box-shadow .2s; }
.btn-sun:hover:not(:disabled) { box-shadow: inset 0 -3px 0 var(--sun-deep), inset 0 0 0 1px rgba(255, 255, 255, .35), 0 8px 18px rgba(255, 196, 60, .28); }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-strong); box-shadow: inset 0 -3px 0 var(--line); }
.btn-discord { background: var(--discord); color: #fff; box-shadow: inset 0 -3px 0 var(--discord-deep); }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.icon-btn {
  width: 34px; height: 34px;
  display: inline-grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
}
.icon-btn:hover { border-color: var(--sun-deep); }

.updating { opacity: .55; pointer-events: none; }

/* ---------- sidebar ---------- */
.side-menu { padding: 18px 14px 12px; }
.side-menu .label { padding: 0 8px 8px; color: var(--text); }
.side-menu ul { list-style: none; margin: 0; padding: 0; }
.side-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
}
.side-menu a:hover { color: var(--text); background: var(--panel-2); }
.side-menu a.active { color: var(--text); background: var(--panel-3); font-weight: 600; }
.side-menu .pixel-icon svg { width: 26px; height: 26px; }

.module { padding: 18px; }
.module .label { color: var(--text); margin-bottom: 12px; }
.payments { display: flex; flex-wrap: wrap; gap: 8px; }
.payments img { width: 38px; height: 38px; border-radius: 6px; image-rendering: pixelated; background: var(--panel-3); }
.top-customer { position: relative; padding: 0; overflow: hidden; display: flex; min-height: 118px; }
.top-customer img { width: 86px; align-self: flex-end; image-rendering: pixelated; margin: 12px 0 -6px 4px; }
.top-customer .tc-text { padding: 16px 16px 16px 6px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.top-customer .tc-name { font-weight: 700; }
.top-customer .tc-sub { font-size: 12.5px; color: var(--muted); }
.goal { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.goal-ring { width: 64px; height: 64px; flex: none; position: relative; }
.goal-ring svg { transform: rotate(-90deg); }
.goal-ring circle { fill: none; stroke-width: 9; }
.goal-ring .bg { stroke: var(--panel-3); }
.goal-ring .fg { stroke: var(--sun); stroke-linecap: round; }
.goal-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--accent-text); }
.goal-text .label { margin: 0; }
.goal-text p { font-size: 13px; color: var(--muted); }
.module-text { font-size: 14px; color: var(--muted); }

/* ---------- sale banner ---------- */
.sale {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-color: var(--sun-deep);
  background: var(--panel-2);
}
.sale-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--sun); color: var(--sun-ink); display: grid; place-items: center; flex: none; }
.sale-title { font-weight: 700; }
.sale-sub { font-size: 13px; color: var(--muted); }
.sale-timer { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-text); white-space: nowrap; }

/* ---------- home ---------- */
.featured { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 10px; }
.feat {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  transition: border-color .15s;
}
.feat:hover { border-color: var(--line-strong); }
.feat .pixel-icon svg, .feat img { width: 44px; height: 44px; }
.feat-name { font-weight: 600; line-height: 1.25; }
.feat { position: relative; }
.feat-price { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.feat-price del { margin-left: 6px; font-weight: 500; color: var(--faint); text-decoration-color: var(--sale); }
.feat .sale-chip { top: 10px; left: auto; right: 10px; }

.welcome { padding: 26px 28px; }
.welcome h1 { font-family: var(--pixel); font-size: 44px; color: var(--accent-text); margin: 4px 0 14px; letter-spacing: .01em; }
.welcome p + p { margin-top: 10px; }
.welcome p { color: var(--muted); }
.welcome p strong { color: var(--text); font-weight: 600; }

.steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.num {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--sun);
  color: var(--sun-ink);
  font-family: var(--pixel); font-weight: 400;
  font-size: 21px;
  box-shadow: inset 0 -3px 0 var(--sun-deep);
}

.notices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.notice { padding: 20px 22px; border: 2px solid; border-radius: var(--radius); }
.notice .label { margin-bottom: 8px; }
.notice p { font-size: 14px; }
.notice-warn { border-color: rgba(255, 90, 90, .55); background: rgba(255, 90, 90, .07); }
.notice-warn .label { color: var(--err-text); }
.notice-help { border-color: rgba(123, 216, 143, .55); background: rgba(123, 216, 143, .07); }
.notice-help .label { color: var(--ok-text); }
.notice a { color: var(--link); font-weight: 600; }

.payments-block { display: flex; align-items: center; gap: 18px; padding: 18px 22px; }
.payments-lock { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--panel-3); color: var(--accent-text); font-size: 18px; }
.payments-text { flex: 1; min-width: 0; }
.payments-text .label { color: var(--text); margin-bottom: 2px; }
.payments-text p { font-size: 13.5px; color: var(--muted); }
.payments-methods { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.payments-methods span {
  height: 34px; min-width: 50px; padding: 0 8px;
  display: grid; place-items: center;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}
.payments-methods span.text { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }

.faq h2 { font-family: var(--pixel); font-size: 31px; margin-bottom: 12px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 4px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { color: var(--faint); transition: transform .15s; }
.faq details[open] summary i { transform: rotate(180deg); }
.faq details p { padding: 0 4px 16px; color: var(--muted); font-size: 14px; }
.faq-list { padding: 4px 20px; }

/* ---------- category ---------- */
.cat-head { padding: 4px 2px 0; }
.cat-head h1 { font-family: var(--pixel); font-size: 49px; margin: 2px 0 8px; }
.cat-head p { color: var(--muted); max-width: 70ch; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 18px 18px;
  text-align: center;
  border-top: 3px solid var(--tone, var(--sun));
}
.card .pixel-icon svg, .card > a > img { width: 76px; height: 76px; }
.card-art { display: grid; place-items: center; width: 108px; height: 108px; border-radius: 18px; background: color-mix(in srgb, var(--tone, var(--sun)) 13%, transparent); margin-bottom: 14px; }
.card-name { font-family: var(--pixel); font-size: 31px; font-weight: 700; line-height: 1.1; }
.card-type { font-size: 12px; color: var(--faint); margin-top: 2px; }
.card-short { font-size: 13.5px; color: var(--muted); margin: 10px 0 14px; min-height: 2.6em; }
.card-price { margin-top: auto; margin-bottom: 14px; }
/* prices: current price leads; on sale it turns accent, the old price is struck through and the saving is spelled out */
.price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 8px; }
.price-now { font-weight: 700; font-size: 22px; line-height: 1.2; }
.price.is-sale .price-now { color: var(--accent-text); }
.price-was { font-size: 14px; font-weight: 500; color: var(--faint); text-decoration-thickness: 1.5px; text-decoration-color: var(--sale); }
.price-save { flex-basis: 100%; font-size: 12.5px; font-weight: 600; color: var(--ok-text); }
.sale-ends { margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sale-ends i { color: var(--sale-text); }
.sale-chip {
  position: absolute; top: 8px; left: 8px;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--sale);
  color: #fff;
  font: 700 12px/1 var(--body);
  letter-spacing: .02em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2);
  font-variant-numeric: tabular-nums;
}
.card-art { position: relative; }
.card-art .sale-chip { top: -6px; left: -10px; }
.card .actions { width: 100%; }
.card-more { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.card-more:hover { color: var(--text); }
.badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  z-index: 1;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--sun);
  color: var(--sun-ink);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
}

.badge-best { background: var(--orange); color: var(--sun-ink); }
.badge-feat { background: var(--sun-ink); color: var(--sun); box-shadow: inset 0 0 0 1px var(--sun-deep); }
.card.is-rec { border-color: color-mix(in srgb, var(--sun-deep) 55%, var(--line)); background: color-mix(in srgb, var(--sun) 6%, var(--panel)); }
.card.is-best { border-color: color-mix(in srgb, var(--orange) 50%, var(--line)); background: color-mix(in srgb, var(--orange) 5%, var(--panel)); }
.card.is-feat { border-color: var(--line-strong); }
.card.is-discounted .card-price { padding: 8px 10px; margin-left: -6px; margin-right: -6px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--sale) 7%, transparent); }

.actions .btn { width: 100%; }
.qty {
  display: flex; align-items: stretch;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  overflow: hidden;
}
.qty button { border: 0; background: none; width: 40px; color: var(--text); font-size: 13px; }
.qty button:hover { background: var(--panel-3); }
.qty .qty-mid { flex: 1; width: auto; font-weight: 600; font-size: 13.5px; }

/* rank comparison */
.compare { padding: 22px 0 6px; }
.compare-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 22px 14px; }
.compare-head h2 { font-family: var(--pixel); font-size: 31px; }
.compare-head p { font-size: 13px; color: var(--muted); }
.table-scroll { overflow-x: auto; padding: 0 22px 16px; }
.rt { width: 100%; min-width: 680px; border-collapse: separate; border-spacing: 0; font-size: 13.5px; table-layout: fixed; }
.rt th, .rt td { padding: 11px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.rt td:first-child, .rt th:first-child { text-align: left; color: var(--muted); padding-left: 0; width: 34%; }
.rt thead th { border-bottom: 0; vertical-align: bottom; padding-bottom: 14px; }
.rt-col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rt-col .pixel-icon svg { width: 40px; height: 40px; }
.rt-col .rt-name { font-family: var(--pixel); font-size: 23px; color: var(--text); margin-top: 6px; }
.rt-col .rt-price { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.rt-col .rt-price.is-sale { font-size: 14.5px; }
.rt-was { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--faint); }
.rt-was del { text-decoration-color: var(--sale); }
.rt-was .sale-chip { position: static; font-size: 10.5px; padding: 3px 5px; }
.rt .rt-section td { padding-top: 20px; color: var(--accent-text); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border-bottom-color: var(--line-strong); }
.rt td.hl, .rt th.hl { background: color-mix(in srgb, var(--sun) 7%, transparent); }
.rt thead th.hl { border-radius: 10px 10px 0 0; box-shadow: inset 0 3px 0 var(--sun); }
.rt tfoot td { border-bottom: 0; padding-top: 14px; }
.rt tfoot td.hl { border-radius: 0 0 10px 10px; }
.rt .yes { color: var(--ok-text); }
.rt .no { color: var(--faint); opacity: .6; }
.rt-text { color: var(--text); font-weight: 500; }
.rt .btn { min-height: 34px; padding: 0 12px; font-size: 12.5px; width: 100%; }
.rt .qty { height: 34px; }

/* packs with fixed quantities */
.pack-grid { display: grid; gap: 10px; }
.pack-row { display: grid; grid-template-columns: 180px repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.pack-name { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; font-weight: 600; font-size: 13px; text-align: center; }
.pack-name .pixel-icon svg { width: 40px; height: 40px; }
.pack-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 12px 6px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); }
.pack-opt:hover { border-color: var(--sun-deep); }
.pack-opt b { font-family: var(--pixel); font-size: 26px; }
.pack-opt span { font-size: 12px; color: var(--muted); }
.pack-opt del { font-size: 11px; color: var(--faint); }
.pack-opt em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ok-text); }

/* ---------- package page ---------- */
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.back:hover { color: var(--text); }
.pkg { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; overflow: hidden; }
.pkg-art {
  display: grid; place-items: center;
  padding: 36px;
  background: color-mix(in srgb, var(--tone, var(--sun)) 11%, var(--panel-2));
  border-right: 1px solid var(--line);
}
.pkg-art .pixel-icon svg, .pkg-art img { width: 180px; height: 180px; }
.pkg-body { padding: 28px 30px; display: flex; flex-direction: column; gap: 14px; }
.pkg-body h1 { font-family: var(--pixel); font-size: 52px; }
.pkg-meta { font-size: 13px; color: var(--faint); }
.pkg-buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-block: 1px solid var(--line); }
.pkg-buy .price { justify-content: flex-start; }
.pkg-buy .price-now { font-size: 28px; }
.pkg-buy .sale-chip { position: static; font-size: 14px; padding: 6px 9px; }
.pkg-buy .actions { flex: 1; min-width: 200px; max-width: 300px; margin-left: auto; }
.pkg-text p { color: var(--muted); }
.pkg-text p + p { margin-top: 10px; }
.perks { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.perks li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.perks i { color: var(--ok-text); font-size: 12px; }

/* ---------- login ---------- */
body.page-login .sidebar, body.page-login .cta-row { display: none; }
body.page-login .view { grid-column: 1 / -1; }
body.page-login .shell { grid-template-areas: "brand top" "main main"; }
.login-head { text-align: center; padding: 6px 0 4px; }
.login-head .eyebrow { color: var(--hero-eyebrow); }
.login-head h1 {
  font-family: var(--pixel);
  font-size: clamp(56px, 8vw, 88px);
  line-height: .9;
  color: var(--hero-title);
  letter-spacing: .02em;
  text-transform: uppercase;
  text-shadow: var(--hero-title-shadow);
  margin-top: 4px;
}
.login { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; max-width: 1080px; width: 100%; margin: 0 auto; }
.login-side { overflow: hidden; text-align: center; box-shadow: var(--shadow); }
.login-skin {
  height: 300px;
  display: grid; place-items: end center;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 6px),
    var(--sun);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.login-skin img { height: 270px; width: auto; image-rendering: pixelated; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .18)); }
.login-side-body { padding: 22px 22px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.login-side-body h2 { font-family: var(--pixel); font-size: 34px; }
.login-side-body p { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.login-side-body .help { margin-top: 12px; font-size: 13px; color: var(--muted); font-weight: 500; }
.login-side-body .help:hover { color: var(--text); }
.login-side-body .help i { color: var(--discord); margin-right: 4px; }

.login-main { padding: 30px 32px 32px; box-shadow: var(--shadow); }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step h2 { font-family: var(--pixel); font-size: 29px; line-height: 1.2; }
.step p { font-size: 13px; color: var(--muted); }
.step .num { width: 36px; height: 36px; font-size: 24px; }

.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0 30px; }
.platform {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 16px 18px;
  border: 0;
  border-radius: 14px;
  text-align: center;
  transition: transform .15s, opacity .15s, filter .15s;
}
.platform-java { background: #2E9EA1; color: #fff; box-shadow: inset 0 -5px 0 #1F7477; }
.platform-bedrock { background: #E9A531; color: #2A1A04; box-shadow: inset 0 -5px 0 #B87711; }
.platform[aria-pressed="false"] { opacity: .5; filter: saturate(.55); transform: scale(.97); }
.platform[aria-pressed="false"]:hover { opacity: .75; }
.platform[aria-pressed="true"] { box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .25), 0 12px 26px rgba(0, 0, 0, .2); }
.platform .block-art { height: 118px; display: grid; place-items: center; margin-bottom: 4px; }
.platform .block-art svg { width: 108px; height: auto; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .2)); }
.platform-title { font-family: var(--pixel); font-size: 31px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.platform-icons { display: flex; gap: 10px; font-size: 16px; opacity: .9; }
.platform-sub { font-size: 12px; opacity: .85; }
.platform .check {
  position: absolute; top: -12px; right: -12px;
  width: 36px; height: 36px;
  display: none; place-items: center;
  border-radius: 50%;
  background: var(--sun); color: var(--sun-ink);
  border: 3px solid var(--panel);
  box-shadow: 0 3px 0 var(--sun-deep);
  font-size: 15px;
}
.platform[aria-pressed="true"] .check { display: grid; }

.name-field {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 0 14px;
  padding: 8px 14px 8px 10px;
  border: 2px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  transition: border-color .15s;
}
.name-field:focus-within { border-color: var(--sun-deep); }
.name-field img { width: 36px; height: 36px; border-radius: 4px; image-rendering: pixelated; background: var(--panel-3); flex: none; }
.name-field input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: none;
  font: 600 18px var(--body);
  color: var(--text);
}
.name-field input::placeholder { color: var(--faint); font-weight: 500; }
.name-field .prefix { font-weight: 700; color: var(--accent-text); font-size: 18px; }
.login-error { min-height: 20px; font-size: 13px; color: var(--err-text); margin: -6px 0 8px; }

/* ---------- guide / results ---------- */
.doc { padding: 28px 30px; }
.doc h1 { font-family: var(--pixel); font-size: 44px; margin-bottom: 8px; }
.doc > p { color: var(--muted); }
.doc h2 { font-family: var(--pixel); font-size: 29px; margin: 22px 0 8px; }
.doc ol.guide { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 16px; }
.doc ol.guide li { display: flex; gap: 14px; }
.doc ol.guide b { display: block; font-weight: 600; }
.doc ol.guide span { color: var(--muted); font-size: 14px; }
.doc .doc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.result { padding: 36px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.result .result-icon { font-size: 44px; }
.result .is-ok { color: var(--ok-text); }
.result .is-cancel { color: var(--err-text); }
.result h1 { font-family: var(--pixel); font-size: 42px; }
.result p { color: var(--muted); max-width: 60ch; }
.result .doc-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.error-block { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-color: rgba(255, 90, 90, .45); color: var(--err-text); font-weight: 500; }
.view-loading { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---------- basket drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8, 6, 4, .55); z-index: 50; animation: fade .15s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: var(--panel);
  border-left: 1px solid var(--line);
  z-index: 51;
  display: flex; flex-direction: column;
  animation: slide .2s ease-out;
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-family: var(--pixel); font-size: 31px; }
.drawer-head p { font-size: 12.5px; color: var(--muted); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 10px; }
.line {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.line .pixel-icon svg, .line img { width: 40px; height: 40px; }
.line-name { font-weight: 600; font-size: 14px; display: block; }
.line-price { font-size: 12.5px; color: var(--accent-text); font-weight: 600; }
.line-ctrl { display: flex; align-items: center; gap: 6px; }
.line-ctrl .qty { height: 32px; }
.line-ctrl .qty button { width: 28px; }
.line-ctrl .qty span { min-width: 22px; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.line-ctrl .icon-btn { width: 32px; height: 32px; color: var(--muted); }
.empty { text-align: center; padding: 50px 10px; color: var(--muted); }
.empty i { font-size: 34px; color: var(--faint); margin-bottom: 12px; }
.empty b { display: block; color: var(--text); margin-bottom: 4px; }
.codes { display: flex; gap: 8px; margin-top: 6px; }
.codes select, .codes input {
  height: 40px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text); font: 500 13px var(--body);
}
.codes input { flex: 1; min-width: 0; }
.codes .btn { min-height: 40px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--panel-3); font-size: 12px; font-weight: 600; }
.tag button { border: 0; background: none; color: var(--muted); padding: 0 4px; }
.drawer-foot { padding: 16px 22px 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.buyer { display: flex; align-items: center; gap: 10px; }
.buyer img { width: 34px; height: 34px; border-radius: 6px; image-rendering: pixelated; }
.buyer small { display: block; font-size: 11.5px; color: var(--muted); }
.buyer b { font-size: 14px; }
.buyer .total { margin-left: auto; text-align: right; }
.buyer .total b { font-size: 20px; color: var(--accent-text); }
.tebex-note { font-size: 11.5px; color: var(--faint); text-align: center; }

/* ---------- toasts ---------- */
.toaster { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--teal);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: slide .2s ease-out;
}
.toast-success { border-left-color: var(--ok); }
.toast-error { border-left-color: var(--err); }
.toast-warning { border-left-color: var(--orange); }
.toast p { flex: 1; }
.toast button { border: 0; background: none; color: var(--faint); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer-inner { width: min(1240px, 100% - 40px); margin: 0 auto; padding: 26px 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-copy { font-weight: 700; font-size: 14px; }
.footer-note { font-size: 12px; color: var(--faint); }
.footer-play { display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: right; }
.footer-play-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--sun); color: var(--sun-ink); display: grid; place-items: center; box-shadow: inset 0 -3px 0 var(--sun-deep); font-size: 13px; order: 2; }
.footer-play-title { display: block; font-weight: 700; font-size: 14px; }
.footer-play-ip { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; }
.footer-legal { width: min(1240px, 100% - 40px); margin: 0 auto; padding: 0 0 26px; display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
.footer-legal nav { display: flex; gap: 16px; }
.footer-legal a:hover { color: var(--text); }

.tabbar { display: none; }

/* ---------- tablet ---------- */
@media (max-width: 1020px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); column-gap: 20px; }
  .cta-meta { display: none; }
  .pkg { grid-template-columns: 1fr; }
  .pkg-art { border-right: 0; border-bottom: 1px solid var(--line); padding: 26px; }
  .pkg-art .pixel-icon svg, .pkg-art img { width: 130px; height: 130px; }
  .login { grid-template-columns: 1fr; max-width: 680px; }
  .login-side { order: 2; display: grid; grid-template-columns: 170px 1fr; text-align: left; }
  .login-skin { height: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .login-skin img { height: 190px; }
  .login-side-body { align-items: flex-start; justify-content: center; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  body { font-size: 14.5px; padding-bottom: 76px; }
  .hero { height: 380px; }
  .shell {
    width: calc(100% - 32px);
    padding-top: 14px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "top" "brand" "cta" "main" "side";
    row-gap: 18px;
  }
  body.page-login .shell { grid-template-areas: "top" "brand" "main"; }
  body.page-login .view { grid-column: auto; }
  .brand-cell { justify-content: center; }
  .brand { width: min(320px, 82%); }
  .top-cell { display: contents; }
  .account-bar { grid-area: top; }
  .cta-row { grid-area: cta; gap: 10px; }
  .side-menu { display: none; }
  .cta { min-height: 58px; padding: 8px 12px 8px 8px; gap: 10px; }
  .cta-icon { width: 36px; height: 36px; font-size: 14px; }
  .cta-title { font-size: 14.5px; }
  .cta-sub { font-size: 11px; }
  .cta-arrow { display: none; }
  .notices, .steps, .perks { grid-template-columns: 1fr; }
  .payments-block { flex-wrap: wrap; padding: 16px; }
  .payments-methods { justify-content: flex-start; width: 100%; }
  .featured { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .feat { padding: 12px; gap: 10px; }
  .feat .pixel-icon svg, .feat img { width: 34px; height: 34px; }
  .feat-name { font-size: 13.5px; }
  .welcome, .doc, .pkg-body { padding: 20px; }
  .welcome h1, .doc h1 { font-size: 36px; }
  .cat-head h1, .pkg-body h1 { font-size: 40px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { padding: 20px 12px 14px; }
  .card-art { width: 84px; height: 84px; }
  .card .pixel-icon svg { width: 58px; height: 58px; }
  .card-name { font-size: 27px; }
  .card-short { font-size: 12.5px; }
  .price-now { font-size: 19px; }
  .compare-head, .table-scroll { padding-left: 16px; padding-right: 16px; }
  .compare-head { flex-direction: column; gap: 2px; }
  .rt { min-width: 600px; }
  .rt td:first-child, .rt th:first-child { width: 160px; }
  .pack-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pack-name { grid-column: 1 / -1; flex-direction: row; gap: 10px; }
  .login-main { padding: 22px 18px 22px; }
  .platforms { gap: 12px; margin: 16px 0 24px; }
  .platform { padding: 14px 8px; }
  .platform .block-art { height: 84px; }
  .platform .block-art svg { width: 78px; }
  .platform-title { font-size: 22px; }
  .platform-icons { font-size: 13px; gap: 7px; }
  .platform-sub { display: none; }
  .login-side { grid-template-columns: 120px 1fr; }
  .login-skin img { height: 150px; }
  .login-side-body { padding: 16px; }
  .login-side-body h2 { font-size: 27px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-play { text-align: left; }
  .footer-play-icon { order: 0; }
  .toaster { bottom: 86px; right: 16px; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--panel);
    border-top: 1px solid var(--line);
  }
  .tabbar a, .tabbar button {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 2px;
    border: 0; background: none;
    border-radius: var(--radius-sm);
    font-size: 11px; font-weight: 600;
    color: var(--muted);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tabbar a > span:last-child { max-width: 100%; }
  .tabbar .pixel-icon svg { width: 24px; height: 24px; }
  .tabbar i { font-size: 18px; height: 24px; display: grid; place-items: center; }
  .tabbar .active { color: var(--text); background: var(--panel-3); }
  .tabbar .count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--sun); color: var(--sun-ink); font-size: 10px; line-height: 17px; }
}

@media (max-width: 380px) {
  .cards { grid-template-columns: 1fr; }
  .cta-row { grid-template-columns: 1fr; }
}

/* ---------- language & currency ---------- */
.locale { position: relative; }
.locale-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px 0 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  background: rgba(10, 8, 6, .62);
  color: #F6EEDC;
}
.locale-btn:hover { background: rgba(10, 8, 6, .8); }
.locale-btn > i { font-size: 10px; opacity: .8; }
.flag { display: inline-flex; line-height: 0; }
.flag svg { border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.locale-codes { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.locale-codes b { font-size: 12.5px; }
.locale-codes small { font-size: 11px; font-weight: 700; color: var(--sun); }
.locale-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 30;
  width: 330px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: rise var(--t-mid, 240ms) var(--ease-out, ease) both;
}
.locale-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.locale-head p { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.locale-close { border: 0; background: none; color: var(--muted); font-size: 15px; }
.locale-close:hover { color: var(--text); }
.locale-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.locale-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 9px 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  text-align: left;
}
.locale-tab small { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.locale-tab > span { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }
.locale-tab.is-active { border-color: var(--sun-deep); background: color-mix(in srgb, var(--sun) 8%, var(--panel)); box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--sun-deep) 45%, transparent); }
.locale-tab.is-active small { color: var(--accent-text); }
.locale-list { display: flex; flex-direction: column; gap: 4px; }
.locale-row {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  text-align: left;
  font-weight: 500;
}
.locale-row:hover:not(:disabled) { background: var(--panel-2); }
.locale-row.is-selected { background: color-mix(in srgb, var(--sun) 10%, var(--panel-2)); border-color: color-mix(in srgb, var(--sun-deep) 35%, transparent); font-weight: 700; }
.locale-row:disabled { opacity: .5; cursor: not-allowed; }
.locale-row > i { color: var(--accent-text); font-size: 13px; }
.locale-name small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.locale-code { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.locale-symbol { width: 26px; height: 22px; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--panel-2); font-weight: 700; font-size: 13px; }
.locale-symbol.is-small { width: 22px; height: 20px; font-size: 11.5px; }
.locale-note { margin-top: 10px; font-size: 11.5px; color: var(--faint); }

/* ---------- five rank tiers ---------- */
@media (min-width: 1200px) {
  .cards-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .cards-5 .card { padding: 24px 12px 16px; }
  .cards-5 .card-art { width: 92px; height: 92px; }
  .cards-5 .card .pixel-icon svg { width: 64px; height: 64px; }
  .cards-5 .price-now { font-size: 20px; }
}
@media (min-width: 761px) and (max-width: 1199px) {
  .cards-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cards-5 > * { grid-column: span 2; }
  .cards-5 > :nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 760px) {
  .cards-5 > .is-elite { grid-column: 1 / -1; }
}

/* Nova: the top tier sits on a night-sky surface in both themes so it reads as a different class of product */
.card.is-elite {
  --elite: #5FD8FF;
  overflow: hidden;
  color: #F4ECDA;
  border: 1px solid color-mix(in srgb, var(--elite) 55%, transparent);
  border-top: 3px solid var(--elite);
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(95, 216, 255, .16), transparent 60%),
    url('/img/stars.svg') center / 220px auto,
    #0E1220;
  box-shadow: 0 10px 30px rgba(20, 60, 110, .28);
}
.card.is-elite .badge { overflow: visible; }
.card.is-elite .card-name { color: var(--elite); }
.card.is-elite .card-type, .card.is-elite .card-short, .card.is-elite .card-more { color: #A9B6C9; }
.card.is-elite .card-art { background: rgba(95, 216, 255, .1); box-shadow: inset 0 0 0 1px rgba(95, 216, 255, .25); }
.card.is-elite .price-now { color: #FFFFFF; }
.card.is-elite::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .09) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}
.card.is-elite:hover::after { transform: translateX(120%); transition: transform 900ms var(--ease-out, ease); }
.card.is-elite:hover { box-shadow: 0 14px 34px rgba(20, 80, 140, .38); border-color: var(--elite); }
.badge-elite { background: #0E1220; color: #5FD8FF; box-shadow: inset 0 0 0 1px #5FD8FF; top: -11px; }
.card.is-elite .badge { top: 12px; }
.card.is-elite { padding-top: 44px; }
.rt td.hl-elite, .rt th.hl-elite { background: color-mix(in srgb, #5FD8FF 8%, transparent); }
.rt thead th.hl-elite { border-radius: 10px 10px 0 0; box-shadow: inset 0 3px 0 #5FD8FF; }
.rt tfoot td.hl-elite { border-radius: 0 0 10px 10px; }

/* ---------- order review ---------- */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 22px; align-items: start; max-width: 1080px; width: 100%; margin: 0 auto; }
.checkout-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.co-block { padding: 20px 22px; }
.co-block .label { margin-bottom: 12px; }
.co-account { display: flex; align-items: center; gap: 12px; }
.co-account img { width: 44px; height: 44px; border-radius: 8px; image-rendering: pixelated; }
.co-account b { display: block; font-size: 16px; }
.co-account small { color: var(--muted); font-size: 12.5px; }
.co-change { margin-left: auto; min-height: 36px; font-size: 13px; }
.co-warn { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--orange) 10%, transparent); color: var(--text); font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.co-warn i { color: var(--accent-text); }
.sum-line { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.sum-line .pixel-icon svg, .sum-line img { width: 36px; height: 36px; }
.sum-line b { display: block; font-size: 14.5px; }
.sum-line small { display: block; font-size: 12.5px; color: var(--muted); }
.sum-line .sum-perks { color: var(--faint); }
.sum-qty { font-size: 13px; color: var(--muted); }
.sum-price { font-weight: 700; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.sum-price del { font-size: 12px; font-weight: 500; color: var(--faint); text-decoration-color: var(--sale); }
.sum-totals { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.sum-totals p { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.sum-discount { color: var(--sale-text); font-weight: 600; }
.sum-total { color: var(--text) !important; font-weight: 700; font-size: 18px !important; margin-top: 4px; }
.sum-total span:last-child { color: var(--accent-text); }

.confirm-card { padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; position: sticky; top: 20px; }
.confirm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.confirm-head h2 { font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.confirm-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--sun); color: var(--sun-ink); box-shadow: inset 0 -3px 0 var(--sun-deep); }
.confirm {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color var(--t-fast, 160ms), background-color var(--t-fast, 160ms);
}
.confirm:hover { border-color: var(--line-strong); }
.confirm input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.confirm-box {
  width: 24px; height: 24px; flex: none;
  display: grid; place-items: center;
  border-radius: 7px;
  border: 2px solid var(--line-strong);
  background: var(--panel);
  box-shadow: inset 0 -2px 0 var(--line);
  color: transparent;
  font-size: 12px;
  transition: background-color 160ms, border-color 160ms, transform 160ms;
}
.confirm input:checked + .confirm-box { background: var(--sun); border-color: var(--sun-deep); color: var(--sun-ink); box-shadow: inset 0 -2px 0 var(--sun-deep); }
.confirm input:focus-visible + .confirm-box { outline: 2px solid var(--sun); outline-offset: 2px; }
.confirm:has(input:checked) { border-color: color-mix(in srgb, var(--sun-deep) 50%, var(--line)); background: color-mix(in srgb, var(--sun) 6%, var(--panel-2)); }
.confirm a { color: var(--accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.confirm a i { font-size: 10px; margin-left: 3px; }
.confirm b { font-weight: 700; }
.confirm-error { min-height: 20px; display: flex; gap: 8px; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--err-text); }
.confirm-note { font-size: 12px; color: var(--faint); text-align: center; }

.pkg-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--muted); }
.pkg-facts i { width: 18px; color: var(--accent-text); margin-right: 6px; }

.next-rank { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.next-rank:hover { border-color: var(--sun-deep); }
.next-rank .pixel-icon svg { width: 32px; height: 32px; }
.next-rank b { display: block; font-size: 13px; }
.next-rank small { display: block; font-size: 12px; color: var(--muted); }
.next-rank-price { font-size: 13px; font-weight: 700; color: var(--accent-text); }

/* legal pages */
.legal-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.legal-tabs a { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }
.legal-tabs a.active { color: var(--sun-ink); background: var(--sun); border-color: var(--sun-deep); }
.legal-meta { font-size: 12.5px; color: var(--faint); }
.legal-draft { margin-top: 10px; display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--orange) 12%, transparent); color: var(--accent-text); font-size: 13px; font-weight: 600; }
.legal p, .legal li { color: var(--muted); font-size: 14.5px; }
.legal p + p { margin-top: 8px; }
.legal ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }

.footer-mc { margin-top: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--muted); max-width: 560px; }
.footer-note a { color: var(--link); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12.5px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

@media (max-width: 1020px) {
  .checkout { grid-template-columns: 1fr; max-width: 680px; }
  .confirm-card { position: static; }
}
@media (max-width: 760px) {
  .co-block, .confirm-card { padding: 16px; }
  .sum-line { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .sum-qty { display: none; }
}

/* ---------- motion ---------- */
:root {
  --ease-out: cubic-bezier(.22, .8, .32, 1);
  --t-fast: 160ms;
  --t-mid: 240ms;
  --t-page: 420ms;
}

/* page change: the whole view fades up once; grids stagger their first few items */
@keyframes rise { from { opacity: 0; transform: translate3d(0, 10px, 0); } }
.view.is-entering > :not(.reveal) { animation: rise var(--t-page) var(--ease-out) both; }
.view.is-entering > *:nth-child(2) { animation-delay: 40ms; }
.view.is-entering > *:nth-child(3) { animation-delay: 80ms; }
.view.is-entering > *:nth-child(n+4) { animation-delay: 120ms; }
.view.is-entering :is(.cards, .featured) > * { animation: rise var(--t-page) var(--ease-out) both; }
.view.is-entering :is(.cards, .featured) > :nth-child(2) { animation-delay: 60ms; }
.view.is-entering :is(.cards, .featured) > :nth-child(3) { animation-delay: 110ms; }
.view.is-entering :is(.cards, .featured) > :nth-child(n+4) { animation-delay: 160ms; }

/* sections further down appear as they scroll in */
.reveal { opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* cards */
.card, .feat, .pack-opt, .pack-name {
  transition: transform var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out), border-color var(--t-mid), background-color var(--t-mid);
}
.card:hover, .feat:hover, .pack-opt:hover { transform: translate3d(0, -3px, 0); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card .card-art .pixel-icon, .feat .pixel-icon, .pkg-art .pixel-icon { transition: transform var(--t-mid) var(--ease-out); }
.card:hover .card-art .pixel-icon, .feat:hover .pixel-icon { transform: scale(1.06); }
.card-more i, .back i { transition: transform var(--t-fast) var(--ease-out); }
.card-more:hover i { transform: translateX(3px); }
.back:hover i { transform: translateX(-3px); }

/* buttons */
.btn { transition: transform var(--t-fast) var(--ease-out), filter var(--t-fast), box-shadow var(--t-mid), background-color var(--t-fast), border-color var(--t-fast); }
.btn:hover:not(:disabled) { transform: translate3d(0, -1px, 0); }
.btn:active:not(:disabled) { transform: translate3d(0, 1px, 0) scale(.985); }
.btn i { transition: transform var(--t-fast) var(--ease-out); }
.btn:hover:not(:disabled) .fa-arrow-right { transform: translateX(3px); }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 16px; height: 16px; margin: -9px 0 0 -8px;
  border: 2px solid var(--sun-ink); border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 40% { transform: scale(1.08); } }
.pill-basket.is-bumped { animation: pop 320ms var(--ease-out); }
.tabbar .is-bumped .count { animation: pop 320ms var(--ease-out); }
.qty button, .icon-btn, .theme-toggle, .pill-user .logout, .side-menu a, .tabbar a, .tabbar button, .faq summary i, .platform, .name-field {
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-mid) var(--ease-out), opacity var(--t-mid), filter var(--t-mid);
}
.theme-toggle:hover { transform: rotate(-15deg); }
.side-menu a:hover .pixel-icon { transform: translateX(2px); }
.side-menu .pixel-icon { transition: transform var(--t-fast) var(--ease-out); }
.platform[aria-pressed="false"]:hover { transform: scale(.985); }

/* theme switch: colours cross-fade for a moment instead of snapping */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease, box-shadow 300ms ease !important;
}

/* drawer and overlay close the same way they open */
.overlay.is-leaving { animation: fade-out 180ms ease forwards; }
.drawer.is-leaving { animation: slide-out 200ms ease-in forwards; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes slide-out { to { transform: translateX(30px); opacity: 0; } }
.drawer .line { animation: rise var(--t-mid) var(--ease-out) both; }

/* FAQ answers ease in */
.faq details[open] p { animation: rise var(--t-mid) var(--ease-out); }

/* toasts leave instead of vanishing */
.toast.is-leaving { animation: fade-out 200ms ease forwards; }

/* skeleton while the store loads */
.skeleton { display: flex; flex-direction: column; gap: 14px; }
.sk-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.sk {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%) 0 0 / 300% 100%;
  border: 1px solid var(--line);
  animation: shimmer 1.4s linear infinite;
}
.sk-label { width: 160px; height: 14px; border-radius: 4px; border: 0; }
.sk-feat { height: 74px; }
.sk-panel { height: 260px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
@media (max-width: 760px) { .sk-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .motes { display: none; }
}
