/* ============================================================
   NFTMARKET.DIGITAL — "PAPER POP" Design System  ·  v3
   Neo-brutalist editorial: warm paper, ink borders, hard offset
   shadows, cobalt + acid-lime accents. Light-first, night mode.
   English-first (LTR), full RTL support for fa/ar.
   ============================================================ */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Variable.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Accent palette — cobalt / acid lime / coral / teal / amber */
  --acc: #2643ff;
  --acc-2: #c6f135;
  --acc-3: #ff5470;
  --teal: #0db9a8;
  --gold: #ffb02e;

  /* Legacy var names kept so page-level inline styles keep working,
     remapped to the new palette (zero purple anywhere). */
  --violet-050: #eef1ff;
  --violet-100: #dfe5ff;
  --violet-200: #b9c4ff;
  --violet-300: #2643ff;
  --violet-400: #2643ff;
  --violet-500: #2643ff;
  --violet-600: #1d33cc;
  --violet-700: #16279c;
  --violet-800: #101c72;
  --violet-900: #0a1348;
  --orchid: #2643ff;
  --magenta: #ff5470;
  --cyanic: #0db9a8;

  /* "Gradients" are now flat/duotone blocks — no glow, no blur */
  --grad-brand: linear-gradient(0deg, var(--acc), var(--acc));
  --grad-brand-soft: linear-gradient(0deg, rgba(198, 241, 53, .5), rgba(198, 241, 53, .5));
  --grad-text: linear-gradient(0deg, currentColor, currentColor);

  --font-sans: "Space Grotesk", "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Space Grotesk", "Vazirmatn", monospace;

  /* Chunky, square-ish geometry (old theme was pill/round — this is not) */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 10px;   /* legacy name; intentionally NOT a pill */

  --bw: 2px;             /* signature ink border width */
  --shadow-hard: 4px 4px 0 var(--ink);
  --shadow-hard-lg: 7px 7px 0 var(--ink);
  --shadow-glow: 6px 6px 0 var(--ink);      /* legacy names -> hard shadows */
  --shadow-glow-sm: 3px 3px 0 var(--ink);
  --ease-spring: cubic-bezier(.2, .9, .3, 1.2);
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --header-h: 74px;
  --container: 1280px;
}

/* Light (default) — "warm paper" */
:root, html.light {
  color-scheme: light;
  --paper: #f4efe4;
  --bg-0: #f4efe4;
  --bg-1: #efe8d8;
  --bg-2: #e7dfcb;
  --bg-3: #ddd3ba;
  --ink: #191713;
  --surface: #fffdf6;
  --surface-2: #f9f5e9;
  --glass: #fffdf6;
  --card-bg: #fffdf6;
  --header-bg: #f4efe4;
  --line: #191713;
  --line-strong: #191713;
  --text-1: #191713;
  --text-2: #4f4a3e;
  --text-3: #8a8371;
  --success: #0e9f6e;
  --danger: #e02d3c;
  --warning: #b45309;
  --info: #1d4ed8;
}

/* Night mode — "charcoal paper", same ink discipline */
html.dark {
  color-scheme: dark;
  --paper: #171511;
  --bg-0: #171511;
  --bg-1: #1d1b15;
  --bg-2: #26231b;
  --bg-3: #322e23;
  --ink: #ede8d8;
  --surface: #211e17;
  --surface-2: #2a2720;
  --glass: #211e17;
  --card-bg: #211e17;
  --header-bg: #171511;
  --line: #ede8d8;
  --line-strong: #ede8d8;
  --text-1: #f2eee0;
  --text-2: #c9c2ad;
  --text-3: #8d876f;
  --success: #34d399;
  --danger: #ff6b7a;
  --warning: #fbbf24;
  --info: #7c9aff;
  --grad-brand-soft: linear-gradient(0deg, rgba(198, 241, 53, .18), rgba(198, 241, 53, .18));
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--text-1);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 15.5px;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { line-height: 1.18; font-weight: 700; letter-spacing: -0.02em; }
::selection { background: var(--acc-2); color: #191713; }

/* Scrollbar — chunky ink */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--ink); border: 3px solid var(--bg-1); border-radius: 8px; }

.num, .addr, .price, td.num { font-family: var(--font-num); font-feature-settings: "tnum"; direction: ltr; unicode-bidi: embed; }

/* ---------- Backdrop: flat paper + dot grid (no cosmos, no stars) ---------- */
.cosmos {
  position: fixed; inset: 0; z-index: -2;
  background-color: var(--paper);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
}
.cosmos::before, .cosmos::after { content: none; }
.cosmos .stars { display: none; }

