/* DijitalPazar — design system (see DESIGN.md). Tokens first, components after. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #F4F4F5;
  --border: #E4E4E7;
  --border-strong: #D4D4D8;
  --text: #18181B;
  --text-muted: #52525B;
  --text-subtle: #71717A;
  --accent: #4F46E5;
  --accent-hover: #4338CA;
  --accent-soft: #EEF2FF;
  --accent-text: #FFFFFF;
  --success: #16A34A; --success-soft: #F0FDF4;
  --warning: #B45309; --warning-soft: #FFFBEB;
  --danger: #DC2626;  --danger-soft: #FEF2F2;
  --info: #0369A1;    --info-soft: #F0F9FF;
  --focus: 0 0 0 3px rgb(79 70 229 / .25);
  --overlay: rgb(0 0 0 / .4);
  --header-bg: rgb(255 255 255 / .85);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-display: 40px; --fs-h1: 30px; --fs-h2: 22px; --fs-h3: 17px; --fs-body: 15px; --fs-sm: 13px; --fs-xs: 12px;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;
  --shadow-xs: 0 1px 2px rgb(0 0 0 / .04);
  --shadow-sm: 0 1px 3px rgb(0 0 0 / .06), 0 1px 2px rgb(0 0 0 / .04);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / .08), 0 2px 4px -2px rgb(0 0 0 / .04);
  --shadow-lg: 0 16px 40px -8px rgb(0 0 0 / .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur-fast: 150ms; --dur: 220ms;
  --container: 1200px;
  --gutter: 24px;
  --header-h: 64px;
  --sidebar-w: 248px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090B; --surface: #18181B; --surface-2: #27272A; --border: #27272A; --border-strong: #3F3F46;
    --text: #FAFAFA; --text-muted: #A1A1AA; --text-subtle: #8B8B94;
    --accent: #818CF8; --accent-hover: #A5B4FC; --accent-soft: rgb(129 140 248 / .12); --accent-text: #09090B;
    --success: #4ADE80; --success-soft: rgb(74 222 128 / .12);
    --warning: #FBBF24; --warning-soft: rgb(251 191 36 / .12);
    --danger: #F87171;  --danger-soft: rgb(248 113 113 / .12);
    --info: #38BDF8;    --info-soft: rgb(56 189 248 / .12);
    --focus: 0 0 0 3px rgb(129 140 248 / .35);
    --overlay: rgb(0 0 0 / .6);
    --header-bg: rgb(24 24 27 / .85);
    --shadow-xs: none; --shadow-sm: none; --shadow-md: 0 4px 16px -4px rgb(0 0 0 / .5); --shadow-lg: 0 16px 40px -8px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090B; --surface: #18181B; --surface-2: #27272A; --border: #27272A; --border-strong: #3F3F46;
  --text: #FAFAFA; --text-muted: #A1A1AA; --text-subtle: #8B8B94;
  --accent: #818CF8; --accent-hover: #A5B4FC; --accent-soft: rgb(129 140 248 / .12); --accent-text: #09090B;
  --success: #4ADE80; --success-soft: rgb(74 222 128 / .12);
  --warning: #FBBF24; --warning-soft: rgb(251 191 36 / .12);
  --danger: #F87171;  --danger-soft: rgb(248 113 113 / .12);
  --info: #38BDF8;    --info-soft: rgb(56 189 248 / .12);
  --focus: 0 0 0 3px rgb(129 140 248 / .35);
  --overlay: rgb(0 0 0 / .6);
  --header-bg: rgb(24 24 27 / .85);
  --shadow-xs: none; --shadow-sm: none; --shadow-md: 0 4px 16px -4px rgb(0 0 0 / .5); --shadow-lg: 0 16px 40px -8px rgb(0 0 0 / .6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 var(--fs-body)/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { margin: 0; color: var(--text); }
h1 { font-size: var(--fs-h1); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); line-height: 1.4; font-weight: 600; }
p { margin: 0; }
code, pre, kbd { font-family: var(--mono); font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-6) 0; }
:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus); border-radius: var(--r-sm); }
::selection { background: var(--accent-soft); color: var(--text); }
.sprite { display: none; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }
.icon--xl { width: 40px; height: 40px; stroke-width: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.small { font-size: var(--fs-sm); }
.mono { font-family: var(--mono); }
.nums { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.eyebrow { font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--text-subtle); }
.strike { text-decoration: line-through; color: var(--text-subtle); font-weight: 400; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.main { flex: 1; padding: var(--sp-10) 0 var(--sp-16); }
.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-8); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.row--top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: var(--sp-6); }
.grid-2 { display: grid; gap: var(--sp-6); grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: var(--sp-6); grid-template-columns: 1fr; }
.grid-4 { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-6); }
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-8); }
.page-head p { color: var(--text-muted); margin-top: var(--sp-2); max-width: 60ch; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.section { padding: var(--sp-12) 0; }
.section--tight { padding: var(--sp-8) 0; }

/* ---------- Header ---------- */
.announcement { background: var(--text); color: var(--bg); font-size: var(--fs-sm); text-align: center; padding: var(--sp-2) var(--sp-4); }
.header { position: sticky; top: 0; z-index: 40; background: var(--header-bg); backdrop-filter: saturate(180%) blur(8px); -webkit-backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--border); }
.header__inner { height: var(--header-h); display: flex; align-items: center; gap: var(--sp-6); }
.logo { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; color: var(--text); white-space: nowrap; }
.logo:hover { color: var(--text); }
.logo__mark { width: 30px; height: 30px; border-radius: 9px; background: var(--text); color: var(--bg); display: grid; place-items: center; }
.logo__mark .icon { width: 17px; height: 17px; stroke-width: 2.25; }
.nav { display: none; gap: var(--sp-1); }
.nav a { color: var(--text-muted); font-weight: 500; font-size: 14px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); transition: color var(--dur-fast), background var(--dur-fast); }
.nav a:hover, .nav a.is-active { color: var(--text); background: var(--surface-2); }
.header__search { display: none; flex: 1; max-width: 360px; position: relative; }
.header__search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-subtle); width: 16px; height: 16px; }
.header__search input { width: 100%; height: 38px; padding: 0 12px 0 36px; border: 1px solid var(--border); border-radius: var(--r-full); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; transition: border-color var(--dur-fast), background var(--dur-fast); }
.header__search input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: var(--focus); }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }
.balance-pill { display: inline-flex; align-items: center; gap: var(--sp-2); height: 36px; padding: 0 var(--sp-3); border-radius: var(--r-full); background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.balance-pill:hover { color: var(--accent-hover); }
.balance-pill .icon { width: 16px; height: 16px; }
.mobile-search { padding: 0 var(--gutter) var(--sp-3); }
.mobile-search .header__search { display: block; max-width: none; }
@media (min-width: 1024px) { .nav { display: flex; } }
@media (min-width: 1280px) {
  .header__search { display: block; min-width: 220px; }
  .mobile-search { display: none; }
}
@media (min-width: 1024px) and (max-width: 1279px) { .mobile-search { padding-top: 0; } }

/* Dropdown (details/summary — works without JS) */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: var(--sp-2); z-index: 50; animation: pop var(--dur) var(--ease); }
.dropdown__menu a, .dropdown__menu button { display: flex; align-items: center; gap: var(--sp-3); width: 100%; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); color: var(--text); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown__menu a:hover, .dropdown__menu button:hover { background: var(--surface-2); color: var(--text); }
.dropdown__menu .icon { width: 16px; height: 16px; color: var(--text-muted); }
.dropdown__head { padding: var(--sp-2) var(--sp-3) var(--sp-3); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-2); }
.dropdown__head strong { display: block; font-size: 14px; }
.avatar { width: 36px; height: 36px; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: 40px; padding: 0 var(--sp-4); border-radius: var(--r-md); border: 1px solid transparent;
  font: 500 14px/1 var(--font); white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
  position: relative;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn--primary { background: var(--accent); color: var(--accent-text); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--surface-2); color: var(--text); }
