:root {
  --bg: #050506;
  --bg-2: #0b0b0d;
  --bg-3: #111114;
  --ink: #f4efe4;
  --muted: #9a9386;
  --line: rgba(232, 200, 114, 0.16);
  --line-strong: rgba(232, 200, 114, 0.38);
  --gold: #e8c872;
  --gold-2: #f6e3a1;
  --steel: #9aa3ad;
  --cobalt: #3d7cff;
  --violet: #b46cff;
  --ok: #6ee7b7;
  --warn: #f5c16c;
  --err: #ff6b6b;
  --test: #ff8a3d;
  --display: "Unbounded", "Syne", system-ui, sans-serif;
  --sans: "Syne", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 10px;
  --max: 1180px;
  --comune: #9aa3ad;
  --rara: #3d7cff;
  --epica: #b46cff;
  --leggendaria: #e8c872;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  line-height: 1.55;
  letter-spacing: 0.01em;
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.035em; line-height: 1.05; margin: 0 0 0.45em; }

.void {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(232, 200, 114, 0.11), transparent 55%),
    radial-gradient(700px 480px at 108% 8%, rgba(61, 124, 255, 0.07), transparent 50%),
    radial-gradient(640px 420px at 70% 110%, rgba(180, 108, 255, 0.06), transparent 55%),
    linear-gradient(180deg, #070708 0%, #050506 40%, #08070a 100%);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.22;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

.launch-banner {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 20px; background: #0a0907; border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--muted); text-align: center;
}
.launch-banner[hidden] { display: none; }
.offer-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 1px solid var(--gold);
  color: var(--gold-2); font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; background: rgba(232, 200, 114, 0.08);
}
.offer-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }

.topnav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--max); margin: 0 auto; padding: 18px 22px 10px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.wordmark {
  font-family: var(--display); font-weight: 800; letter-spacing: 0.18em;
  font-size: 15px; color: var(--ink);
}
.wordmark span { color: var(--gold-2); }
.mark { display: grid; place-items: center; }

