/* ============================================================
   Cosmos Studio 宇宙工作室 · storefront design system
   Tokens sampled from the brand logo (see design.md)
   ============================================================ */

:root {
  --bg-top: #180a54;
  --bg-bottom: #3516ba;
  --surface: rgba(12, 4, 48, 0.72);
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-3: rgba(255, 255, 255, 0.09);
  --planet-hi: #5d5ab8;
  --planet-mid: #4f4ea7;
  --planet-dark: #353274;
  --ring: #f5f5f7;
  --sparkle: #f3f1f3;
  --dust: #b9b4e0;
  --text: #f5f5f7;
  --muted: rgba(245, 245, 247, 0.78);
  --faint: rgba(185, 180, 224, 0.72);
  --line: rgba(245, 245, 247, 0.12);
  --line-strong: rgba(245, 245, 247, 0.24);
  --ok: #6ee7b7;
  --warn: #fbbf24;
  --danger: #fb7185;
  --radius: 16px;
  --radius-lg: 22px;
  --pill: 999px;
  --glow: 0 0 40px rgba(93, 90, 184, 0.45);
  --font-head: "Space Grotesk", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step--1: clamp(0.76rem, 0.74rem + 0.1vw, 0.84rem);
  --step-0: clamp(0.92rem, 0.88rem + 0.2vw, 1.02rem);
  --step-1: clamp(1.08rem, 0.98rem + 0.5vw, 1.3rem);
  --step-2: clamp(1.34rem, 1.14rem + 1vw, 1.9rem);
  --step-3: clamp(1.7rem, 1.3rem + 2vw, 2.7rem);
  --step-4: clamp(2.1rem, 1.4rem + 3.4vw, 3.6rem);
  --gutter: clamp(1rem, 3.2vw, 2.5rem);
  --maxw: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%) fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
  background-image: radial-gradient(rgba(243, 241, 243, 0.16) 1px, transparent 1px),
    radial-gradient(rgba(185, 180, 224, 0.12) 1px, transparent 1px);
  background-size: 180px 180px, 90px 90px;
  background-position: 0 0, 40px 60px;
}

img, svg, canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

p { margin: 0; }

::selection { background: var(--ring); color: var(--bg-top); }

:focus-visible {
  outline: 2px solid var(--dust);
  outline-offset: 2px;
  border-radius: 8px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 120;
  background: var(--ring);
  color: var(--bg-top);
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 12px 0;
}
.skip:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 900px; }

.section { padding-block: clamp(2.4rem, 6vw, 4.6rem); }
.section--tight { padding-block: clamp(1.6rem, 4vw, 2.8rem); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--step--1);
  color: var(--faint);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: var(--step--1);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dust);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.section-head {
  display: grid;
  gap: 0.7rem;
  margin-bottom: clamp(1.4rem, 3vw, 2.4rem);
}
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--muted); max-width: 62ch; }

.grid { display: grid; gap: clamp(0.8rem, 1.8vw, 1.2rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step-0);
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: var(--ring); }
.btn:active { transform: translateY(0); }
.btn--primary { --btn-bg: var(--ring); --btn-fg: var(--bg-top); border-color: transparent; }
.btn--ghost { background: var(--surface-2); }
.btn--wa { --btn-bg: #25d366; --btn-fg: #06281a; border-color: transparent; font-weight: 700; }
.btn--block { width: 100%; }
.btn--sm { padding: 0.45rem 0.85rem; font-size: var(--step--1); }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.55; pointer-events: none; }

.link { color: var(--dust); border-bottom: 1px solid transparent; transition: border-color 0.25s var(--ease), color 0.25s var(--ease); }
.link:hover { color: var(--ring); border-color: var(--line-strong); }

/* ---------- header ---------- */
.announce {
  position: relative;
  z-index: 60;
  background: rgba(6, 1, 28, 0.6);
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--dust);
  text-align: center;
  padding: 0.45rem var(--gutter);
}
.announce[hidden] { display: none; }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  background: rgba(12, 4, 48, 0.66);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.2rem; }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 6px 18px rgba(93, 90, 184, 0.5)); }
.brand__text { display: grid; line-height: 1.1; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: 0.01em; }
.brand__sub { font-size: 0.62rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--faint); }