.btn--ghost { background: transparent; color: var(--text-muted); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(.94); color: #fff; }
.btn--dark { background: var(--text); color: var(--bg); }
.btn--dark:hover { opacity: .9; color: var(--bg); }
.btn--sm { height: 32px; padding: 0 var(--sp-3); font-size: 13px; border-radius: var(--r-sm); }
.btn--lg { height: 48px; padding: 0 var(--sp-6); font-size: 15px; }
.btn--block { width: 100%; }
.btn--icon { width: 40px; padding: 0; }
.btn--icon.btn--sm { width: 32px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--accent-text) var(--accent-text) transparent transparent; animation: spin .7s linear infinite; }
.btn--secondary.is-loading::after, .btn--ghost.is-loading::after { border-color: var(--text) var(--text) transparent transparent; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: var(--sp-4); }
.label { font-size: var(--fs-sm); font-weight: 500; color: var(--text); }
.label .opt { color: var(--text-subtle); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.textarea { padding: 10px 12px; min-height: 96px; resize: vertical; line-height: 1.5; }
.textarea--code { font-family: var(--mono); font-size: 13px; min-height: 260px; white-space: pre; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2371717A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-subtle); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.hint { font-size: var(--fs-sm); color: var(--text-subtle); }
.error { font-size: var(--fs-sm); color: var(--danger); }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-right: 44px; }
.input-group__addon { position: absolute; right: 12px; color: var(--text-subtle); font-size: 14px; pointer-events: none; }
.input-group__btn { position: absolute; right: 4px; }
.check { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.form-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.form-grid .field + .field { margin-top: 0; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (min-width: 768px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form-actions { display: flex; gap: var(--sp-3); justify-content: flex-end; flex-wrap: wrap; margin-top: var(--sp-6); padding-top: var(--sp-6); border-top: 1px solid var(--border); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); height: 48px; }
.qty button { width: 44px; height: 100%; border: 0; background: none; color: var(--text); font-size: 18px; cursor: pointer; border-radius: var(--r-md); }
.qty button:hover { background: var(--surface-2); }
.qty input { width: 52px; border: 0; background: none; text-align: center; font: 600 15px var(--font); color: var(--text); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--shadow-xs); }
.card--flush { padding: 0; overflow: hidden; }
.card--interactive { transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.card--interactive:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-5) var(--sp-6); border-bottom: 1px solid var(--border); }
.card__head h2, .card__head h3 { font-size: var(--fs-h3); }
.card__body { padding: var(--sp-6); }
.card__foot { padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--border); background: var(--surface-2); }
.card--muted { background: var(--surface-2); box-shadow: none; }
.card--accent { background: var(--accent-soft); border-color: transparent; box-shadow: none; }