.desk-nav { display: none; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.desk-nav a, .desk-nav button.linkish {
  color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: 8px 11px; font-size: 13px; letter-spacing: 0.04em;
}
.desk-nav a:hover, .desk-nav button.linkish:hover { color: var(--ink); }
.desk-nav a.on { color: var(--gold-2); box-shadow: inset 0 -1px 0 var(--gold); }

.app-main { max-width: var(--max); margin: 0 auto; padding: 8px 22px 120px; min-height: 62vh; }
.app-main.is-entering { animation: pageIn 0.45s ease both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.site-foot {
  max-width: var(--max); margin: 0 auto; padding: 28px 22px 110px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px;
}
.foot-brand { max-width: 420px; }
.foot-brand p { margin: 8px 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--gold-2); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(5, 5, 6, 0.92); border-top: 1px solid var(--line);
  backdrop-filter: blur(16px); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  text-align: center; padding: 11px 4px 10px; color: var(--muted);
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
}
.tabbar a.on { color: var(--gold-2); }

/* Buttons */
.btn, button.btn {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 2px;
  border: 1px solid var(--gold); background: #16120a; color: var(--gold-2);
  font-family: var(--display); font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; font-size: 12px; cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.btn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120px 80px at var(--mx) var(--my), rgba(255, 244, 194, 0.22), transparent 60%);
  opacity: 0; transition: opacity 0.2s;
}
.btn:hover { transform: translateY(-1px); background: #241c0e; color: #fff8e4; }
.btn:hover::after { opacity: 1; }
.btn.primary { background: linear-gradient(180deg, #2a2212, #161109); box-shadow: 0 0 0 1px rgba(232, 200, 114, 0.25), 0 10px 30px rgba(232, 200, 114, 0.08); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn.danger { border-color: var(--err); color: #ffd0d0; background: #1a0b0b; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Forms */
.field { display: grid; gap: 6px; margin: 0 0 14px; }
.field span, label { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
input, select, textarea {
  width: 100%; background: #0c0c0e; border: 1px solid var(--line); border-radius: 2px;
  padding: 12px 12px; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 200, 114, 0.12); }
.hint, .form-err, .ok { font-size: 13.5px; }
.hint { color: var(--muted); }
.form-err { color: var(--err); }
.ok { color: var(--ok); }

.panel {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 2px;
  padding: 22px; margin: 0 0 18px;
}
.panel h2 { font-size: 1.35rem; }

/* Pills / tiers */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border: 1px solid currentColor; border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.pill-comune { color: var(--comune); background: rgba(154, 163, 173, 0.08); }
.pill-rara { color: var(--rara); background: rgba(61, 124, 255, 0.1); }
.pill-epica { color: var(--epica); background: rgba(180, 108, 255, 0.1); }
.pill-leggendaria { color: var(--leggendaria); background: rgba(232, 200, 114, 0.1); }
.pill-mitica {
  color: #fff;
  background: linear-gradient(90deg, #ff4d6d, #ffb020, #46e0a0, #3d7cff, #b46cff);
  background-size: 200% 100%; animation: prism 4s linear infinite;
  border-color: transparent;
}
.pill-test { color: var(--test); border-color: var(--test); }
.pill-raw { color: #c9bba4; }
@keyframes prism { to { background-position: 200% 0; } }

.serial {
  font-family: var(--mono); letter-spacing: 0.14em; color: var(--gold-2);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

/* Hero */
.hero {
  display: grid; gap: 36px; align-items: center;
  padding: 18px 0 28px;
}
.hero-copy { max-width: 620px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 16px;
}
.kicker::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  font-weight: 800; margin: 0 0 16px;
}
.hero h1 em { font-style: normal; color: var(--gold-2); }
.lede { color: #cfc6b4; font-size: 1.08rem; max-width: 38ch; margin: 0 0 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.ticker-wrap {
  overflow: hidden; border-block: 1px solid var(--line);
  margin: 8px -22px 28px; background: #080808;
}
.ticker {
  display: flex; gap: 36px; width: max-content;
  animation: ticker 32s linear infinite;
  padding: 10px 0; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.ticker b { color: var(--ink); font-weight: 500; }
.ticker .t-comune { color: var(--comune); }
.ticker .t-rara { color: var(--rara); }
.ticker .t-epica { color: var(--epica); }
.ticker .t-leggendaria { color: var(--leggendaria); }
.ticker .t-mitica {
  background: linear-gradient(90deg, #ff4d6d, #ffb020, #46e0a0, #3d7cff, #b46cff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes ticker { to { transform: translateX(-50%); } }

.split { display: grid; gap: 14px; }
.choice {
  display: grid; gap: 8px; padding: 22px; border: 1px solid var(--line);
  background: var(--bg-2); color: inherit; border-radius: 2px;
  position: relative; overflow: hidden;
}
.choice:hover { border-color: var(--line-strong); color: inherit; }
.choice h3 { font-size: 1.25rem; margin: 0; }
.choice p { margin: 0; color: var(--muted); font-size: 14.5px; }
.choice .go { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.notes { color: var(--muted); font-size: 13.5px; }
.notes h2 { color: var(--ink); font-size: 1.1rem; margin-top: 22px; }

/* 3D slab */
.slab-stage { perspective: 1200px; display: grid; place-items: center; }
.slab-3d {
  --rx: 10deg; --ry: -16deg; --hx: 50%; --hy: 36%;
  width: min(280px, 72vw); aspect-ratio: 63 / 96;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out;
  position: relative;
}
.slab-3d.is-live { transition: transform 0.08s linear; }
.slab-acrylic {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.16), rgba(255,255,255,0.03) 32%, rgba(12,12,14,0.55));
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,0.08);
  transform: translateZ(12px);
  padding: 10px 10px 0;
  display: flex; flex-direction: column;
}
.slab-window {
  position: relative; flex: 1; overflow: hidden;
  background: #120e0c; border: 1px solid rgba(255,255,255,0.08);
}
.slab-art {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  background-image:
    radial-gradient(120% 80% at 50% 20%, rgba(232,200,114,0.35), transparent 50%),
    linear-gradient(160deg, #3a140c, #12080c 55%, #0a0a12);
}
.slab-placeholder, .demo-thumb {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 420'><defs><linearGradient id='bg' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='%23421810'/><stop offset='.55' stop-color='%2312080c'/><stop offset='1' stop-color='%230c1018'/></linearGradient><radialGradient id='sun' cx='50%25' cy='28%25' r='42%25'><stop offset='0' stop-color='%23f6d48a'/><stop offset='1' stop-color='%23f6d48a' stop-opacity='0'/></radialGradient></defs><rect width='300' height='420' fill='url(%23bg)'/><rect x='16' y='16' width='268' height='388' fill='none' stroke='%23e8c872' stroke-width='1.4' opacity='.75'/><circle cx='150' cy='118' r='70' fill='url(%23sun)' opacity='.55'/><path d='M150 86 L208 150 L150 262 L92 150 Z' fill='%231a1208' stroke='%23e8c872' stroke-width='2' stroke-linejoin='round'/><path d='M150 86 V262 M92 150 H208 M118 150 L150 86 L182 150' fill='none' stroke='%23f8e7b4' stroke-width='1'/><path d='M128 122 L150 158 H110 Z' fill='%23fff4c2' opacity='.8'/><text x='150' y='332' text-anchor='middle' fill='%23f8e7b4' font-family='Unbounded,sans-serif' font-size='15' letter-spacing='7'>GEMINT</text></svg>");
  background-size: cover;
  background-position: center;
}
.slab-foil {
  position: absolute; inset: -30%; pointer-events: none; mix-blend-mode: overlay; opacity: 0.58;
  background:
    conic-gradient(from 210deg at var(--hx) var(--hy),
      rgba(255,80,120,0) 0deg,
      rgba(255,90,140,0.7) 50deg,
      rgba(255,220,120,0.85) 110deg,
      rgba(120,255,210,0.65) 170deg,
      rgba(90,170,255,0.8) 230deg,
      rgba(210,120,255,0.7) 290deg,
      rgba(255,80,120,0) 360deg);
  filter: blur(10px) saturate(1.35);
}
.slab-glass {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.02) 28%, transparent 42%, rgba(255,255,255,0.08) 70%, transparent 82%);
}
.slab-label {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 12px 10px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: #1a1208;
  background: linear-gradient(180deg, #efe4c4, #d8c48a);
  margin: 0 -10px;
}
.lab-left { display: grid; gap: 3px; min-width: 0; }
.lab-grader { font-weight: 700; letter-spacing: 0.14em; }
.lab-grade { font-size: 22px; font-weight: 700; letter-spacing: 0; line-height: 1; }
.lab-serial { opacity: 0.8; font-size: 10px; letter-spacing: 0.06em; }

.slab-3d[data-tier="comune"] { filter: drop-shadow(0 0 16px rgba(154,163,173,0.25)); }
.slab-3d[data-tier="rara"] { filter: drop-shadow(0 0 18px rgba(61,124,255,0.32)); }
.slab-3d[data-tier="epica"] { filter: drop-shadow(0 0 20px rgba(180,108,255,0.35)); }
.slab-3d[data-tier="leggendaria"] { filter: drop-shadow(0 0 22px rgba(232,200,114,0.4)); }
.slab-3d[data-tier="mitica"] { filter: drop-shadow(0 0 24px rgba(255,140,80,0.45)); }

/* Hero floating motion */
.hero-slab { justify-self: center; }
.hero-slab .slab-3d { animation: floatSlab 7s ease-in-out infinite; }
@keyframes floatSlab {
  0%, 100% { transform: rotateX(10deg) rotateY(-16deg) translateY(0); }
  50% { transform: rotateX(8deg) rotateY(-12deg) translateY(-10px); }
}

/* Market / collection */
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 8px 0 18px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 52ch; }

.chip-row { display: flex; gap: 8px; overflow: auto; padding-bottom: 12px; margin: 0 0 8px; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: transparent;
  color: var(--muted); padding: 6px 12px; font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; cursor: default;
}
.chip.on { color: var(--ink); border-color: var(--gold); }

.slab-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 22px; }
.slab-tile { color: inherit; display: grid; gap: 12px; }
.slab-tile:hover { color: inherit; }
.slab-tile .slab-3d { width: 100%; --rx: 6deg; --ry: -8deg; }
.tile-meta { display: grid; gap: 4px; }
.tile-meta strong { font-family: var(--display); font-size: 1rem; letter-spacing: -0.03em; }
.tile-meta span { color: var(--muted); font-size: 13px; }

.trade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.trade-card {
  display: grid; grid-template-columns: 86px 1fr; gap: 12px;
  padding: 12px; border: 1px solid var(--line); background: var(--bg-2);
  color: inherit; align-items: center;
}
.trade-card:hover { border-color: var(--line-strong); color: inherit; }
.trade-thumb { aspect-ratio: 5/7; background-color: #141416; background-size: cover; background-position: center; border: 1px solid var(--line); }
.serial, .lab-serial { font-family: "JetBrains Mono", "DejaVu Sans Mono", "DejaVu Sans", ui-monospace, monospace; }
.trade-card h3 { font-size: 1rem; margin: 0 0 4px; }
.trade-card .price { font-family: var(--display); color: var(--gold-2); font-size: 1.15rem; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 28px 0; }

.lookbook { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; margin-top: 20px; }
.lookbook figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }

/* Card detail */
.card-hero {
  display: grid; gap: 28px; align-items: start;
  margin: 10px 0 24px;
}
.facts { display: grid; gap: 10px; }
.facts p { margin: 0; color: var(--muted); }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0 0 10px; font-size: 1.05rem; }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.photos img { width: 100%; border: 1px solid var(--line); }

/* Catalog */
.cat-box { margin-bottom: 10px; }
.cat-results { border: 1px solid var(--line); background: #0c0c0e; max-height: 240px; overflow: auto; }
.cat-hit { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; cursor: pointer; }
.cat-hit:hover { background: #151518; }
.preview { width: 72px; height: 100px; object-fit: cover; border: 1px solid var(--line); margin: 6px 8px 0 0; }

/* Admin */
.admin-list { display: grid; gap: 12px; }
.admin-item { border: 1px solid var(--line); padding: 14px; background: var(--bg-2); }

/* Auth */
.auth-wrap { max-width: 440px; margin: 24px auto; }

/* Reveal (restyle of existing phases) */
.reveal-root { min-height: 72vh; display: grid; place-items: center; padding: 12px 0 40px; }
.stage { width: min(420px, 92vw); text-align: center; }
.scene { position: relative; height: 420px; display: grid; place-items: center; }
.hint-hold, .scene .hint { color: var(--muted); font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; font-size: 12px; }
.card-back, .card-front {
  width: 210px; height: 300px; border-radius: 2px;
  box-shadow: var(--shadow); position: relative;
}
.card-back {
  background:
    repeating-linear-gradient(45deg, rgba(232,200,114,0.08) 0 2px, transparent 2px 8px),
    linear-gradient(160deg, #1a1610, #0a0a0c);
  border: 1px solid var(--gold);
}
.card-front { background: #120e0c center/cover; border: 1px solid rgba(255,255,255,0.2); }
.progress {
  height: 3px; background: #1c1c1e; margin: 18px auto 0; width: 210px; overflow: hidden;
}
.progress > i { display: block; height: 100%; width: 0; background: var(--gold); }
.burst { position: absolute; inset: 0; pointer-events: none; }
.burst i {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); left: 50%; top: 50%;
  animation: burst 900ms ease-out forwards;
}
@keyframes burst {
  to { transform: translate(var(--x), var(--y)); opacity: 0; }
}
.result { display: grid; gap: 8px; justify-items: center; }
.tier-name { font-family: var(--display); font-size: clamp(2.4rem, 8vw, 4.2rem); letter-spacing: -0.04em; }
.tier-comune { color: var(--comune); text-shadow: 0 0 24px rgba(154,163,173,0.35); }
.tier-rara { color: var(--rara); text-shadow: 0 0 24px rgba(61,124,255,0.4); }
.tier-epica { color: var(--epica); text-shadow: 0 0 24px rgba(180,108,255,0.45); }
.tier-leggendaria { color: var(--leggendaria); text-shadow: 0 0 28px rgba(232,200,114,0.5); }
.tier-mitica {
  background: linear-gradient(90deg, #ff4d6d, #ffb020, #46e0a0, #3d7cff, #b46cff);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: prism 3s linear infinite;
}
.serial-lg { font-family: var(--mono); font-size: 1.15rem; letter-spacing: 0.18em; color: var(--gold-2); }
.shake { animation: shake 0.45s ease; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px) rotate(-1deg); }
  20%, 80% { transform: translateX(3px) rotate(1deg); }
  30%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* Skeletons */
.skel { position: relative; overflow: hidden; background: #121214; border: 1px solid var(--line); min-height: 180px; }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: shine 1.2s infinite;
}
@keyframes shine { to { transform: translateX(100%); } }

@media (min-width: 860px) {
  .desk-nav { display: flex; }
  .tabbar { display: none; }
  .site-foot { padding-bottom: 40px; }
  .hero { grid-template-columns: 1.1fr 0.9fr; min-height: 58vh; }
  .split { grid-template-columns: 1fr 1fr; }
  .card-hero { grid-template-columns: 320px 1fr; }
  .hero-slab .slab-3d { width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important; transition: none !important;
  }
  .slab-3d, .hero-slab .slab-3d { transform: none; }
  .ticker { animation: none; }
}

/* Compat: markup esistente */
.dim, .lead { color: var(--muted); }
.error { color: var(--err); }
.notice { border: 1px solid var(--line); padding: 12px 14px; color: var(--muted); background: #0c0c0e; margin: 12px 0; }
.grid-2 { display: grid; gap: 12px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.search-list, .cat-results { border: 1px solid var(--line); background: #0c0c0e; max-height: 240px; overflow: auto; }
.search-item, .cat-hit {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  border-bottom: 1px solid var(--line); padding: 10px 12px; cursor: pointer; color: inherit;
}
.search-item:hover, .cat-hit:hover { background: #151518; }
.photo-slot { display: grid; gap: 8px; padding: 14px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; }
.photo-slot img { max-height: 140px; width: auto; }
.challenge {
  font-family: var(--mono); font-size: 1.5rem; letter-spacing: 0.32em;
  padding: 16px; border: 1px solid var(--gold); text-align: center;
  background: #120e08; color: var(--gold-2); margin-bottom: 14px;
}
.list { display: grid; gap: 10px; }
.list-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center;
  padding: 10px; border: 1px solid var(--line); background: var(--bg-2); color: inherit;
}
.list-item:hover { color: inherit; border-color: var(--line-strong); }
.list-item img { width: 72px; height: 100px; object-fit: cover; background: #141416; }
.price { font-family: var(--display); color: var(--gold-2); letter-spacing: -0.03em; }
.thumb { background: #141416 center/cover no-repeat; min-height: 160px; border: 1px solid var(--line); }
.odds { width: 100%; border-collapse: collapse; }
.odds td { padding: 10px 6px; border-bottom: 1px solid var(--line); }
.swatch { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: middle; }
.bar { height: 3px; background: #1c1c1e; min-width: 88px; }
.bar i { display: block; height: 100%; background: currentColor; }
.pill.gold { color: var(--gold); }
.pill.warn { color: var(--warn); }
.pill.bad { color: var(--err); }
.pill.comune { color: var(--comune); background: rgba(154,163,173,0.08); }
.pill.rara { color: var(--rara); background: rgba(61,124,255,0.1); }
.pill.epica { color: var(--epica); background: rgba(180,108,255,0.1); }
.pill.leggendaria { color: var(--leggendaria); background: rgba(232,200,114,0.1); }
.pill.mitica {
  color: #fff;
  background: linear-gradient(90deg, #ff4d6d, #ffb020, #46e0a0, #3d7cff, #b46cff);
  background-size: 200% 100%; animation: prism 4s linear infinite; border-color: transparent;
}
.desk-nav a.active, .tabbar a.active { color: var(--gold-2); }
.desk-nav a.active { box-shadow: inset 0 -1px 0 var(--gold); }
.slab-3d.is-live { animation: none !important; }
.linkish { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; }

/* Reveal restyle */
.reveal-root { width: 100%; }
.stage-wrap { width: 100%; }
.stage {
  position: relative; width: min(420px, 92vw); height: 460px;
  margin: 0 auto; display: grid; place-items: center;
}
#rv-fx { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.glow {
  position: absolute; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, var(--tier, rgba(232,200,114,.4)), transparent 70%);
  filter: blur(18px); opacity: .75; z-index: 0; transition: background .2s;
}
.flash { position: absolute; inset: 0; background: #fff8e4; opacity: 0; pointer-events: none; z-index: 5; }
.flash.bang { animation: bang .45s ease; }
@keyframes bang { 0% { opacity: .8; } 100% { opacity: 0; } }
.hold-ring {
  position: absolute; width: 240px; height: 336px; z-index: 3; pointer-events: none;
}
.hold-ring circle { fill: none; stroke: var(--gold); stroke-width: 1.6; }
.scene {
  width: 210px; height: 300px; background: none; border: 0; padding: 0;
  perspective: 1100px; transform-style: preserve-3d; cursor: pointer;
  position: relative; z-index: 2;
}
.scene.busy { cursor: progress; }
.face {
  position: absolute; inset: 0; backface-visibility: hidden;
  overflow: hidden; border: 1px solid rgba(255,255,255,0.2);
  box-shadow: var(--shadow);
}
.face.back { transform: rotateY(0deg); background: #0c0a0c; }
.face.front { transform: rotateY(180deg); background: #120e0c; }
.scene.is-front .face.back { transform: rotateY(180deg); }
.scene.is-front .face.front { transform: rotateY(0deg); }
.scene.flipping .face { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.back-art, .front-art { width: 100%; height: 100%; }
.back-art svg, .front-art svg { width: 100%; height: 100%; display: block; }
.front-art.has-photo { background-size: cover; background-position: center; }
.foil {
  position: absolute; inset: -20%; pointer-events: none; mix-blend-mode: color-dodge; opacity: .65;
  background: conic-gradient(from 200deg at 40% 30%,
    rgba(255,80,120,0), rgba(255,90,140,.5), rgba(255,210,80,.65),
    rgba(80,255,200,.45), rgba(80,160,255,.6), rgba(200,110,255,.5), rgba(255,80,120,0));
  filter: blur(8px);
}
.front-labels {
  position: absolute; left: 10px; right: 10px; bottom: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: #fff8e4;
  text-shadow: 0 1px 8px #000;
}
.front-labels b { display: block; font-family: var(--display); font-size: 13px; letter-spacing: 0; text-transform: none; }
.hint { margin-top: 8px; color: var(--muted); font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; font-size: 11px; text-align: center; }
.hint b { display: block; color: var(--ink); font-size: 13px; letter-spacing: .16em; margin-bottom: 4px; }
.hint.hidden { opacity: 0; }
.result { display: grid; gap: 8px; justify-items: center; margin: 18px 0 10px; text-align: center; }
#rv-tier { opacity: 0; transform: translateY(10px); font-family: var(--display); font-size: clamp(2.4rem, 8vw, 4.2rem); letter-spacing: -0.04em; color: var(--tier, var(--gold)); }
#rv-tier.show, #rv-serial.show, #rv-meta.show { opacity: 1; transform: none; transition: opacity .45s ease, transform .45s ease; }
#rv-serial { opacity: 0; font-family: var(--mono); letter-spacing: .16em; color: var(--gold-2); }
#rv-serial .hash { font-size: 1.15rem; }
#rv-meta { opacity: 0; color: var(--muted); font-size: 14px; }
.fullset {
  display: none; padding: 4px 10px; border: 1px solid var(--gold);
  font-family: var(--mono); letter-spacing: .16em; text-transform: uppercase; font-size: 11px; color: var(--gold-2);
}
.fullset.show { display: inline-flex; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.kv dd { margin: 0; font-family: var(--mono); font-size: 12px; word-break: break-all; color: var(--ink); }
.verify { margin-top: 14px; color: var(--muted); }
.verify.ok { color: var(--ok); }
.hidden { display: none; }
.hint.hidden { display: block; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .scene.flipping .face { transition: none; }
  .flash.bang { animation: none; opacity: 0; }
}

.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.trade-card.is-demo { opacity: 0.72; pointer-events: none; }
.demo-thumb { background-size: cover; background-position: center; }
@media (max-width: 859px) {
  .hero-slab { margin: 4px 0 28px; }
  .hero-slab .slab-3d { width: min(210px, 62vw); }
}