.nav { display: none; margin-left: auto; align-items: center; gap: 0.15rem; }
@media (min-width: 980px) { .nav { display: flex; } }
.nav a {
  padding: 0.5rem 0.8rem;
  border-radius: var(--pill);
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 500;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.header__actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
@media (min-width: 980px) { .header__actions { margin-left: 0.6rem; } }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 40px;
  padding: 0 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--surface-2);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.icon-btn:hover { background: var(--surface-3); border-color: var(--ring); }
.icon-btn--round { width: 40px; padding: 0; justify-content: center; }
.icon-btn--calc { font-size: var(--step--1); font-weight: 600; }
.icon-btn--calc .icon-btn__label { white-space: nowrap; }
@media (max-width: 1180px) {
  .icon-btn--calc .icon-btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .icon-btn--calc { width: 40px; padding: 0; justify-content: center; }
}

.cart-count {
  min-width: 20px;
  height: 20px;
  padding: 0 0.35rem;
  border-radius: var(--pill);
  background: var(--ring);
  color: var(--bg-top);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cart-count[data-empty="true"] { background: var(--surface-3); color: var(--muted); }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  overflow: hidden;
  background: var(--surface-2);
}
.lang-toggle button {
  border: 0;
  background: transparent;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--muted);
}
.lang-toggle button[aria-pressed="true"] { background: var(--ring); color: var(--bg-top); }

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--surface-2);
  cursor: pointer;
}
.burger span { display: block; height: 1.5px; background: var(--ring); transition: transform 0.3s var(--ease); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
@media (min-width: 980px) { .burger { display: none; } }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  align-content: start;
  gap: 0.2rem;
  padding: calc(var(--header-h) + 2rem) var(--gutter) 2rem;
  background: linear-gradient(180deg, rgba(12, 4, 48, 0.98), rgba(6, 1, 28, 0.99));
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.5s var(--ease), visibility 0.5s;
}
.drawer.is-open { transform: translateY(0); visibility: visible; }
.drawer__lang {
  display: none;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1.2rem;
}
.drawer__lang .lang-toggle { display: inline-flex; }

@media (max-width: 430px) {
  .header__actions .lang-toggle { display: none; }
  .drawer__lang { display: flex; }
  .header__inner { gap: 0.4rem; }
  .brand { gap: 0.45rem; }
  .brand__text { min-width: 0; }
  /* Keep the wordmark on a single line beside the mark. With the Chinese sub-line
     showing, the brand block wraps to three lines at phone widths and the 38px
     mark looks lost next to it. */
  .brand__sub { display: none; }
  .brand__name { font-size: 0.95rem; letter-spacing: 0; }
}
.drawer a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-family: var(--font-head); font-size: var(--step-2); font-weight: 600; }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(2.2rem, 6vw, 4.4rem) clamp(1.6rem, 4vw, 2.6rem); overflow: hidden; }
/* minmax(0,1fr) is load-bearing: with an implicit auto column the track floors at the
   search bar's min-content (~332px), which overflows a 320px viewport and clips the
   submit button (the .hero ancestor hides the overflow instead of scrolling). */
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
@media (min-width: 1040px) { .hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); } }
.hero h1 { font-size: var(--step-4); margin-block: 0.9rem 0.9rem; }
.hero h1 span { display: block; color: var(--dust); font-size: 0.42em; letter-spacing: 0.2em; text-transform: uppercase; font-family: ui-monospace, Consolas, monospace; margin-top: 0.8rem; }
.hero p.lede { color: var(--muted); max-width: 52ch; }
.hero__art { display: grid; place-items: center; aspect-ratio: 1; position: relative; }
.hero__art img { width: min(70%, 380px); filter: drop-shadow(0 24px 70px rgba(93, 90, 184, 0.55)); animation: float 10s ease-in-out infinite; }
.orbit { position: absolute; inset: 6%; border: 1px solid var(--line); border-radius: 50%; animation: spin 48s linear infinite; }
.orbit--2 { inset: 16%; border-style: dashed; animation-duration: 34s; animation-direction: reverse; }
.orbit::after { content: ""; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--sparkle); box-shadow: 0 0 16px 4px rgba(93, 90, 184, 0.8); }