/* ---------- Product card ---------- */
.products { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
@media (min-width: 768px) { .products { gap: var(--sp-6); } }
.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; color: var(--text); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.product-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--text); }
.product-card.is-soldout { opacity: .6; }
.product-card__media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__media .badge { position: absolute; top: 12px; left: 12px; }
.product-card__body { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-4) var(--sp-5) var(--sp-5); flex: 1; }
.product-card__title { font-size: var(--fs-h3); font-weight: 600; line-height: 1.35; }
.product-card__meta { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-muted); }
.product-card__meta .icon { width: 14px; height: 14px; }
.product-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: auto; padding-top: var(--sp-4); }
.price { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.price small { font-size: var(--fs-sm); font-weight: 400; margin-left: var(--sp-1); }
.product-card .price { font-size: 19px; }
.monogram { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; color: #fff; box-shadow: var(--shadow-md); }
.monogram--lg { width: 112px; height: 112px; border-radius: 30px; font-size: 38px; }
.tone-0 { background: linear-gradient(135deg, #4F46E5, #7C3AED); }
.tone-1 { background: linear-gradient(135deg, #0EA5E9, #2563EB); }
.tone-2 { background: linear-gradient(135deg, #10B981, #0D9488); }
.tone-3 { background: linear-gradient(135deg, #F43F5E, #E11D48); }
.tone-4 { background: linear-gradient(135deg, #F59E0B, #EA580C); }
.tone-5 { background: linear-gradient(135deg, #18181B, #52525B); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--sp-2); border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; background: var(--surface-2); color: var(--text-muted); }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--accent { background: var(--accent-soft); color: var(--accent); }
.badge--neutral { background: var(--surface-2); color: var(--text-muted); }
.badge--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--solid { background: var(--surface); box-shadow: var(--shadow-sm); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--accent); color: var(--accent-text); font-size: 11px; font-weight: 600; margin-left: auto; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { background: var(--surface-2); color: var(--text-muted); font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: var(--sp-3) var(--sp-4); white-space: nowrap; }
.table td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); vertical-align: middle; height: 52px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table a.row-link { color: var(--text); font-weight: 500; }
.table a.row-link:hover { color: var(--accent); }
.table td .sub { display: block; font-size: var(--fs-sm); color: var(--text-subtle); }
.amount-pos { color: var(--success); }
.amount-neg { color: var(--text); }
@media (max-width: 767px) {
  .table--responsive thead { display: none; }
  .table--responsive tr { display: block; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); }
  .table--responsive tbody tr:last-child { border-bottom: 0; }
  .table--responsive td { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); padding: var(--sp-1) 0; border: 0; height: auto; text-align: right; }
  .table--responsive td::before { content: attr(data-label); color: var(--text-subtle); font-size: var(--fs-sm); text-align: left; }
  .table--responsive td.num { text-align: right; }
  .table--responsive tbody tr:hover td { background: transparent; }
}

/* ---------- Delivery box ---------- */
.delivery { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--r-md); padding: var(--sp-4); }
.delivery + .delivery { margin-top: var(--sp-3); }
.delivery__row { display: flex; align-items: center; gap: var(--sp-3); min-height: 36px; }
.delivery__row + .delivery__row { border-top: 1px solid var(--border); margin-top: var(--sp-2); padding-top: var(--sp-2); }
.delivery__label { width: 120px; flex-shrink: 0; font-size: var(--fs-sm); color: var(--text-subtle); }
.delivery__value { flex: 1; min-width: 0; font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; color: var(--text); }
.delivery__value--big { font-size: 18px; font-weight: 600; letter-spacing: .02em; }
.delivery__text { font-family: var(--mono); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.delivery__actions { display: flex; gap: var(--sp-1); flex-shrink: 0; }
.delivery__index { font-size: var(--fs-xs); color: var(--text-subtle); margin-bottom: var(--sp-2); }
.is-secret { filter: blur(5px); user-select: none; transition: filter var(--dur); }
.is-secret.is-revealed { filter: none; user-select: text; }
@media (max-width: 639px) {
  .delivery__row { flex-wrap: wrap; }
  .delivery__label { width: 100%; }
}

/* ---------- Alerts & toasts ---------- */
.alert { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); border-left: 3px solid currentColor; font-size: 14px; line-height: 1.5; }
.alert + .alert { margin-top: var(--sp-2); }
.alert .icon { width: 18px; height: 18px; margin-top: 1px; }
.alert__body { color: var(--text); flex: 1; }
.alert--success { background: var(--success-soft); color: var(--success); }
.alert--warning { background: var(--warning-soft); color: var(--warning); }
.alert--danger { background: var(--danger-soft); color: var(--danger); }
.alert--info { background: var(--info-soft); color: var(--info); }
.flash-stack { margin-bottom: var(--sp-6); }
.toast-region { position: fixed; right: var(--sp-6); bottom: var(--sp-6); z-index: 100; display: flex; flex-direction: column; gap: var(--sp-2); pointer-events: none; }
.toast { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); background: var(--text); color: var(--bg); border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; animation: toast-in var(--dur) var(--ease); }
.toast .icon { width: 16px; height: 16px; }
@media (max-width: 639px) { .toast-region { left: var(--sp-4); right: var(--sp-4); bottom: var(--sp-4); align-items: center; } }

/* ---------- Modal ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: min(480px, calc(100vw - 32px)); width: 100%; color: var(--text); }
.modal::backdrop { background: var(--overlay); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal[open] .modal__box { animation: pop var(--dur) var(--ease); }
.modal__box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: var(--sp-8); }
.modal__title { font-size: var(--fs-h2); margin-bottom: var(--sp-2); }
.modal__actions { display: flex; gap: var(--sp-3); justify-content: flex-end; margin-top: var(--sp-6); flex-wrap: wrap; }
.summary-list { margin: var(--sp-5) 0 0; padding: 0; list-style: none; font-size: 14px; }
.summary-list li { display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.summary-list li:last-child { border-bottom: 0; }
.summary-list li span:first-child { color: var(--text-muted); }
.summary-list li strong { font-variant-numeric: tabular-nums; }
.summary-list .total { font-size: var(--fs-h3); }

/* ---------- Empty, stat, tabs, pagination, steps, code ---------- */
.empty { text-align: center; padding: var(--sp-12) var(--sp-6); }
.empty .icon { color: var(--text-subtle); margin: 0 auto var(--sp-4); }
.empty h3 { margin-bottom: var(--sp-1); }
.empty p { color: var(--text-muted); max-width: 40ch; margin: 0 auto; }
.empty .btn { margin-top: var(--sp-5); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--shadow-xs); }
.stat__label { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-muted); }
.stat__label .icon { width: 16px; height: 16px; }
.stat__value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: var(--sp-2); line-height: 1.15; }
@media (min-width: 1024px) { .stat__value { font-size: var(--fs-h1); } }
.tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--sp-6); }
.tabs a, .tabs button { padding: var(--sp-3) var(--sp-3); color: var(--text-muted); font: 500 14px var(--font); white-space: nowrap; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs .is-active { color: var(--text); border-bottom-color: var(--accent); }
.tab-panel[hidden] { display: none; }
.pagination { display: flex; gap: var(--sp-1); justify-content: center; margin-top: var(--sp-6); flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; height: 36px; padding: 0 var(--sp-2); display: grid; place-items: center; border-radius: var(--r-md); font-size: 14px; color: var(--text-muted); border: 1px solid var(--border); background: var(--surface); }
.pagination a:hover { color: var(--text); border-color: var(--border-strong); }
.pagination .is-active { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.steps { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); counter-reset: step; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps li { counter-increment: step; display: flex; align-items: center; gap: var(--sp-3); font-size: 14px; font-weight: 500; color: var(--text); }
.steps li::before { content: counter(step); width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--r-full); display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.code { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-4); padding-right: 48px; font-family: var(--mono); font-size: 13px; line-height: 1.6; overflow-x: auto; white-space: pre; margin: 0; color: var(--text); }
.code-wrap { position: relative; }
.code-wrap .btn { position: absolute; top: 8px; right: 8px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-2) var(--sp-6); margin: 0; font-size: 14px; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.divider-list > * + * { border-top: 1px solid var(--border); }
.skeleton { background: var(--surface-2); border-radius: var(--r-sm); position: relative; overflow: hidden; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgb(255 255 255 / .4), transparent); animation: shimmer 1.4s infinite; }

/* ---------- Home ---------- */
.hero { padding: var(--sp-12) 0 var(--sp-10); }
.hero__inner { display: grid; gap: var(--sp-10); align-items: center; }
@media (min-width: 1024px) { .hero { padding: var(--sp-16) 0 var(--sp-12); } .hero__inner { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { font-size: 32px; line-height: 1.1; letter-spacing: -0.03em; max-width: 16ch; }
@media (min-width: 768px) { .hero h1 { font-size: var(--fs-display); } }
@media (min-width: 1280px) { .hero h1 { font-size: 52px; } }
.hero__lead { font-size: 17px; color: var(--text-muted); max-width: 46ch; margin-top: var(--sp-5); }
.hero__actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-8); flex-wrap: wrap; }
.hero__tag { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 4px 12px 4px 4px; border: 1px solid var(--border); border-radius: var(--r-full); background: var(--surface); font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-5); }
.hero__tag b { background: var(--accent-soft); color: var(--accent); font-weight: 600; padding: 2px 8px; border-radius: var(--r-full); font-size: var(--fs-xs); }
.hero__stack { position: relative; display: grid; gap: var(--sp-3); }
.hero__item { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-md); color: var(--text); transition: transform var(--dur) var(--ease); }
.hero__item:hover { transform: translateX(4px); color: var(--text); }
.hero__item:nth-child(2) { margin-left: var(--sp-8); }
.hero__item:nth-child(3) { margin-left: var(--sp-4); }
.hero__item .monogram { width: 48px; height: 48px; border-radius: 14px; font-size: 17px; box-shadow: none; }
.hero__item .price { font-size: 17px; margin-left: auto; }
.trust { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; padding: var(--sp-6) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
@media (min-width: 768px) { .trust { grid-template-columns: repeat(3, 1fr); } }
.trust__item { display: flex; gap: var(--sp-3); align-items: center; }
.trust__icon { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.trust__item strong { display: block; font-size: 14px; }
.trust__item span { font-size: var(--fs-sm); color: var(--text-muted); }
.category-tiles { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.category-tile { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--text); transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur); }
.category-tile:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--text); }
.category-tile .monogram { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; box-shadow: none; }
.category-tile strong { display: block; font-size: 15px; font-weight: 600; }
.category-tile span { font-size: var(--fs-sm); color: var(--text-subtle); }
.how { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 768px) { .how { grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); } }
.how__step { padding: var(--sp-6); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.how__num { font-size: var(--fs-xs); font-weight: 600; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }
.how__step h3 { margin: var(--sp-2) 0 var(--sp-1); }
.how__step p { color: var(--text-muted); font-size: 14px; }
.band { display: grid; gap: var(--sp-6); align-items: center; padding: var(--sp-10); border-radius: var(--r-xl); background: var(--text); color: var(--bg); }
.band h2 { color: var(--bg); font-size: 26px; letter-spacing: -0.02em; }
.band p { color: var(--bg); opacity: .72; margin-top: var(--sp-2); max-width: 56ch; }
.band .btn--secondary { background: var(--bg); color: var(--text); border-color: transparent; }
.band .btn--ghost { color: var(--bg); border: 1px solid rgb(255 255 255 / .2); }
:root[data-theme="dark"] .band .btn--ghost { border-color: rgb(0 0 0 / .2); }
.band .btn--ghost:hover { background: rgb(127 127 127 / .2); color: var(--bg); }
@media (min-width: 1024px) { .band { grid-template-columns: 1fr auto; } }
@media (max-width: 639px) { .band { padding: var(--sp-6); } }

/* ---------- Listing / product page ---------- */
.listing { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-8); }
@media (min-width: 1024px) { .listing { grid-template-columns: 220px 1fr; } }
.filter-list { display: none; }
.filter-list a { display: flex; justify-content: space-between; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); color: var(--text-muted); font-size: 14px; font-weight: 500; }
.filter-list a:hover { background: var(--surface-2); color: var(--text); }
.filter-list a.is-active { background: var(--accent-soft); color: var(--accent); }
.filter-list a span { color: var(--text-subtle); font-weight: 400; }
.chips { display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; padding-bottom: var(--sp-1); }
.chip { display: inline-flex; align-items: center; height: 34px; padding: 0 var(--sp-4); border-radius: var(--r-full); border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
@media (min-width: 1024px) { .filter-list { display: block; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; } .chips--mobile { display: none; } }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.toolbar .select { width: auto; min-width: 180px; }
.breadcrumb { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-subtle); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .icon { width: 14px; height: 14px; }
.product-layout { display: grid; gap: var(--sp-8); }
@media (min-width: 1024px) { .product-layout { grid-template-columns: 1fr 1fr; gap: var(--sp-12); } }
.product-media { aspect-ratio: 4 / 3; border-radius: var(--r-xl); background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { margin: var(--sp-2) 0 var(--sp-3); }
.product-info .lead { color: var(--text-muted); font-size: 16px; }
.product-badges { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-4); }
.buy-box { margin-top: var(--sp-6); padding: var(--sp-6); border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.buy-box__price { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; }
.buy-box__price .price { font-size: 32px; }
.buy-box__row { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); flex-wrap: wrap; }
.buy-box__row .btn { flex: 1; min-width: 180px; }
.buy-box__note { display: flex; gap: var(--sp-2); align-items: center; margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--text-muted); }
.buy-box__note .icon { width: 16px; height: 16px; color: var(--success); }
.prose { color: var(--text-muted); white-space: pre-line; line-height: 1.7; }