/* ---------- Layout ---------- */
.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }
main#app { min-height: calc(100vh - var(--header-h)); padding-top: calc(var(--header-h) + 24px); }
.section { padding-block: 52px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-title {
  font-size: clamp(24px, 3.4vw, 38px); font-weight: 700; text-transform: uppercase;
  display: flex; align-items: center; gap: 14px; letter-spacing: -0.02em;
}
/* the little marker before titles: was a glowing bar — now an ink-stamped square */
.section-title .spark {
  width: 16px; height: 16px; flex: none; background: var(--acc-2);
  border: var(--bw) solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(8deg); border-radius: 3px;
}
.section-sub { color: var(--text-3); font-size: 13px; margin-top: 6px; text-transform: uppercase; letter-spacing: .12em; }

.grid { display: grid; gap: 24px; }
.grid-nft { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid-col { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 560px) { .grid-nft { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; } }

/* ---------- Header — solid paper bar, ink rule, boxy nav ---------- */
.site-header {
  position: fixed; top: 0; inset-inline: 0; z-index: 90; height: var(--header-h);
  background: var(--header-bg);
  border-bottom: var(--bw) solid var(--ink);
}
.site-header::after { content: none; }
.header-inner { display: flex; align-items: center; gap: 16px; height: 100%; }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 40px; height: 40px; }
.brand-name {
  font-weight: 700; font-size: 18px; color: var(--text-1); white-space: nowrap;
  text-transform: uppercase; letter-spacing: -0.01em;
  background: none; -webkit-background-clip: initial; background-clip: initial;
}
.brand-name small {
  display: block; font-size: 8.5px; font-weight: 600; letter-spacing: .34em;
  color: var(--text-3); -webkit-text-fill-color: currentColor; font-family: var(--font-num);
}

.main-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: 10px; }
.main-nav a {
  padding: 8px 13px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-2); border: var(--bw) solid transparent; border-radius: var(--radius-sm);
  transition: all .15s var(--ease-out);
}
.main-nav a:hover { color: var(--text-1); border-color: var(--ink); }
.main-nav a.active {
  color: #191713; background: var(--acc-2); border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.header-search { flex: 1; max-width: 360px; position: relative; }
.header-search input {
  width: 100%; padding: 9px 40px 9px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: var(--bw) solid var(--ink); color: var(--text-1);
  outline: none; transition: box-shadow .15s; font-size: 13.5px;
}
[dir="rtl"] .header-search input { padding: 9px 14px 9px 40px; }
.header-search input:focus { box-shadow: 3px 3px 0 var(--ink); }
.header-search .icon { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search-pop {
  position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 99;
  background: var(--surface); border: var(--bw) solid var(--ink);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-hard-lg);
}
.search-pop a { display: flex; gap: 10px; align-items: center; padding: 10px 14px; font-size: 13px; border-bottom: 1.5px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.search-pop a:last-child { border-bottom: none; }
.search-pop a:hover { background: var(--acc-2); color: #191713; }
.search-pop img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; border: 1.5px solid var(--ink); }

.header-actions { display: flex; align-items: center; gap: 9px; margin-inline-start: auto; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-sm);
  background: var(--surface); border: var(--bw) solid var(--ink); cursor: pointer; color: var(--text-1);
  transition: all .15s var(--ease-out); position: relative;
}
.icon-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.icon-btn .dot {
  position: absolute; top: -5px; inset-inline-end: -5px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--acc-3); border: 2px solid var(--ink);
}