.searchbar {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.4rem;
  padding: 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--surface);
  backdrop-filter: blur(10px);
}
.searchbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.6rem 0.9rem;
}
.searchbar:focus-within {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(185, 180, 224, 0.28);
}
.searchbar input::placeholder { color: rgba(245, 245, 247, 0.6); }

.hero__stats { display: flex; flex-wrap: wrap; gap: 1.4rem 2.2rem; margin-top: 1.6rem; }
.hero__stats div { display: grid; gap: 0.1rem; }
.hero__stats b { font-family: var(--font-head); font-size: var(--step-1); }
.hero__stats span { font-size: var(--step--1); color: var(--faint); }

@keyframes float { 0%, 100% { transform: translateY(-1.5%); } 50% { transform: translateY(1.5%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- category rail + toolbar ---------- */
.rail { display: grid; gap: 0.9rem; }
.rail__group { display: grid; gap: 0.5rem; }
.rail__label { font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--ring); color: var(--bg-top); border-color: transparent; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-block: 1.2rem 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.toolbar__count { font-size: var(--step--1); color: var(--muted); }
.toolbar__count b { color: var(--text); }
.select {
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--surface);
  cursor: pointer;
}
.select option { background: #14063f; color: var(--text); }

/* ---------- product grid ---------- */
.products {
  display: grid;
  gap: clamp(0.8rem, 1.6vw, 1.15rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--glow); }
.card__media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  /* --tile-hue is set per card from its category (see store.js); 248 = the original indigo */
  background: radial-gradient(120% 100% at 30% 10%,
    hsla(var(--tile-hue, 248), 45%, 58%, 0.55),
    hsla(var(--tile-hue, 248), 62%, 14%, 0.92));
  display: grid;
  place-items: center;
}
.card__media img { width: 100%; height: 100%; object-fit: contain; padding: 8%; transition: transform 0.5s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__media img.is-missing { display: none; }
.line img.is-missing { visibility: hidden; }
.card__tag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--pill);
  background: rgba(6, 1, 28, 0.75);
  border: 1px solid var(--line);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--dust);
  backdrop-filter: blur(6px);
}
.card__stock { position: absolute; top: 0.5rem; right: 0.5rem; padding: 0.2rem 0.55rem; border-radius: var(--pill); font-size: 0.66rem; background: rgba(110, 231, 183, 0.16); color: var(--ok); border: 1px solid rgba(110, 231, 183, 0.3); }
.card__stock[data-out="true"] { background: rgba(251, 113, 133, 0.16); color: var(--danger); border-color: rgba(251, 113, 133, 0.3); }
.card__name { font-family: var(--font-head); font-weight: 600; font-size: var(--step-0); line-height: 1.35; }
.card__meta { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin-top: auto; }
.card__price { font-family: var(--font-head); font-size: var(--step-1); font-weight: 700; }
.card__robux { font-size: var(--step--1); color: var(--faint); }
.card__actions { display: flex; gap: 0.4rem; align-items: center; }
.card__actions .btn { flex: 1; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--pill); overflow: hidden; }
.stepper button { width: 34px; height: 36px; border: 0; background: var(--surface-2); cursor: pointer; color: var(--text); font-weight: 700; }
@media (max-width: 720px) {
  .stepper button { width: 44px; height: 44px; }
}
.stepper button:hover { background: var(--surface-3); }
.stepper span { min-width: 28px; text-align: center; font-weight: 600; font-size: var(--step--1); }

.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ---------- steps / trust / faq ---------- */
.steps { display: grid; gap: clamp(0.8rem, 1.8vw, 1.2rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.step { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); display: grid; gap: 0.5rem; }
.step b { font-family: ui-monospace, Consolas, monospace; color: var(--dust); font-size: var(--step--1); letter-spacing: 0.16em; }
.step h3 { font-size: var(--step-1); }
.step p { color: var(--muted); font-size: var(--step--1); }

.trust { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.trust div { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); display: grid; gap: 0.3rem; }
.trust b { font-family: var(--font-head); }
.trust span { color: var(--muted); font-size: var(--step--1); }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding-block: 1rem; }
.faq summary { cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-family: var(--font-head); font-weight: 600; font-size: var(--step-1); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--dust); transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin-top: 0.6rem; color: var(--muted); max-width: 74ch; }