/* ---------- Panel layouts (account & admin) ---------- */
.panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); padding-top: var(--sp-8); padding-bottom: var(--sp-16); flex: 1; }
@media (min-width: 1024px) { .panel { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); gap: var(--sp-10); } }
.sidebar { min-width: 0; }
.sidebar__nav { display: flex; gap: var(--sp-1); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) var(--sp-2); }
.sidebar__nav a, .sidebar__nav button { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); color: var(--text-muted); font: 500 14px var(--font); white-space: nowrap; background: none; border: 0; cursor: pointer; width: 100%; text-align: left; }
.sidebar__nav a:hover, .sidebar__nav button:hover { background: var(--surface-2); color: var(--text); }
.sidebar__nav a.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.sidebar__nav .icon { width: 18px; height: 18px; }
.sidebar__group { font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--text-subtle); padding: var(--sp-4) var(--sp-3) var(--sp-1); display: none; }
.sidebar__user { display: none; }
@media (min-width: 1024px) {
  .sidebar { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
  .sidebar__nav { flex-direction: column; overflow: visible; margin: 0; padding: 0; }
  .sidebar__nav a, .sidebar__nav button { width: 100%; }
  .sidebar__nav a.is-active { border-color: var(--border); }
  .sidebar__group { display: block; }
  .sidebar__user { display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-3) var(--sp-5); margin-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
  .sidebar__user strong { display: block; font-size: 14px; line-height: 1.3; }
  .sidebar__user span { font-size: var(--fs-sm); color: var(--text-subtle); }
}
.content { min-width: 0; }
.content > .page-head { margin-bottom: var(--sp-6); }
.balance-card { display: flex; flex-direction: column; gap: var(--sp-5); padding: var(--sp-6); border-radius: var(--r-xl); background: var(--text); color: var(--bg); }
.balance-card .eyebrow { color: var(--bg); opacity: .6; }
.balance-card__value { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: var(--sp-1); }
.balance-card .btn--secondary { background: var(--bg); color: var(--text); border-color: transparent; }
.bank-card { display: flex; flex-direction: column; gap: var(--sp-3); }
.bank-card__head { display: flex; align-items: center; gap: var(--sp-3); }
.bank-card__logo { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--surface-2); display: grid; place-items: center; color: var(--text-muted); }
.copy-line { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3); background: var(--surface-2); border-radius: var(--r-md); }
.copy-line span { flex: 1; min-width: 0; font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
.copy-line small { display: block; font-family: var(--font); font-size: var(--fs-xs); color: var(--text-subtle); }
.key-reveal { padding: var(--sp-5); border-radius: var(--r-lg); background: var(--success-soft); border: 1px solid var(--success); }
.admin-body .header { background: var(--surface); }
@media (max-width: 639px) {
  .admin-body .header .badge { display: none; }
  .hide-sm { display: none !important; }
}
.admin-body .panel { padding-top: var(--sp-6); }
@media (min-width: 1024px) { .admin-body .panel { gap: var(--sp-8); } }
/* Admin sidebar takes width, so two-column blocks stack until the desktop breakpoint */
.admin-body .grid-2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) {
  .admin-body .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-body .grid-2--wide { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}
.filters { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; margin-bottom: var(--sp-4); }
.filters .input, .filters .select { width: auto; min-width: 180px; flex: 1; max-width: 280px; }
.inline-form { display: inline; }
.actions-cell { display: flex; gap: var(--sp-2); justify-content: flex-end; flex-wrap: wrap; }
details.review > summary { list-style: none; cursor: pointer; }
details.review > summary::-webkit-details-marker { display: none; }
details.review[open] > summary { margin-bottom: var(--sp-3); }

/* ---------- Auth ---------- */
.auth { flex: 1; display: grid; place-items: center; padding: var(--sp-10) var(--gutter); }
.auth__box { width: 100%; max-width: 400px; }
.auth__box .logo { margin-bottom: var(--sp-8); }
.auth__box h1 { font-size: 26px; }
.auth__box > p { color: var(--text-muted); margin-top: var(--sp-2); margin-bottom: var(--sp-6); }
.auth__alt { text-align: center; margin-top: var(--sp-6); font-size: 14px; color: var(--text-muted); }
.install { max-width: 720px; margin: 0 auto; padding: var(--sp-10) var(--gutter); width: 100%; }
.req-list li { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; font-size: 14px; }
.req-list .ok { color: var(--success); }
.req-list .fail { color: var(--danger); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: var(--sp-12) 0 var(--sp-6); margin-top: auto; }
.footer__grid { display: grid; gap: var(--sp-8); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer__brand { grid-column: 1 / -1; }
@media (min-width: 768px) { .footer__brand { grid-column: auto; } }
.footer__brand p { color: var(--text-muted); font-size: 14px; margin-top: var(--sp-3); max-width: 36ch; }
.footer h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--text-subtle); font-weight: 500; margin-bottom: var(--sp-3); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: var(--sp-2); }
.footer li a { color: var(--text-muted); font-size: 14px; }
.footer li a:hover { color: var(--text); }
.footer__bottom { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-10); padding-top: var(--sp-6); border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-subtle); }

