/* PATINA: a dark museum, gold kintsugi accents. */

:root {
  --bg: #0f0d0a;
  --bg-2: #15120e;
  --surface: #1c1813;
  --surface-2: #241f19;
  --line: #3a3128;
  --line-soft: #2a241d;
  --text: #efe7d8;
  --muted: #a99d89;
  --gold: #c9a227;
  --gold-hi: #f3d77a;
  --gold-deep: #8a6414;
  --verdigris: #6cc4a6;
  --ok: #8fc27a;
  --bad: #e8907a;
  --on-gold: #1b160c;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 160ms;
  --t-med: 280ms;
  --t-slow: 700ms;
  --gutter: 24px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: radial-gradient(1200px 700px at 70% -10%, #2a2016 0%, transparent 60%), var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Film grain, like the art itself. Static, so it costs nothing per frame. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--gold-hi); text-underline-offset: 3px; }
a:hover { color: #fff3c9; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--font-mono); }

/* ---------- buttons ---------- */

button { font: inherit; color: inherit; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  font-weight: 500; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.btn:hover:not(:disabled) { border-color: var(--gold); color: var(--text); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-gold {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #e2bd4a, var(--gold) 55%, #b18a1d);
  color: var(--on-gold); border-color: #e2bd4a; font-weight: 600;
  box-shadow: 0 6px 24px -10px rgba(201, 162, 39, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-gold:hover:not(:disabled) { color: var(--on-gold); box-shadow: 0 10px 34px -10px rgba(243, 215, 122, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
/* A slow sheen across gold buttons. */
.btn-gold::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sheen 4.5s var(--ease-out) infinite 1.5s;
  pointer-events: none;
}
@keyframes sheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn-block { width: 100%; }
.btn-icon {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); display: inline-grid; place-items: center; cursor: pointer;
  transition: border-color var(--t-fast);
}
.btn-icon:hover { border-color: var(--gold); }
.btn-icon svg { width: 18px; height: 18px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- header ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  transition: background var(--t-med), border-color var(--t-med), backdrop-filter var(--t-med);
  border-bottom: 1px solid transparent;
}
.nav.solid { background: rgba(15, 13, 10, 0.82); backdrop-filter: blur(12px); border-color: var(--line-soft); }
.brand { font: 600 24px var(--font-display); letter-spacing: 0.32em; color: var(--text); text-decoration: none; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: var(--muted); text-decoration: none; padding: 10px 12px; border-radius: 8px; font-size: 14px; transition: color var(--t-fast); }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--verdigris); box-shadow: 0 0 10px var(--verdigris); }
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 520px) { .pill { display: none; } .nav .btn { padding: 8px 14px; font-size: 14px; } .brand { font-size: 20px; letter-spacing: 0.24em; } }

/* ---------- layout ---------- */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 640px) { :root { --gutter: 16px; } }
.section { padding: 96px 0; position: relative; }
@media (max-width: 640px) { .section { padding: 64px 0; } }
.section-head { max-width: 640px; margin-bottom: 40px; }
.eyebrow { font: 500 12px var(--font-mono); text-transform: uppercase; letter-spacing: 0.22em; color: var(--gold); margin: 0 0 12px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(46px, 7vw, 84px); letter-spacing: -0.01em; }
h1 em { font-style: italic; color: var(--gold-hi); position: relative; white-space: nowrap; display: inline-block; }
h2 { font-size: clamp(34px, 4.6vw, 54px); margin-bottom: 14px; }
h3 { font-size: 26px; }
.lede { color: var(--muted); font-size: 18px; max-width: 48ch; margin: 18px 0 28px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 17px; margin: 0; }

/* ---------- hero ---------- */

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 40px var(--gutter) 72px; }
@media (max-width: 920px) { .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 16px; } }
@media (max-width: 520px) { .frame { padding: 8px; } .frame::after { inset: 8px; } }
.frame {
  margin: 0; padding: 14px; border-radius: 16px; position: relative;
  background: linear-gradient(145deg, #3a2f20, #1a1510 40%, #2c2418);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(201, 162, 39, 0.18);
}
.frame::after { content: ''; position: absolute; inset: 14px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); pointer-events: none; }
.art { aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--surface); }
.art img { width: 100%; height: 100%; }
/* Underline under "artist": a gold seam that draws itself in. */
.title-seam { position: absolute; left: 0; width: 100%; bottom: -0.12em; height: 0.28em; overflow: visible; }
.title-seam path { stroke: var(--gold); stroke-width: 3; fill: none; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.6s var(--ease-out) 0.5s forwards; filter: drop-shadow(0 0 6px rgba(243, 215, 122, 0.55)); }
@keyframes draw { to { stroke-dashoffset: 0; } }