/* ---------- cart drawer / order ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(3, 1, 16, 0.62);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.scrim.is-open { opacity: 1; visibility: visible; }

.cart {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  height: 100dvh;
  width: min(430px, 100vw);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1a0a5c, #0d0330);
  border-left: 1px solid var(--line);
  transform: translateX(101%);
  transition: transform 0.45s var(--ease);
}
.cart.is-open { transform: translateX(0); }
.cart__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.cart__head h2 { font-size: var(--step-1); }
.cart__body { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; display: grid; gap: 0.8rem; align-content: start; }
.cart__foot { padding: 1rem 1.2rem; border-top: 1px solid var(--line); display: grid; gap: 0.7rem; background: rgba(6, 1, 28, 0.45); }
.cart__totals { display: grid; gap: 0.25rem; font-size: var(--step--1); color: var(--muted); }
.cart__totals b { font-family: var(--font-head); font-size: var(--step-2); color: var(--text); }

.line { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.line img { width: 52px; height: 52px; object-fit: contain; border-radius: 10px; background: rgba(93, 90, 184, 0.25); }
.line__name { font-weight: 600; font-size: var(--step--1); line-height: 1.3; }
.line__price { color: var(--faint); font-size: var(--step--1); }
.line__right { display: grid; gap: 0.3rem; justify-items: end; }
.line__remove {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0;
  border: 0;
  background: none;
  color: var(--faint);
  cursor: pointer;
  font-size: var(--step--1);
}
@media (max-width: 720px) {
  .line__remove {
    min-height: 36px;
  }
}
.line__remove:hover { color: var(--danger); }

/* ---------- forms ---------- */
.form { display: grid; gap: 0.8rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: var(--step--1); color: var(--dust); letter-spacing: 0.06em; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(6, 1, 28, 0.5);
  color: var(--text);
  transition: border-color 0.25s var(--ease);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ring); }