/* ---------- Error pages ---------- */
.error-page { flex: 1; display: grid; place-items: center; text-align: center; padding: var(--sp-16) var(--gutter); }
.error-page__code { font-size: 72px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--border-strong); }
.error-page h1 { margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-h2); }
.error-page p { color: var(--text-muted); }
.error-page .btn { margin-top: var(--sp-6); }

/* ---------- Motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: scale(.98) translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .card--interactive:hover, .product-card:hover, .category-tile:hover, .hero__item:hover { transform: none; }
}

@media (max-width: 639px) {
  :root { --gutter: 16px; --fs-h1: 26px; }
  .main { padding: var(--sp-6) 0 var(--sp-12); }
  .card:not(.card--flush) { padding: var(--sp-5); }
  .card__head, .card__body { padding-left: var(--sp-5); padding-right: var(--sp-5); }
  .modal__box { padding: var(--sp-6); }
  .hero__item:nth-child(2), .hero__item:nth-child(3) { margin-left: 0; }
  .header__inner { gap: var(--sp-3); }
  .balance-pill { padding: 0 10px; }
}

/* ---------- Notifications ---------- */
.bell { position: relative; }
.bell__count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-full); background: var(--danger); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.notification-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.notification { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.notification.is-unread { border-color: var(--accent); background: var(--accent-soft); }
.notification__icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--r-md); background: var(--surface-2); display: grid; place-items: center; color: var(--text-muted); }
.notification__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.notification__body p { margin: 0; }