/* burger + mobile nav */
.burger { display: none; }
.mobile-nav {
  position: fixed; top: calc(var(--header-h) + 8px); inset-inline: 14px; z-index: 89;
  background: var(--surface); border: var(--bw) solid var(--ink);
  border-radius: var(--radius-lg); padding: 12px; display: none;
  box-shadow: var(--shadow-hard-lg);
}
.mobile-nav a { display: block; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; text-transform: uppercase; font-size: 14px; }
.mobile-nav a:hover, .mobile-nav a.active { background: var(--acc-2); color: #191713; }
@media (max-width: 1080px) {
  .main-nav, .header-search { display: none; }
  .burger { display: grid; }
  .mobile-nav.open { display: block; animation: popIn .18s var(--ease-out); }
}

/* ---------- Buttons — chunky ink blocks ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-sm); cursor: pointer;
  font-weight: 700; font-size: 13.5px; text-transform: uppercase; letter-spacing: .04em;
  border: var(--bw) solid var(--ink); transition: all .15s var(--ease-out);
  white-space: nowrap; user-select: none; text-align: center;
  background: var(--surface); color: var(--text-1);
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translate(0, 0); box-shadow: none; }

.btn-primary { background: var(--acc); color: #fff; position: static; overflow: visible; }
.btn-primary::before { content: none; }
.btn-ghost { background: var(--surface); }
.btn-outline { background: var(--acc-2); color: #191713; background-image: none; }
.btn-danger { background: var(--acc-3); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--card-bg); border: var(--bw) solid var(--ink); border-radius: var(--radius-lg);
  position: relative; box-shadow: var(--shadow-hard); overflow: visible;
}
.card-pad { padding: 24px; }

/* NFT card — white block, ink frame, sticker price */
.nft-card {
  background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  border: var(--bw) solid var(--ink); position: relative; display: block;
  box-shadow: var(--shadow-hard);
  transition: transform .18s var(--ease-out), box-shadow .18s;
}
.nft-card::after { content: none; }
.nft-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }
.nft-media { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-2); border-bottom: var(--bw) solid var(--ink); }
.nft-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease-out); }
.nft-card:hover .nft-media img { transform: scale(1.04); }
.nft-media .chain-chip {
  position: absolute; top: 10px; inset-inline-start: 10px; padding: 3px 10px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; border-radius: 5px;
  background: var(--surface); color: var(--text-1); border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  backdrop-filter: none;
}
.nft-media .fav-btn {
  position: absolute; top: 9px; inset-inline-end: 9px; width: 32px; height: 32px; border-radius: 7px;
  display: grid; place-items: center; background: var(--surface); color: var(--text-1);
  border: 1.5px solid var(--ink); cursor: pointer; transition: all .15s; opacity: 0; transform: scale(.85);
  backdrop-filter: none;
}
.nft-card:hover .fav-btn { opacity: 1; transform: scale(1); }
.fav-btn.faved { color: var(--acc-3); opacity: 1; transform: scale(1); }
.nft-media .auction-timer {
  position: absolute; bottom: 10px; inset-inline: 10px; text-align: center; padding: 5px 10px;
  border-radius: 6px; font-size: 12px; font-weight: 700; font-family: var(--font-num);
  background: var(--acc-2); border: 1.5px solid var(--ink); color: #191713; box-shadow: 2px 2px 0 var(--ink);
  backdrop-filter: none;
}
.nft-body { padding: 14px 16px 16px; }
.nft-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nft-coll { font-size: 11.5px; color: var(--text-3); margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.nft-coll .verified { color: var(--teal); }
.nft-foot { display: flex; justify-content: space-between; align-items: end; margin-top: 12px; padding-top: 11px; border-top: 1.5px dashed color-mix(in srgb, var(--ink) 45%, transparent); }
.nft-price-label { font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; }
.nft-price {
  font-weight: 700; font-size: 15px; color: var(--acc);
  background: none; -webkit-background-clip: initial; background-clip: initial; -webkit-text-fill-color: currentColor;
}
html.dark .nft-price { color: var(--acc-2); }

/* Collection card */
.coll-card {
  border-radius: var(--radius-lg); overflow: hidden; border: var(--bw) solid var(--ink);
  background: var(--card-bg); cursor: pointer; display: block; box-shadow: var(--shadow-hard);
  transition: transform .18s var(--ease-out), box-shadow .18s;
}
.coll-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }
.coll-banner { height: 120px; background: var(--bg-2); position: relative; overflow: hidden; border-bottom: var(--bw) solid var(--ink); }
.coll-banner img { width: 100%; height: 100%; object-fit: cover; }
.coll-body { padding: 0 18px 18px; margin-top: -30px; position: relative; }
.coll-avatar { width: 62px; height: 62px; border-radius: 12px; border: var(--bw) solid var(--ink); object-fit: cover; background: var(--bg-3); box-shadow: 3px 3px 0 var(--ink); }
.coll-name { font-weight: 700; margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.coll-stats { display: flex; gap: 18px; margin-top: 12px; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.coll-stats b { display: block; color: var(--text-1); font-size: 14px; font-family: var(--font-num); }

/* ---------- Hero — editorial poster ---------- */
.hero { padding: 56px 0 34px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 44px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 6px;
  background: var(--surface); border: var(--bw) solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-1); transform: rotate(-1deg); animation: none;
}
.hero-kicker .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--acc-3); border: 1.5px solid var(--ink); animation: blink 1.6s steps(2) infinite; box-shadow: none; }
@keyframes blink { 50% { opacity: .25; } }
.hero h1 {
  font-size: clamp(34px, 5.6vw, 64px); font-weight: 700; margin-top: 22px; line-height: 1.06;
  text-transform: uppercase; letter-spacing: -0.03em; animation: none;
}
/* highlighted word: lime marker block instead of gradient text */
.hero h1 .grad {
  background: var(--acc-2); color: #191713; padding: 0 .18em; border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink); border: var(--bw) solid var(--ink); display: inline-block;
  transform: rotate(-1.2deg); filter: none;
  -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-fill-color: #191713;
}
.hero p.lead { color: var(--text-2); font-size: 16px; margin-top: 20px; max-width: 54ch; animation: none; }
.hero-cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; animation: none; }
.hero-stats { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; animation: none; }
.hero-stat {
  background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--radius-md);
  padding: 10px 18px; box-shadow: 3px 3px 0 var(--ink);
}
.hero-stat:nth-child(2) { transform: rotate(1.4deg); }
.hero-stat:nth-child(3) { transform: rotate(-1.2deg); }
.hero-stat b {
  font-size: clamp(18px, 2.4vw, 26px); font-family: var(--font-num); font-weight: 700; color: var(--text-1);
  background: none; -webkit-background-clip: initial; background-clip: initial; -webkit-text-fill-color: currentColor;
}
.hero-stat span { display: block; font-size: 10px; color: var(--text-3); margin-top: 1px; text-transform: uppercase; letter-spacing: .12em; }