.scrub { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; margin-top: 18px; }
.scrub label { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.scrub output { font-family: var(--font-mono); color: var(--text); }
input[type='range'] { width: 100%; accent-color: var(--gold); height: 44px; cursor: pointer; background: transparent; }

.mint-card { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 24px 60px -36px rgba(0, 0, 0, 0.9); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat span { display: block; font: 500 11px var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.stat b { font: 600 26px var(--font-display); font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-hi)); border-radius: inherit; transition: width 1.2s var(--ease-out); }
.qty { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.qty output { min-width: 28px; text-align: center; font: 600 22px var(--font-display); }
.qty .hint { margin-left: auto; font-size: 13px; color: var(--muted); }
.note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.proof { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 22px 0 0; font-size: 13px; color: var(--muted); }
.proof li { display: flex; align-items: center; gap: 8px; }
.proof svg { width: 16px; height: 16px; color: var(--gold); flex: none; }

/* ---------- seam divider ---------- */

.seam-divider { height: 40px; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.seam-divider svg { width: 100%; height: 100%; overflow: visible; }
.seam-divider path { fill: none; stroke: url(#goldLine); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 2.2s var(--ease-out); }
.seam-divider.in path { stroke-dashoffset: 0; }

/* ---------- reveal ---------- */

[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- lifecycle ---------- */

.stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; counter-reset: stage; }
@media (max-width: 1000px) { .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stage { position: relative; }
.stage button { all: unset; display: block; width: 100%; cursor: pointer; border-radius: var(--radius); }
.stage .thumb { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); transition: border-color var(--t-fast), transform var(--t-med) var(--ease-out); }
.stage button:hover .thumb { border-color: var(--gold); transform: translateY(-3px); }
.stage h3 { font-size: 22px; margin: 12px 0 2px; }
.stage .days { font: 500 12px var(--font-mono); color: var(--gold); letter-spacing: 0.08em; }
.stage p { color: var(--muted); font-size: 14px; margin: 6px 0 0; line-height: 1.5; }

/* ---------- marks ---------- */

.marks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .marks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .marks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .marks { grid-template-columns: 1fr; } }
.mark { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; }
.mark .thumb { aspect-ratio: 1; }
.mark .body { padding: 16px 18px 20px; }
.mark .tag { font: 500 11px var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.mark h3 { margin: 6px 0 6px; }
.mark p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- kiln ---------- */

.kiln-section { overflow: hidden; background: radial-gradient(900px 500px at 15% 110%, rgba(214, 110, 40, 0.18), transparent 60%), linear-gradient(180deg, transparent, rgba(40, 22, 10, 0.35) 40%, transparent); }
#embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.kiln-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: start; position: relative; }
@media (max-width: 920px) { .kiln-grid { grid-template-columns: 1fr; } }
.steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.steps .num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--gold-deep); color: var(--gold-hi); font: 600 18px var(--font-display); background: rgba(201, 162, 39, 0.08); }
.steps b { display: block; font-weight: 600; }
.steps span { color: var(--muted); font-size: 15px; }
.fees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; }
.fee { background: rgba(28, 24, 19, 0.8); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.fee span { display: block; font: 500 11px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.fee b { font: 600 22px var(--font-display); }

.chart-card { background: rgba(28, 24, 19, 0.88); border: 1px solid var(--line); border-radius: 16px; padding: 20px 20px 12px; backdrop-filter: blur(4px); }
.chart-card h3 { font-size: 22px; }
.chart-card .sub { color: var(--muted); font-size: 14px; margin: 4px 0 10px; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.chart .grid line { stroke: var(--line-soft); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font: 12px var(--font-mono); }
.chart .curve { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; }
.chart .area { fill: url(#chanceFill); }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--gold-hi); stroke: var(--surface); stroke-width: 2; }
.chart .annot { fill: var(--text); font: 12px var(--font-body); }
.tip { position: absolute; pointer-events: none; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; white-space: nowrap; transform: translate(-50%, -120%); opacity: 0; transition: opacity var(--t-fast); }
.tip.show { opacity: 1; }
.tip b { font-family: var(--font-mono); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.presets span { font-size: 13px; color: var(--muted); border: 1px solid var(--line-soft); border-radius: 999px; padding: 4px 10px; }
.presets b { color: var(--text); font-family: var(--font-mono); font-weight: 500; }

/* ---------- galleries ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.tile { position: relative; perspective: 900px; }
.tile .img { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); transform-style: preserve-3d; transition: transform var(--t-med) var(--ease-out), border-color var(--t-fast), box-shadow var(--t-med); cursor: pointer; }
.tile .img img { width: 100%; height: 100%; }
.tile .img::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 240, 200, 0.22), transparent 45%); opacity: 0; transition: opacity var(--t-med); pointer-events: none; }
.tile .img:hover { border-color: var(--gold); box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.9); }
.tile .img:hover::after { opacity: 1; }
.tile .cap { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; }
.tile .cap b { color: var(--text); font-weight: 500; }
.tile.gilded .img { animation: gild 1.6s var(--ease-out); }
@keyframes gild { 0% { box-shadow: 0 0 0 0 rgba(243, 215, 122, 0.9); border-color: var(--gold-hi); } 100% { box-shadow: 0 0 0 26px rgba(243, 215, 122, 0); } }
.skeleton { aspect-ratio: 1; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { color: var(--muted); font-size: 15px; grid-column: 1 / -1; margin: 0; }
.empty-card { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: 16px; padding: 22px; }
.empty-card p { margin: 0; color: var(--muted); }

.kiln { margin-top: 10px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); display: grid; gap: 8px; }
.kiln .row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.kiln .row b { color: var(--text); font-family: var(--font-mono); font-weight: 500; }
.kiln .btn { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.kiln .meter { height: 4px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.kiln .meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b5401a, #e88a2e, var(--gold-hi)); transition: width 0.8s var(--ease-out); }
.kiln.firing { border-color: #8a3c18; box-shadow: inset 0 0 30px -12px rgba(232, 138, 46, 0.6); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: inset 0 0 40px -10px rgba(232, 138, 46, 0.85); } }

/* ---------- faq ---------- */

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 4px 18px; transition: border-color var(--t-fast); }
.faq details[open] { border-color: var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 500; display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 24px var(--font-display); color: var(--gold); transition: transform var(--t-med) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--line-soft); padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: center; }
.addr { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; }
.copy { min-height: 36px; padding: 6px 12px; font-size: 13px; }

/* ---------- dialogs ---------- */

dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); color: var(--text); padding: 0; max-width: min(920px, calc(100vw - 32px)); width: 100%; box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9); }
dialog::backdrop { background: rgba(5, 4, 3, 0.72); backdrop-filter: blur(6px); }
dialog[open] { animation: pop var(--t-med) var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.dlg-head h2 { font-size: 28px; margin: 0; }
.dlg-body { padding: 20px; }
#walletDialog { max-width: 420px; }
.wallets { display: grid; gap: 10px; }
.wallets button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; transition: border-color var(--t-fast); }
.wallets button:hover { border-color: var(--gold); }
.wallets img { width: 28px; height: 28px; border-radius: 6px; }
.wallet-initial { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold-hi); font: 600 15px var(--font-display); }
.lb { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 760px) { .lb { grid-template-columns: 1fr; } }
.lb .art { border: 1px solid var(--line); }
.traits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.traits div { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 12px; }
.traits dt { font: 500 10px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.traits dd { margin: 2px 0 0; font-weight: 500; }

/* ---------- toasts ---------- */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 12px; padding: 12px 14px; font-size: 14px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.9); animation: toastIn var(--t-med) var(--ease-out); }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--bad); }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity 180ms, transform 180ms; }
.toast p { margin: 0; flex: 1; }
.toast button { background: none; border: 0; color: var(--muted); cursor: pointer; min-width: 28px; min-height: 28px; font-size: 18px; line-height: 1; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

#burst { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 150; }

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .title-seam path, .seam-divider path { stroke-dashoffset: 0; }
  .btn-gold::after { display: none; }
}