.field input::placeholder, .field textarea::placeholder { color: rgba(245, 245, 247, 0.62); }
.field__error { color: var(--danger); font-size: var(--step--1); min-height: 1em; }
.field--wide { grid-column: 1 / -1; }
.form__row { display: grid; gap: 0.8rem; }
@media (min-width: 620px) { .form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.checkbox { display: flex; gap: 0.55rem; align-items: flex-start; font-size: var(--step--1); color: var(--muted); }
.checkbox input { margin-top: 0.25rem; accent-color: var(--dust); }

.status { display: none; padding: 0.7rem 0.9rem; border-radius: 12px; font-size: var(--step--1); border: 1px solid var(--line-strong); }
.status.is-visible { display: block; }
.status--ok { border-color: rgba(110, 231, 183, 0.45); background: rgba(110, 231, 183, 0.12); color: var(--ok); }
.status--err { border-color: rgba(251, 113, 133, 0.45); background: rgba(251, 113, 133, 0.12); color: var(--danger); }
.status--info { border-color: var(--line-strong); background: var(--surface-2); color: var(--muted); }

/* ---------- toast ---------- */
.toasts { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 100; display: grid; gap: 0.5rem; width: min(420px, calc(100vw - 2rem)); }
.toast {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(12, 4, 48, 0.96);
  box-shadow: 0 12px 40px rgba(3, 1, 16, 0.6);
  font-size: var(--step--1);
  animation: rise 0.3s var(--ease);
}
.toast--ok { border-color: rgba(110, 231, 183, 0.5); }
.toast--err { border-color: rgba(251, 113, 133, 0.5); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- order result ---------- */
.order-result { display: grid; gap: 0.8rem; padding: 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }
.order-code { font-family: ui-monospace, Consolas, monospace; font-size: var(--step-2); letter-spacing: 0.1em; }
.order-manifest { white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; font-size: 0.78rem; color: var(--muted); background: rgba(6, 1, 28, 0.6); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem; max-height: 230px; overflow: auto; }

.timeline-row { display: flex; gap: 0.6rem; align-items: center; font-size: var(--step--1); color: var(--muted); }
.timeline-row b { color: var(--text); }
.badge { padding: 0.2rem 0.6rem; border-radius: var(--pill); border: 1px solid var(--line-strong); font-size: var(--step--1); }
.badge--pending { color: var(--warn); border-color: rgba(251, 191, 36, 0.4); }
.badge--paid { color: var(--dust); border-color: rgba(185, 180, 224, 0.4); }
.badge--delivered { color: var(--ok); border-color: rgba(110, 231, 183, 0.4); }
.badge--cancelled { color: var(--danger); border-color: rgba(251, 113, 133, 0.4); }

/* ---------- page head / footer ---------- */
.page-head { padding-block: clamp(2.4rem, 6vw, 4rem) 1.6rem; }
.page-head h1 { font-size: var(--step-3); margin-top: 0.8rem; }
.page-head p { color: var(--muted); max-width: 62ch; margin-top: 0.7rem; }
.crumbs { display: flex; gap: 0.5rem; font-size: var(--step--1); color: var(--faint); }

.cta-band {
  padding: clamp(1.6rem, 4vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: radial-gradient(600px 300px at 85% 10%, rgba(93, 90, 184, 0.45), transparent 65%), linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  display: grid;
  gap: 0.9rem;
}
.cta-band h2 { font-size: var(--step-2); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }

.footer { margin-top: clamp(2rem, 5vw, 3.6rem); border-top: 1px solid var(--line); background: rgba(6, 1, 28, 0.45); padding-block: clamp(1.8rem, 4vw, 3rem) 1.4rem; }
.footer__grid { display: grid; gap: 1.8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.footer h3 { font-size: var(--step--1); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.8rem; font-family: var(--font-body); font-weight: 600; }
.footer ul a,
.footer ul .muted,
.link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

@media (max-width: 720px) {
  .footer ul a,
  .footer ul .muted {
    min-height: 36px;
  }
}

.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.footer__bottom { margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; justify-content: space-between; font-size: var(--step--1); color: var(--faint); }
.subscribe { display: grid; gap: 0.5rem; grid-template-columns: minmax(0, 1fr) auto; }
.subscribe .status { grid-column: 1 / -1; }
.subscribe .form__note { grid-column: 1 / -1; }

/* ---------- robux service calculator ---------- */
.robux-grid {
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.4rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}
.robux-card {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  padding: clamp(1rem, 2.4vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}
.robux-card__head { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: baseline; justify-content: space-between; }
.robux-card__name { font-family: var(--font-head); font-size: var(--step-2); font-weight: 600; }
.robux-card__rate { font-family: var(--font-head); font-size: var(--step-1); color: var(--dust); white-space: nowrap; }
.robux-card__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; font-size: var(--step--1); color: var(--faint); }
.robux-card__note { font-size: var(--step--1); color: var(--muted); }
.robux-amount { display: flex; align-items: center; gap: 0.5rem; }
.robux-amount .stepper { flex: 0 0 auto; }
.robux-amount input {
  width: 100%;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(6, 1, 28, 0.5);
  color: var(--text);
  font-family: var(--font-head);
  font-size: var(--step-1);
  text-align: right;
}
.robux-amount input:focus { border-color: var(--ring); }
.robux-amount input.robux-pass { text-align: left; }
.robux-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.robux-chips button {
  min-height: 40px;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--step--1);
  cursor: pointer;
}
.robux-chips button:hover { color: var(--text); border-color: var(--line-strong); }
.robux-chips button[aria-pressed="true"] { background: var(--ring); color: var(--bg-top); border-color: transparent; }
.robux-total { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.robux-total span { font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.robux-total b { font-family: var(--font-head); font-size: var(--step-3); line-height: 1; }
.robux-card .status { grid-column: 1 / -1; }

/* ---------- admin console ---------- */
.admin__grid { display: grid; gap: 1.2rem; }
@media (min-width: 1000px) { .admin__grid { grid-template-columns: 236px minmax(0, 1fr); align-items: start; } }
.admin__side { display: grid; gap: 0.25rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); align-content: start; }
@media (min-width: 1000px) { .admin__side { position: sticky; top: calc(var(--header-h) + 1rem); } }
.admin__side button[data-tab] { text-align: left; padding: 0.55rem 0.8rem; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; }
.admin__side button[data-tab]:hover { background: var(--surface-3); color: var(--text); }
.admin__side button[aria-selected="true"] { background: var(--ring); color: var(--bg-top); }
.admin__stats { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.2rem; }
.admin__stats div { background: rgba(12, 4, 48, 0.6); padding: 0.9rem 1rem; }
.admin__stats b { font-family: var(--font-head); font-size: var(--step-2); display: block; }
.admin__stats span { font-size: var(--step--1); color: var(--faint); }
.panel { padding: clamp(0.9rem, 2.4vw, 1.4rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.panel__head { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.panel__head--tight { margin-bottom: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.table th, .table td { text-align: left; padding: 0.6rem 0.55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.table tr:hover td { background: rgba(255, 255, 255, 0.03); }
.scroller { overflow-x: auto; }
.mini { padding: 0.35rem 0.7rem; border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface-2); color: var(--text); font-size: 0.74rem; cursor: pointer; }
.mini:hover { border-color: var(--ring); }
.mini--danger { color: var(--danger); border-color: rgba(251, 113, 133, 0.35); }
.login { max-width: 420px; margin: 4rem auto; padding: clamp(1.4rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); }
.h-sm { font-size: var(--step-1); }
.h-md { font-size: var(--step-2); }
.h-lg { font-size: var(--step-3); }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.hidden { display: none !important; }

/* ---------- utilities ---------- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.4rem; }
.mt-4 { margin-top: 2rem; }
.center-x { justify-content: center; }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.brand--plain { padding: 0; }
.mark-lg { width: 120px; height: 120px; margin: 0 auto 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- compact mobile catalog ----------
   Below 560px the base grid (minmax(210px, 1fr)) floors at ONE full-width column, so a
   single card ate ~470px of height and only ~1.5 products fit on a phone screen. Shrink
   the cards and let the grid take two (or three, on wider phones) columns instead. */
@media (max-width: 560px) {
  .products { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.5rem; }
  .card { gap: 0.4rem; padding: 0.5rem; border-radius: 14px; }
  .card__media { border-radius: 9px; }
  .card__tag, .card__stock { top: 0.35rem; padding: 0.13rem 0.4rem; font-size: 0.55rem; letter-spacing: 0.03em; }
  .card__tag { left: 0.35rem; }
  .card__stock { right: 0.35rem; }
  .card__name {
    font-size: 0.82rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card__meta { gap: 0.35rem; }
  .card__price { font-size: 0.95rem; }
  .card__robux { font-size: 0.68rem; }
  .card__actions .btn { width: 100%; padding: 0.5rem 0.6rem; font-size: 0.78rem; }
  .card:hover { transform: none; }
}

/* ---------- mobile hero ----------
   .hero__art is a square block sized for the desktop two-column layout, with the planet at
   min(70%, 380px) inside it and the orbit rings at inset 6%/16% of the block. Squeezed into the
   single-column phone layout that reads as a tall empty square under the copy with a badly
   scaled planet in it, so drop the whole art block whenever the hero is single-column. The
   breakpoint matches the min-width: 1040px rule that creates the two-column layout, so the
   planet only appears where its scale is right. (At 900px the block was 842px tall holding a
   380px planet: the orbit rings scale with the block, the planet is capped.) */
@media (max-width: 1039px) {
  .hero__art { display: none; }
}

/* Plain-HTML pricelist page (/pricelist) - crawlable, no JavaScript required */
.pl { padding: 1.6rem 0 3rem; }
.pl h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 0 0 .6rem; }
.pl-lede { color: var(--dust); max-width: 62ch; margin: 0 0 1rem; }
.pl-group { margin: 2rem 0 .6rem; font-size: 1.15rem; }
.pl-table { width: 100%; border-collapse: collapse; margin: 0 0 1.2rem; }
.pl-table caption { text-align: left; font-weight: 700; padding: .5rem 0; }
.pl-table th, .pl-table td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
.pl-table th { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--dust); }
.pl-item { display: flex; align-items: center; gap: .6rem; }
.pl-item img { width: 40px; height: 40px; object-fit: contain; background: rgba(245, 245, 247, 0.07); border-radius: 8px; padding: 2px; }
.pl-price, .pl-robux { white-space: nowrap; }
@media (max-width: 560px) { .pl-table th, .pl-table td { padding: .35rem .4rem; } .pl-item img { width: 30px; height: 30px; } }