/* Hero showcase — taped collage, not floating glow cards */
.hero-stage { position: relative; height: 440px; perspective: none; }
@media (max-width: 960px) { .hero-stage { height: 360px; margin-top: 14px; } }
.float-card {
  position: absolute; width: 235px; border-radius: var(--radius-md); overflow: visible;
  border: var(--bw) solid var(--ink); background: var(--card-bg);
  box-shadow: var(--shadow-hard-lg); animation: none;
}
.float-card img { aspect-ratio: 1; object-fit: cover; width: 100%; border-bottom: var(--bw) solid var(--ink); }
.float-card::before {  /* washi tape */
  content: ""; position: absolute; top: -13px; left: 50%; width: 84px; height: 26px;
  transform: translateX(-50%) rotate(-4deg);
  background: color-mix(in srgb, var(--acc-2) 82%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--ink) 55%, transparent); z-index: 2;
}
.float-card .fc-body { padding: 10px 13px; font-size: 12.5px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.float-card .fc-body .price { color: var(--acc); font-family: var(--font-num); }
html.dark .float-card .fc-body .price { color: var(--acc-2); }
.float-card.fc1 { top: 5%; inset-inline-start: 2%; z-index: 3; transform: rotate(-5deg); }
.float-card.fc2 { top: 0; inset-inline-end: 4%; width: 205px; z-index: 2; transform: rotate(4.5deg); opacity: 1; }
.float-card.fc2::before { background: color-mix(in srgb, var(--acc-3) 55%, transparent); }
.float-card.fc3 { bottom: 3%; inset-inline-start: 30%; width: 215px; z-index: 4; transform: rotate(1.5deg); }
.float-card.fc3::before { background: color-mix(in srgb, var(--gold) 65%, transparent); }
.hero-ring { display: none; }

/* ---------- Marquee — ink ticker strip ---------- */
.marquee {
  overflow: hidden; border-block: var(--bw) solid var(--ink);
  background: var(--ink); padding-block: 10px;
  -webkit-mask-image: none; mask-image: none;
}
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 36s linear infinite; align-items: center; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { to { transform: translateX(50%); } }
.marquee-item {
  display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 6px;
  background: var(--paper); border: 1.5px solid var(--paper); font-weight: 700; font-size: 12.5px;
  white-space: nowrap; color: var(--text-1); text-transform: uppercase; letter-spacing: .03em;
}
.marquee-item:hover { background: var(--acc-2); color: #191713; }
.marquee-item img { width: 30px; height: 30px; border-radius: 5px; object-fit: cover; border: 1.5px solid var(--ink); }
.marquee-item .mi-vol { font-size: 10.5px; color: var(--text-3); font-family: var(--font-num); }

/* ---------- Category pills — sticker chips ---------- */
.cat-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cat-pill {
  padding: 8px 18px; border-radius: 7px; background: var(--surface); border: var(--bw) solid var(--ink);
  font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--text-1);
  text-transform: uppercase; letter-spacing: .05em; transition: all .15s var(--ease-out);
}
.cat-pill:nth-child(3n) { transform: rotate(.8deg); }
.cat-pill:nth-child(3n+1) { transform: rotate(-.8deg); }
.cat-pill:hover { transform: translate(-2px, -2px) rotate(0); box-shadow: 3px 3px 0 var(--ink); color: var(--text-1); }
.cat-pill.active { background: var(--acc); color: #fff; box-shadow: 3px 3px 0 var(--ink); transform: rotate(0); border-color: var(--ink); }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 11.5px; font-weight: 700; margin-bottom: 7px; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; }
.input, .select, .textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); outline: none;
  background: var(--surface); border: var(--bw) solid var(--ink); color: var(--text-1);
  transition: box-shadow .15s; font-size: 14px;
}
.input:focus, .select:focus, .textarea:focus { box-shadow: 3px 3px 0 var(--ink); border-color: var(--ink); }
.textarea { min-height: 110px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23191713' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-inline-end: 34px; }
[dir="rtl"] .select { background-position: left 12px center; }
html.dark .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ede8d8' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.field-error { font-size: 12px; color: var(--danger); margin-top: 5px; }

/* Upload dropzone */
.dropzone {
  border: var(--bw) dashed var(--ink); border-radius: var(--radius-lg); padding: 36px 22px; text-align: center;
  cursor: pointer; transition: all .15s; background: var(--surface); position: relative; overflow: visible;
}
.dropzone:hover, .dropzone.drag { background: var(--grad-brand-soft); box-shadow: 4px 4px 0 var(--ink); border-style: solid; }
.dropzone .dz-icon { margin: 0 auto 12px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 12px; background: var(--acc-2); color: #191713; border: var(--bw) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.dropzone img.preview { max-height: 240px; margin: 0 auto; border-radius: var(--radius-md); border: var(--bw) solid var(--ink); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 5px;
  font-size: 11px; font-weight: 700; border: 1.5px solid var(--ink);
  text-transform: uppercase; letter-spacing: .05em;
}
.badge-violet { background: var(--acc-2); color: #191713; }
.badge-success { background: #b8f5cf; color: #14532d; }
.badge-danger { background: #ffd0d6; color: #881c26; }
.badge-warning { background: #ffe4b3; color: #7c3a05; }
.badge-info { background: #cfe0ff; color: #17358f; }
html.dark .badge-success { background: #14532d; color: #b8f5cf; }
html.dark .badge-danger { background: #881c26; color: #ffd0d6; }
html.dark .badge-warning { background: #7c3a05; color: #ffe4b3; }
html.dark .badge-info { background: #17358f; color: #cfe0ff; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: var(--bw) solid var(--ink); background: var(--card-bg); box-shadow: var(--shadow-hard); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th {
  text-align: start; font-size: 10.5px; color: var(--paper); font-weight: 700; padding: 12px 18px;
  background: var(--ink); border-bottom: none; text-transform: uppercase; letter-spacing: .1em;
}
.tbl td { padding: 13px 18px; border-bottom: 1.5px solid color-mix(in srgb, var(--ink) 22%, transparent); font-size: 14px; vertical-align: middle; }
.tbl tbody tr { transition: background .12s; cursor: pointer; }
.tbl tbody tr:hover { background: var(--grad-brand-soft); }
.tbl tbody tr:last-child td { border-bottom: none; }
.rank-badge {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; font-family: var(--font-num);
  font-weight: 700; font-size: 13px; background: var(--surface); color: var(--text-1); border: 1.5px solid var(--ink);
}
.rank-badge.top1 { background: var(--gold); color: #191713; box-shadow: 2px 2px 0 var(--ink); }
.rank-badge.top2 { background: #d9d9d9; color: #191713; box-shadow: 2px 2px 0 var(--ink); }
.rank-badge.top3 { background: #e8a06a; color: #191713; box-shadow: 2px 2px 0 var(--ink); }
.cell-entity { display: flex; align-items: center; gap: 12px; }
.cell-entity img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--bg-3); border: 1.5px solid var(--ink); }
.delta-up { color: var(--success); font-family: var(--font-num); }
.delta-down { color: var(--danger); font-family: var(--font-num); }

/* ---------- Tabs — folder tabs ---------- */
.tabs { display: flex; gap: 6px; border-bottom: var(--bw) solid var(--ink); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; padding-inline: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 9px 16px; font-size: 12.5px; font-weight: 700; color: var(--text-3); cursor: pointer;
  border: var(--bw) solid transparent; border-bottom: none; background: none; position: relative; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .05em; border-radius: 8px 8px 0 0;
}
.tab:hover { color: var(--text-1); }
.tab.active { color: var(--text-1); background: var(--surface); border-color: var(--ink); }
.tab.active::after { content: ""; position: absolute; bottom: calc(-1 * var(--bw)); inset-inline: 0; height: var(--bw); background: var(--surface); box-shadow: none; }
.tab .count { font-size: 10.5px; background: var(--acc-2); color: #191713; border: 1.5px solid var(--ink); border-radius: 5px; padding: 0 6px; margin-inline-start: 6px; font-family: var(--font-num); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background: color-mix(in srgb, #191713 40%, transparent); backdrop-filter: none; animation: fadeIn .15s ease;
}
.modal {
  width: min(520px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--card-bg); border: var(--bw) solid var(--ink); border-radius: var(--radius-xl);
  padding: 28px; position: relative; animation: popIn .2s var(--ease-out);
  box-shadow: 10px 10px 0 var(--ink);
}
.modal.wide { width: min(760px, 100%); }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes fadeIn { from { opacity: 0; } }
.modal-title { font-size: 19px; margin-bottom: 18px; padding-inline-end: 40px; text-transform: uppercase; }
.modal-close { position: absolute; top: 16px; inset-inline-end: 16px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 48px)); }
.toast {
  padding: 13px 17px; border-radius: var(--radius-md); font-size: 13.5px; font-weight: 600;
  background: var(--surface); backdrop-filter: none; border: var(--bw) solid var(--ink);
  box-shadow: var(--shadow-hard); display: flex; gap: 10px; align-items: start;
  animation: popIn .18s var(--ease-out);
}
.toast.leaving { transition: all .25s; opacity: 0; transform: translateY(14px); }
.toast-success { background: #d7f8e4; color: #14532d; border-color: var(--ink); }
.toast-error { background: #ffdde1; color: #881c26; border-color: var(--ink); }
html.dark .toast-success { background: #14532d; color: #d7f8e4; }
html.dark .toast-error { background: #881c26; color: #ffdde1; }
.toast .t-ic, .toast-success .t-ic, .toast-error .t-ic, .toast-info .t-ic { color: currentColor; }

/* ---------- Skeleton ---------- */
.skel { border-radius: var(--radius-sm); background: linear-gradient(100deg, var(--bg-2) 40%, var(--bg-1) 50%, var(--bg-2) 60%); background-size: 300% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -70% 0; } }
.skel-card { border-radius: var(--radius-lg); overflow: hidden; border: var(--bw) solid color-mix(in srgb, var(--ink) 35%, transparent); }
.skel-card .skel-img { aspect-ratio: 1; border-radius: 0; }
.skel-card .skel-line { height: 14px; margin: 14px; }
.skel-card .skel-line.short { width: 50%; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 64px 20px; color: var(--text-3); }
.empty .e-icon {
  width: 88px; height: 88px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 20px;
  background: var(--surface); color: var(--text-2); border: var(--bw) solid var(--ink);
  box-shadow: var(--shadow-hard); transform: rotate(-3deg);
}
.empty h3 { color: var(--text-2); font-size: 17px; margin-bottom: 6px; text-transform: uppercase; }

/* ---------- NFT detail ---------- */
.nftd-grid { display: grid; grid-template-columns: minmax(0, 480px) 1fr; gap: 38px; align-items: start; }
@media (max-width: 900px) { .nftd-grid { grid-template-columns: 1fr; } }
.nftd-media {
  border-radius: var(--radius-xl); overflow: hidden; border: var(--bw) solid var(--ink);
  position: sticky; top: calc(var(--header-h) + 20px); box-shadow: 10px 10px 0 var(--ink);
}
@media (max-width: 900px) { .nftd-media { position: static; } }
.nftd-media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.price-box {
  border-radius: var(--radius-lg); padding: 22px; margin-top: 20px;
  background: var(--acc-2); border: var(--bw) solid var(--ink); position: relative; overflow: visible;
  box-shadow: var(--shadow-hard); color: #191713;
}
.price-box::before { content: none; }
.price-box .pb-label { font-size: 10.5px; color: #3d3a2b; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.price-box .pb-value {
  font-size: 32px; font-weight: 700; font-family: var(--font-num); color: #191713;
  background: none; -webkit-background-clip: initial; background-clip: initial; -webkit-text-fill-color: currentColor;
}
.trait-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.trait {
  padding: 11px 13px; border-radius: var(--radius-md); text-align: center;
  background: var(--surface); border: 1.5px solid var(--ink);
}
.trait .tr-type { font-size: 9.5px; color: var(--acc); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
html.dark .trait .tr-type { color: var(--acc-2); }
.trait .tr-val { font-weight: 700; font-size: 13.5px; margin-top: 3px; }

/* countdown */
.countdown { display: flex; gap: 10px; }
.cd-cell { min-width: 64px; text-align: center; padding: 9px 8px; border-radius: var(--radius-md); background: var(--surface); border: var(--bw) solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.cd-cell b { font-size: 23px; font-family: var(--font-num); display: block; }
.cd-cell span { font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Profile ---------- */
.profile-banner { height: 210px; border-radius: var(--radius-xl); background: var(--bg-2); overflow: hidden; border: var(--bw) solid var(--ink); position: relative; box-shadow: var(--shadow-hard); }
.profile-banner img { width: 100%; height: 100%; object-fit: cover; }
.profile-head { display: flex; gap: 20px; align-items: end; margin-top: -48px; padding-inline: 28px; position: relative; flex-wrap: wrap; }
.profile-avatar { width: 104px; height: 104px; border-radius: 18px; border: var(--bw) solid var(--ink); object-fit: cover; background: var(--bg-3); box-shadow: 4px 4px 0 var(--ink); }

/* ---------- Dashboard shell ---------- */
.dash { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: start; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.dash-side {
  border-radius: var(--radius-lg); border: var(--bw) solid var(--ink); background: var(--card-bg);
  padding: 12px; position: sticky; top: calc(var(--header-h) + 20px); box-shadow: var(--shadow-hard);
}
@media (max-width: 900px) { .dash-side { position: static; display: flex; overflow-x: auto; gap: 6px; } }
.dash-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 700; color: var(--text-2); cursor: pointer; transition: all .12s;
  white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; border: 1.5px solid transparent;
}
.dash-link:hover { color: var(--text-1); border-color: var(--ink); background: none; }
.dash-link.active { color: #191713; background: var(--acc-2); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.dash-link svg { flex-shrink: 0; }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat-card { padding: 18px; border-radius: var(--radius-lg); background: var(--card-bg); border: var(--bw) solid var(--ink); position: relative; overflow: visible; box-shadow: var(--shadow-hard); }
.stat-card::after { content: none; }
.stat-card .sc-label { font-size: 10px; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.stat-card .sc-value { font-size: 26px; font-weight: 700; font-family: var(--font-num); margin-top: 6px; }
.stat-card .sc-ic {
  position: absolute; top: 14px; inset-inline-end: 14px; color: #191713; background: var(--acc-2);
  border: 1.5px solid var(--ink); border-radius: 8px; padding: 6px; box-shadow: 2px 2px 0 var(--ink); opacity: 1;
}

/* ---------- Blog ---------- */
.post-card {
  border-radius: var(--radius-lg); overflow: hidden; border: var(--bw) solid var(--ink); background: var(--card-bg);
  cursor: pointer; display: flex; flex-direction: column; box-shadow: var(--shadow-hard);
  transition: transform .18s var(--ease-out), box-shadow .18s;
}
.post-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }
.post-cover { aspect-ratio: 16/9; background: var(--bg-2); overflow: hidden; border-bottom: var(--bw) solid var(--ink); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-cover img { transform: scale(1.04); }
.post-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; gap: 9px; }
.post-title { font-size: 16px; font-weight: 700; }
.post-excerpt { font-size: 13px; color: var(--text-2); flex: 1; }
.post-meta { font-size: 11px; color: var(--text-3); display: flex; gap: 12px; text-transform: uppercase; letter-spacing: .06em; }

.prose { max-width: 760px; margin-inline: auto; font-size: 16px; line-height: 1.9; color: var(--text-1); }
.prose h2, .prose h3 { margin: 1.6em 0 .6em; }
.prose h2 { padding-inline-start: 14px; border-inline-start: 6px solid var(--acc-2); border-radius: 0; }
.prose p { margin-block: .9em; color: var(--text-2); }
.prose img { border-radius: var(--radius-lg); margin-block: 1.4em; border: var(--bw) solid var(--ink); box-shadow: var(--shadow-hard); }
.prose a { color: var(--acc); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
html.dark .prose a { color: var(--acc-2); }
.prose blockquote { border: 1.5px solid var(--ink); border-inline-start: 6px solid var(--acc); margin-inline: 0; padding: 8px 20px; background: var(--surface); border-radius: var(--radius-sm); }
.prose ul, .prose ol { padding-inline-start: 1.4em; color: var(--text-2); }
.prose code { background: var(--bg-2); border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent); padding: 2px 8px; border-radius: 5px; font-size: .88em; font-family: var(--font-num); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h) - 60px); display: grid; place-items: center; padding-block: 40px; }
.auth-card {
  width: min(430px, 100%); padding: 34px 30px; border-radius: var(--radius-xl);
  background: var(--card-bg); border: var(--bw) solid var(--ink); position: relative; overflow: visible;
  box-shadow: 9px 9px 0 var(--ink);
}
.auth-card::before {  /* washi tape header, not a gradient strip */
  content: ""; position: absolute; top: -13px; left: 50%; width: 96px; height: 26px;
  transform: translateX(-50%) rotate(-3deg);
  background: color-mix(in srgb, var(--acc-2) 85%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--ink) 55%, transparent);
}
.auth-divider { display: flex; align-items: center; gap: 14px; color: var(--text-3); font-size: 11px; margin-block: 20px; text-transform: uppercase; letter-spacing: .12em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 2px; background: color-mix(in srgb, var(--ink) 30%, transparent); }

/* ---------- Footer — ink slab ---------- */
.site-footer { margin-top: 90px; border-top: var(--bw) solid var(--ink); background: var(--ink); color: var(--paper); position: relative; }
.site-footer::before { content: none; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; padding: 50px 0 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand-name { color: var(--paper); }
.site-footer .brand-name small { color: color-mix(in srgb, var(--paper) 55%, transparent); }
.footer-col h4 { font-size: 12px; margin-bottom: 16px; color: var(--acc-2); text-transform: uppercase; letter-spacing: .14em; }
.footer-col a { display: block; padding-block: 5px; font-size: 13.5px; color: color-mix(in srgb, var(--paper) 72%, transparent); transition: all .15s; }
.footer-col a:hover { color: var(--acc-2); transform: translateX(4px); }
[dir="rtl"] .footer-col a:hover { transform: translateX(-4px); }
.footer-about { font-size: 13px; color: color-mix(in srgb, var(--paper) 62%, transparent); line-height: 1.9; margin-top: 12px; max-width: 36ch; }
.footer-bottom {
  border-top: 1.5px solid color-mix(in srgb, var(--paper) 25%, transparent); padding: 18px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: color-mix(in srgb, var(--paper) 55%, transparent);
}
.socials { display: flex; gap: 9px; }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 34px; }
.pager button {
  min-width: 40px; height: 40px; padding-inline: 12px; border-radius: var(--radius-sm); border: var(--bw) solid var(--ink);
  background: var(--surface); color: var(--text-1); cursor: pointer; font-weight: 700; font-family: var(--font-num); transition: all .12s;
}
.pager button:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); color: var(--text-1); }
.pager button.cur { background: var(--acc); color: #fff; box-shadow: 3px 3px 0 var(--ink); border-color: var(--ink); }
.pager button:disabled { opacity: .35; cursor: default; }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 9px); inset-inline-end: 0; z-index: 120; min-width: 220px;
  background: var(--surface); backdrop-filter: none; border: var(--bw) solid var(--ink);
  border-radius: var(--radius-md); padding: 7px; box-shadow: var(--shadow-hard-lg);
  animation: popIn .15s var(--ease-out);
}
.dropdown-menu a, .dropdown-menu button.dd-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--radius-xs);
  font-size: 13px; font-weight: 600; color: var(--text-1); background: none; border: none; cursor: pointer; text-align: start;
}
.dropdown-menu a:hover, .dropdown-menu button.dd-item:hover { background: var(--acc-2); color: #191713; }
.dd-sep { height: 1.5px; background: color-mix(in srgb, var(--ink) 30%, transparent); margin: 6px 4px; }

/* Notifications */
.notif-item { display: flex; gap: 12px; padding: 11px 12px; border-radius: var(--radius-sm); font-size: 13px; }
.notif-item.unread { background: var(--grad-brand-soft); border: 1.5px dashed var(--ink); }
.notif-item .n-time { font-size: 10.5px; color: var(--text-3); }

/* ---------- Explore filters ---------- */
.explore-layout { display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; }
@media (max-width: 900px) { .explore-layout { grid-template-columns: 1fr; } }
.filter-panel { position: sticky; top: calc(var(--header-h) + 20px); border-radius: var(--radius-lg); border: var(--bw) solid var(--ink); background: var(--card-bg); padding: 20px; box-shadow: var(--shadow-hard); }
@media (max-width: 900px) { .filter-panel { position: static; } }
.filter-group { padding-block: 15px; border-bottom: 1.5px dashed color-mix(in srgb, var(--ink) 40%, transparent); }
.filter-group:last-child { border-bottom: none; }
.filter-group h5 { font-size: 11px; margin-bottom: 12px; display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: .12em; }
.check-row { display: flex; align-items: center; gap: 9px; padding-block: 5px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check-row input { accent-color: var(--acc); width: 16px; height: 16px; }

.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }

/* ---------- Activity feed ---------- */
.act-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-md); transition: background .12s; }
.act-row:hover { background: var(--surface-2); }
.act-ic {
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: var(--acc-2); color: #191713; flex-shrink: 0; border: 1.5px solid var(--ink);
}
.act-main { flex: 1; font-size: 13.5px; }
.act-time { font-size: 11px; color: var(--text-3); font-family: var(--font-num); }

/* ---------- Admin ---------- */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .admin-shell { grid-template-columns: 1fr; } }

/* ---------- Helpers ---------- */
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 12px; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.muted { color: var(--text-3); font-size: 13px; }
.small { font-size: 12px; }
/* legacy "gradient text" -> lime-marker highlight (no gradients anywhere) */
.grad-text {
  background: var(--acc-2); color: #191713; -webkit-text-fill-color: #191713;
  -webkit-background-clip: border-box; background-clip: border-box;
  padding: 0 .2em; border-radius: 5px; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.avatar { border-radius: 10px; object-fit: cover; background: var(--bg-3); border: 1.5px solid var(--ink); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clickable { cursor: pointer; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.divider { height: var(--bw); background: var(--ink); margin-block: 20px; opacity: .9; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.page-enter { animation: fadeUp .3s var(--ease-out); }

/* Copy chip */
.copy-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 6px;
  background: var(--surface); border: 1.5px solid var(--ink); font-size: 12px; cursor: pointer; font-family: var(--font-num);
  transition: all .12s;
}
.copy-chip:hover { box-shadow: 2px 2px 0 var(--ink); transform: translate(-1px, -1px); border-color: var(--ink); }

/* Loading — flipping ink square (no orbs, no glow) */
.route-loader { display: grid; place-items: center; padding: 110px 0; }
.orb {
  width: 40px; height: 40px; border-radius: 9px; position: relative;
  background: var(--acc-2); border: var(--bw) solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  animation: loaderFlip 1s var(--ease-spring) infinite;
}
.orb::before, .orb::after { content: none; }
@keyframes loaderFlip {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg) translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