/* ---------- Support threads ---------- */
.thread { display: flex; flex-direction: column; gap: var(--sp-3); }
.bubble { align-self: flex-start; max-width: min(560px, 88%); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface-2); }
.bubble--own { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.bubble__meta { font-size: var(--fs-xs); color: var(--text-subtle); margin-bottom: var(--sp-1); }
.bubble__body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-sm); color: var(--text); }

/* ---------- Spacing helpers for form cards ---------- */
.card > h2 + p, .card > h2 + .form-grid, .card > h2 + .field, .card > p + .form-grid { margin-top: var(--sp-3); }
.card > h2 + .form-grid, .card > p + .form-grid { margin-top: var(--sp-5); }
.card > .btn--block { margin-top: var(--sp-6); }
.card > form + form { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
@media (min-width: 1024px) {
  .grid-2--wide { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .grid-2--side { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}
.compact-row { padding: var(--sp-3) var(--sp-6); }
.tabs--flush { border-bottom: 0; margin: -20px 0 -21px; }
.thumb { border-radius: var(--r-sm); object-fit: cover; border: 1px solid var(--border); }
.card > .btn--block:first-child { margin-top: 0; }
form.card > .check + .btn--block { margin-top: var(--sp-5); }

/* ---------- Binance deposit ---------- */
.crypto-amount { padding: var(--sp-5); border-radius: var(--r-lg); background: var(--accent-soft); }
.crypto-amount__value { display: flex; align-items: center; gap: var(--sp-2); font-size: 34px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; margin: var(--sp-1) 0 var(--sp-2); }
.crypto-amount__value small { font-size: 16px; font-weight: 600; color: var(--text-muted); }
details.reveal > summary { list-style: none; }
details.reveal > summary::-webkit-details-marker { display: none; }
details.reveal[open] > summary { display: none; }
.steps--vertical { grid-template-columns: 1fr !important; }
.steps--vertical li { align-items: flex-start; font-weight: 400; }
.badge [data-countdown-text] { font-weight: 600; }
.is-expired { background: var(--danger-soft) !important; color: var(--danger) !important; }
.list-plain li.row { flex-wrap: nowrap; align-items: flex-start; }
.list-plain li.row .icon { margin-top: 3px; color: var(--success); }

/* ---------- Product icons (allsvgicons) ---------- */
.product-icon { display: grid; place-items: center; width: 76px; height: 76px; padding: 14px; border-radius: 20px; background: #FFFFFF; border: 1px solid var(--border); box-shadow: var(--shadow-md); flex-shrink: 0; }
.product-icon img { width: 100%; height: 100%; object-fit: contain; }
.product-icon--lg { width: 136px; height: 136px; padding: 24px; border-radius: 34px; }
.product-icon--hero { width: 48px; height: 48px; padding: 8px; border-radius: 14px; box-shadow: none; }
.product-icon--sm { width: 36px; height: 36px; padding: 6px; border-radius: 10px; box-shadow: none; }
.product-card__media img.icon-img { width: auto; height: auto; }
.product-card__media .product-icon img, .product-media .product-icon img { width: 100%; height: 100%; object-fit: contain; }
.monogram--hero { width: 48px; height: 48px; border-radius: 14px; font-size: 17px; box-shadow: none; }
.monogram--sm { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; box-shadow: none; }
.row--nowrap { flex-wrap: nowrap; }
.hero__item .product-icon { flex-shrink: 0; }

/* ---------- Two-step purchase modal ---------- */
.modal-step[hidden] { display: none !important; }
.modal__icon { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: var(--sp-4); }
.input-recap { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-2); font-size: 14px; margin-top: var(--sp-4); }
.input-recap span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); }
.summary-list li.stacked { flex-direction: column; gap: 2px; }
.summary-list li.stacked strong { text-align: left; }