/* ======================================================================
   Multi-page: header menu, feed, token page, explorer, market
   ====================================================================== */

.nav-links a[aria-current='page'] { color: var(--text); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .nav-links.open {
    display: grid; position: absolute; top: 100%; left: 0; right: 0; gap: 2px;
    padding: 8px var(--gutter) 16px; background: rgba(15, 13, 10, 0.97); border-bottom: 1px solid var(--line-soft);
  }
  .nav-links.open a { padding: 12px 8px; font-size: 16px; }
}
@media (max-width: 420px) { #connectBtn { max-width: 140px; overflow: hidden; text-overflow: ellipsis; } }

.muted { color: var(--muted); }
.gold { color: var(--gold-hi); }
.you { display: inline-block; font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--on-gold); background: var(--gold); border-radius: 999px; padding: 1px 8px; vertical-align: 2px; }
.spin.inline { display: inline-block; vertical-align: -3px; margin-right: 8px; }
.fee-note { display: block; font-size: 12px; color: var(--muted); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-right: 10px; vertical-align: 1px; box-shadow: 0 0 0 0 rgba(232, 144, 122, 0.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(232, 144, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 144, 122, 0); } }
.skeleton-row { min-height: 56px; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.tile a.img { display: block; }
.tile .cap.sub { margin-top: 2px; font-size: 12px; }
.tile .manage { display: inline-block; margin-top: 8px; font-size: 13px; }
.badge { font: 500 12px var(--font-mono); color: var(--on-gold); background: var(--gold); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.quick-buy { width: 100%; margin-top: 8px; min-height: 40px; font-size: 14px; }

/* ---------- feed ---------- */

.feed { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.feed-item { display: grid; grid-template-columns: 48px 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 8px 14px 8px 8px; font-size: 15px; animation: toastIn var(--t-med) var(--ease-out); }
.feed-art, .feed-icon { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); }
.feed-icon svg { width: 22px; height: 22px; }
.feed-kind { display: grid; place-items: center; }
.feed-kind svg { width: 18px; height: 18px; }
.feed-text a { color: var(--text); text-decoration: none; }
.feed-text a:hover { color: var(--gold-hi); }
.feed-time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.feed-time a { text-decoration: none; margin-left: 6px; }
.k-gold, .k-sale { color: var(--gold-hi); }
.feed-item.k-gold { border-color: rgba(201, 162, 39, 0.5); background: linear-gradient(90deg, rgba(201, 162, 39, 0.1), var(--surface) 40%); }
.k-fire { color: #e88a2e; }
.k-ash, .k-unlist, .k-transfer, .k-reveal { color: var(--muted); }
.k-mint, .k-list { color: var(--verdigris); }
@media (max-width: 640px) {
  .feed-item { grid-template-columns: 44px minmax(0, 1fr); row-gap: 2px; }
  .feed-kind { display: none; }
  .feed-art, .feed-icon { width: 44px; height: 44px; grid-row: span 2; }
  .feed-time { font-size: 12px; }
}

/* ---------- shared page bits ---------- */

.page { padding-top: 24px; padding-bottom: 80px; }
.h1-page { font-size: clamp(40px, 5.5vw, 64px); }
.h-sm { font: 600 20px var(--font-display); margin: 0 0 12px; }
.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.panel p { margin: 10px 0 0; font-size: 14px; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.price-row span { color: var(--muted); font-size: 14px; }
.price-row b { font: 600 28px var(--font-display); }
.section-tight { padding: 56px 0 0; }
.section-tight h2 { font-size: 36px; }
.section-tight > p { margin: 0 0 18px; }

input:not([type='range']):not([type='checkbox']), select {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line); font: inherit; font-size: 15px;
  transition: border-color var(--t-fast);
}
input:focus-visible, select:focus-visible { border-color: var(--gold); outline-offset: 1px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a99d89' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 34px; cursor: pointer; }
label { display: block; font: 500 11px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.scrub label { font: inherit; letter-spacing: 0; text-transform: none; font-size: 13px; }

/* ---------- token page ---------- */

.crumbs { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.crumbs .pager { margin-left: auto; display: flex; gap: 8px; }
.token-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 48px; align-items: start; }
@media (max-width: 920px) { .token-grid { grid-template-columns: 1fr; gap: 28px; } }
.token-grid .eyebrow { margin-bottom: 6px; }
.owner { color: var(--muted); margin: 10px 0 20px; }
.owner a { color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
@media (max-width: 520px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-grid div, .traits div { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; }
.stat-grid dt, .traits dt { font: 500 10px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stat-grid dd { margin: 4px 0 0; font: 600 20px var(--font-display); }
.traits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.traits dd { margin: 2px 0 0; font-weight: 500; }
.traits small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.list-form { display: grid; gap: 8px; margin-top: 4px; }
.list-form label { margin: 6px 0 0; }
.list-form p { margin: 0; }
.input-group { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding-right: 12px; }
.input-group:focus-within { border-color: var(--gold); }
.input-group input { border: 0 !important; background: transparent !important; font: 600 20px var(--font-mono) !important; }
.input-group span { color: var(--muted); font-family: var(--font-mono); }
.error { color: var(--bad) !important; }
.share { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- explorer ---------- */

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.tabs { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.tabs button { min-height: 40px; padding: 8px 18px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-weight: 500; transition: background var(--t-fast), color var(--t-fast); }
.tabs button[aria-selected='true'] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin: 0 0 22px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpis div { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; }
.kpis dt { font: 500 10px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.kpis dd { margin: 4px 0 0; font: 600 22px var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.leaders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
@media (max-width: 640px) { .leaders { grid-template-columns: 1fr; } }
.board { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; padding: 16px; }
.board ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.board li { display: grid; grid-template-columns: 18px 36px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.board .rank { font: 600 16px var(--font-display); color: var(--gold); }
.board-art { width: 36px; height: 36px; border-radius: 6px; overflow: hidden; display: block; }
.board b { font-family: var(--font-mono); font-weight: 500; font-size: 13px; color: var(--muted); }
.filters { display: grid; grid-template-columns: 1.2fr repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; padding: 14px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; position: sticky; top: 72px; z-index: 20; }
@media (max-width: 1100px) { .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); position: static; } }
@media (max-width: 560px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filters .grow { grid-column: 1 / -1; } }
.filters label { margin-bottom: 4px; }
.chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); cursor: pointer; font-size: 14px; transition: all var(--t-fast); }
.chip:hover { color: var(--text); border-color: var(--gold-deep); }
.chip[aria-pressed='true'] { background: rgba(201, 162, 39, 0.16); color: var(--gold-hi); border-color: var(--gold); }
.chip.ghost { border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.result-count { color: var(--muted); font-size: 14px; margin: 16px 0 12px; }
#sentinel { height: 1px; }
