/* SPANIEL SYNDICATE — styles. Bauhaus: flat dark base, sharp corners,
 * clean lines, restrained palette. The pixel-art generator's aesthetic
 * stays at the centre; the chrome around it is reduced to geometry. */

:root {
  color-scheme: dark;
  --bg: #08070a;
  --bg-2: #11101a;
  --panel: #17151f;
  --panel-2: #1f1c2a;
  --ink: #fff7e2;
  --ink-soft: #cfc9d8;
  --muted: #8e8a9b;
  --line: #fff7e2;
  --soft-line: rgba(255, 247, 226, 0.22);
  --accent: #f5df88;
  --accent-2: #f7b643;
  --neon: #c87dff;
  --neon-2: #5fd4ff;
  --neon-3: #ff7d9e;
  --success: #6fcc8e;
  --error: #f06262;
  --shadow: rgba(0, 0, 0, 0.55);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-2); text-decoration: underline; }

strong { color: var(--ink); }
code { background: var(--panel-2); padding: 0.05em 0.4em; font-size: 0.92em; }

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── NAV ─────────────────────────────────────────────────────────── */

nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  margin-bottom: 18px;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
  transition: transform .25s ease;
}
nav.nav--hidden { transform: translateY(-100%); }

.nav-logo {
  font-family: "Press Start 2P", "DM Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink);
  position: relative;
}
.nav-logo:hover { color: var(--accent); text-decoration: none; }
.nav-logo-tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  /* width must not push the document past viewport on narrow phones —
   * the tooltip is position:absolute but still contributes to
   * scrollWidth. Clamp to viewport-minus-padding. */
  width: min(320px, calc(100vw - 24px));
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--soft-line);
  font-size: 12px;
  color: var(--ink-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.nav-logo:hover .nav-logo-tooltip { opacity: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}
.nav-links a:not(.btn-primary) {
  color: var(--ink-soft);
  font-size: 13px;
  position: relative;
  padding: 4px 2px;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* ── NAV SECTION HIGHLIGHT ──
 * .is-active is added by main.js's IntersectionObserver when the
 * corresponding section enters the viewport's active band. A muted
 * accent + a 2px underline that grows in from the left. Excludes the
 * CTA button because it carries its own background and reads as a
 * button, not a section pointer. */
.nav-links a:not(.btn-primary).is-active {
  color: var(--accent);
}
.nav-links a:not(.btn-primary).is-active::after {
  content: '';
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
  animation: nav-underline-in .18s ease-out both;
}
@keyframes nav-underline-in {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-links a:not(.btn-primary).is-active::after { animation: none; }
}

.nav-wallet:empty { display: none; }

/* ── BUTTONS ─────────────────────────────────────────────────────── */

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 2px solid var(--line);
  background: var(--accent);
  color: #0b0a08;
  font-weight: 600;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
  box-shadow: 4px 4px 0 var(--line);
}
.btn-primary:hover, .btn-secondary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--line);
  text-decoration: none;
}
.btn-primary:active, .btn-secondary:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--line);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
}

button {
  font: inherit;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--soft-line);
  color: var(--ink);
  padding: 6px 12px;
}
button:hover { border-color: var(--line); }
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── HERO / CTA ──────────────────────────────────────────────────── */

.top-cta {
  text-align: center;
  padding: 48px 0 32px;
}
.top-cta-title {
  margin: 0 0 18px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(20px, 4.4vw, 38px);
  line-height: 1.35;
  letter-spacing: 0.04em;
}
.syndicate-word { color: var(--accent); }
.ticker { color: var(--accent-2); }

.top-cta-sub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 14px;
  margin-bottom: 28px;
}
.top-cta-sub-burn { color: var(--muted); font-size: 12px; }

.top-cta-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Hero preview iframe */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 8px;
}
.preview-frame {
  width: min(420px, 90vw);
  aspect-ratio: 1 / 1;
  border: 2px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}
.preview-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
  /* The renderer paints a 24×24 grid; let the browser nearest-neighbor
   * upscale so pixels stay crisp at any size. */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #e5d2ff;
}
.preview-caption {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  max-width: 460px;
}

/* ── SECTIONS ───────────────────────────────────────────────────── */

.full-divider {
  height: 2px;
  background: var(--line);
  margin: 48px 0;
}

.section {
  margin: 32px 0;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.section-title {
  font-family: "Press Start 2P", monospace;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: uppercase;
  position: relative;
  padding-left: 18px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 18px;
  background: var(--accent);
}
.section-line { flex: 1; height: 2px; background: var(--line); }

.section-intro {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
  max-width: 800px;
  margin: 0 0 24px;
}

/* ── FORM CARD ──────────────────────────────────────────────────── */

.write-form-card {
  background: var(--panel);
  border: 2px solid var(--line);
  padding: 24px;
}

.form-note {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.write-form-submit {
  width: 100%;
  margin-top: 16px;
  padding: 14px 18px;
  border: 2px solid var(--line);
  background: var(--accent);
  color: #0b0a08;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .1s ease;
}
.write-form-submit:hover:not(:disabled) {
  filter: brightness(1.1);
}
.write-form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.burn-status {
  margin-top: 16px;
  padding: 12px 14px;
  font-size: 13px;
  border-left: 3px solid var(--soft-line);
  background: var(--panel-2);
  min-height: 1.2em;
}
.burn-status:empty { display: none; }
.burn-status.info { border-color: var(--accent); color: var(--ink-soft); }
.burn-status.success { border-color: var(--success); color: var(--ink); }
.burn-status.error { border-color: var(--error); color: var(--ink); }

/* ── MINT WIDGET ────────────────────────────────────────────────── */

.mint-card { margin-top: 8px; }

.mint-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.mint-stat {
  padding: 14px;
  background: var(--panel-2);
  border: 2px solid var(--soft-line);
}
.mint-stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.mint-stat-value {
  font-family: "Press Start 2P", monospace;
  font-size: 18px;
  color: var(--ink);
}
.mint-stat-unit {
  font-size: 11px;
  color: var(--muted);
  font-family: inherit;
  margin-left: 4px;
}

.mint-slippage-row { margin: 14px 0; font-size: 13px; }
.mint-slippage-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  cursor: pointer;
}
.mint-slippage-toggle input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.mint-recent-flash {
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--accent);
  background: rgba(245, 223, 136, 0.08);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mint-recent-flash img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ── BUY WIDGET ──────────────────────────────────────────────────── */

.buy-section .section-header { position: relative; }
.buy-settings-btn {
  border: 1px solid var(--soft-line);
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.buy-settings-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }

.buy-settings-panel {
  position: relative;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--panel-2);
  border: 1px solid var(--soft-line);
}
.buy-settings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.buy-settings-row:last-child { margin-bottom: 0; }
.buy-settings-label {
  flex: 0 0 160px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.buy-settings-options {
  display: inline-flex;
  gap: 4px;
}
.buy-settings-options button {
  font-size: 12px;
  padding: 5px 10px;
}
.buy-settings-options button.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(245, 223, 136, 0.08);
}
.buy-settings-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
}
.buy-settings-meta { font-size: 11px; color: var(--muted); }

.burn-form-row {
  margin-bottom: 14px;
}
.burn-form-row > label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.label-meta { color: var(--muted); }

.buy-input-line {
  display: flex;
  align-items: stretch;
  gap: 8px;
  position: relative;
}
.buy-input-line input {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--soft-line);
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
  font-size: 18px;
}
.buy-input-line input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.buy-token-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--panel-2);
  border: 1px solid var(--soft-line);
  font-size: 13px;
  color: var(--ink);
}
.buy-token-chip-btn { cursor: pointer; }
.buy-token-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}
.buy-token-chip-dot-sol { background: linear-gradient(135deg, #9945ff, #14f195); }
.buy-token-chip-dot-usdc { background: #2775ca; }
.buy-token-chip-dot-usdt { background: #50af95; }
.buy-token-chip-dot-spnl { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.buy-token-chip-chevron { opacity: 0.6; }

.buy-token-picker {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--panel);
  border: 1px solid var(--soft-line);
  padding: 6px;
  min-width: 200px;
  z-index: 10;
  box-shadow: 0 8px 24px var(--shadow);
}
.buy-token-picker button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  text-align: left;
  font-size: 13px;
}
.buy-token-picker button:hover { background: var(--panel-2); }
.buy-token-picker-symbol { font-weight: 500; }
.buy-token-picker-name { color: var(--muted); margin-left: auto; font-size: 12px; }

.buy-percent-row { display: flex; gap: 6px; margin-top: 8px; }
.buy-percent-row button {
  flex: 1;
  font-size: 12px;
  padding: 6px 8px;
}

.buy-usd-value { margin-top: 6px; font-size: 12px; color: var(--muted); }

.buy-arrow { text-align: center; color: var(--muted); margin: 4px 0; }

.buy-input-line-readout { align-items: center; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--soft-line); }
.buy-readout {
  flex: 1;
  font-size: 22px;
  font-family: "Press Start 2P", monospace;
}

.buy-meta-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0;
  font-size: 12px;
  color: var(--muted);
}
.buy-meta-row strong { color: var(--ink); font-weight: 500; }

/* ── RECENTLY MINTED ────────────────────────────────────────────── */

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recent-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel);
  border: 2px solid var(--soft-line);
  transition: border-color .12s ease;
}
.recent-row:hover { border-color: var(--line); }
.recent-thumb {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: var(--panel-2);
}
.recent-thumb.img-missing { visibility: hidden; }
.recent-id { font-family: "Press Start 2P", monospace; font-size: 12px; }
.mythic-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  background: var(--accent);
  color: #0b0a08;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.recent-owner { font-size: 11px; color: var(--muted); margin-top: 4px; }
.recent-owner a { color: var(--ink-soft); }
.recent-time { font-size: 11px; color: var(--muted); }

/* ── GALLERY ───────────────────────────────────────────────────── */

.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--ink-soft);
}
.gallery-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.gallery-filter input[type="radio"] { accent-color: var(--accent); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
}
.gallery-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--panel-2);
  border: 2px solid var(--soft-line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: border-color .1s ease, background .1s ease;
}
.gallery-tile:hover {
  border-color: var(--line);
  background: var(--panel);
  text-decoration: none;
}
.gallery-tile img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.gallery-tile img.img-missing {
  /* Local dev / partial pre-renders: hide the broken-image icon and
     fall back to the token-id label below. */
  visibility: hidden;
  height: 60%;
}
.gallery-tile.is-available { opacity: 0.35; }
.gallery-tile.is-mythic { border-color: var(--accent); }
.gallery-label {
  position: absolute;
  bottom: 2px;
  left: 0; right: 0;
  text-align: center;
  font-size: 9px;
  color: var(--muted);
  background: rgba(11, 10, 8, 0.85);
  padding: 1px 0;
}

/* ── EMPTY STATE ───────────────────────────────────────────────── */

.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--soft-line);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── RULES ─────────────────────────────────────────────────────── */

.rules-list {
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}
.rules-list li { margin-bottom: 8px; }

/* ── FOOTER ────────────────────────────────────────────────────── */

footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 2px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 16px;
}
.footer-rights {
  max-width: 700px;
  padding: 14px 0 14px 16px;
  margin-bottom: 16px;
  border-left: 4px solid var(--accent);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.footer-rights strong { color: var(--ink); }
.footer-colophon { max-width: 700px; line-height: 1.7; }

/* ── RESPONSIVE ──────────────────────────────────────────────────
 * Progressive cascade. Each .nav-links a[data-nav-priority="N"]
 * drops at a width tuned to keep the nav from crowding the wordmark
 * + CTA. The CTA is the single most important affordance — it never
 * drops. Below ~520px, the nav reduces to wordmark + CTA only.
 *
 * Priority assignments (lower number = higher priority = drops last):
 *   1 — Mint   (CTA covers it, so this can drop earliest among text links)
 *   2 — Buy
 *   3 — Gallery
 *   4 — Rules  (drops first, as the deepest tangent)
 */

/* Nav-link priority drops, lower priorities (highest numbers) shed first. */
@media (max-width: 1080px) {
  .nav-links a[data-nav-priority="4"] { display: none; }
}
@media (max-width: 960px) {
  .nav-links a[data-nav-priority="3"] { display: none; }
}
@media (max-width: 820px) {
  .nav-links a[data-nav-priority="2"] { display: none; }
}
@media (max-width: 720px) {
  .nav-links a[data-nav-priority="1"] { display: none; }
  .nav-links { gap: 12px; }
}
@media (max-width: 520px) {
  /* Phone: wordmark + CTA only. :not(.btn-primary) is critical — the
   * CTA is also an <a>, and a blanket "hide all anchors" would kill
   * it. The nav-wallet span stays visible if populated. */
  .nav-links a:not(.btn-primary) { display: none; }
  .nav-links { gap: 8px; }
}

/* Page chrome at tablet and smaller. */
@media (max-width: 880px) {
  .page { padding: 0 20px 64px; }
  .section { margin: 24px 0; }
  .full-divider { margin: 32px 0; }
}

@media (max-width: 640px) {
  .page { padding: 0 16px 56px; }
  .top-cta { padding: 32px 0 24px; }
  .top-cta-title { line-height: 1.4; }
  .preview-frame { width: min(300px, 92vw); }
  .buy-settings-label { flex: 0 0 100%; }
  .mint-stats-row { grid-template-columns: 1fr 1fr; }
  /* Tap-target floor: 44×44 px for the form submit, nav CTA, and
   * filter buttons. Native form controls already meet this. */
  .write-form-submit { padding: 16px; min-height: 48px; }
  .btn-primary, .btn-secondary { padding: 12px 18px; min-height: 44px; }
  .nav-cta { min-height: 38px; padding: 9px 14px; }
  .buy-settings-btn { min-height: 38px; padding: 8px 12px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
  .recent-row { grid-template-columns: 48px 1fr auto; padding: 10px 12px; }
  .recent-thumb { width: 40px; height: 40px; }
  .write-form-card { padding: 16px; }
  .footer-links { gap: 12px; }
  .section-title { font-size: 14px; }
  .section-intro { font-size: 13px; }
}

@media (max-width: 480px) {
  .page { padding: 0 12px 48px; }
  .top-cta-btns { flex-direction: column; align-items: stretch; }
  .top-cta-btns .btn-primary,
  .top-cta-btns .btn-secondary { justify-content: center; }
  .mint-stats-row { grid-template-columns: 1fr; gap: 8px; }
  .mint-stat { padding: 12px; }
  .mint-stat-value { font-size: 16px; }
  .buy-input-line input { font-size: 16px; padding: 11px 12px; min-width: 0; }
  .buy-readout { font-size: 18px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .gallery-controls { gap: 10px; }
  .buy-percent-row button { padding: 8px 6px; min-height: 40px; }
}

@media (max-width: 380px) {
  .page { padding: 0 10px 40px; }
  .nav-logo { font-size: 12px; letter-spacing: 0.04em; }
  .nav-cta { padding: 8px 11px; font-size: 12px; min-height: 36px; }
  .top-cta-title { font-size: 16px; }
  .write-form-card { padding: 14px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
  .buy-meta-row { font-size: 11px; gap: 8px; }
}

/* Very narrow phones (≤320: iPhone SE 1st gen; ≤290: older Androids).
 * Goal is zero horizontal scroll and a still-tappable CTA. */
@media (max-width: 320px) {
  .page { padding: 0 8px 40px; }
  nav { gap: 6px; padding: 10px 0; }
  .nav-logo { font-size: 11px; }
  .nav-cta { padding: 8px 9px; font-size: 11px; min-height: 36px; }
  .top-cta { padding: 24px 0 18px; }
  .top-cta-title { font-size: 14px; letter-spacing: 0.02em; }
  .top-cta-sub { font-size: 13px; }
  .preview-frame { width: min(260px, 92vw); }
  .section-title { font-size: 13px; }
  .write-form-card { padding: 12px; }
  .mint-stat-value { font-size: 15px; }
  .buy-readout { font-size: 17px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 5px; }
  .gallery-label { font-size: 8px; }
}

/* ── WIDESCREEN / TV ────────────────────────────────────────────
 * Default max-width is 1100px which feels cramped on 2K+. Step the
 * page max-width and tile sizes up. Don't enlarge body type as
 * aggressively — pixel-art is the visual anchor, the prose is
 * deliberately understated. */

@media (min-width: 1800px) {
  .page { max-width: 1400px; }
  .preview-frame { width: min(520px, 50vw); }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
  .top-cta { padding: 64px 0 36px; }
  .section { margin: 40px 0; }
  .full-divider { margin: 56px 0; }
}

@media (min-width: 2400px) {
  .page { max-width: 1600px; }
  .preview-frame { width: min(600px, 50vw); }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
  body { font-size: 16px; }
  .section-intro { font-size: 15px; }
}

@media (min-width: 3200px) {
  .page { max-width: 1800px; }
  .preview-frame { width: min(700px, 45vw); }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
  body { font-size: 17px; }
}

/* ── SYNDICATE HERO — louder than the burn-era top-cta block. Big
 * pixel-rendered wordmark, neon-gradient halo, supply counters
 * stacked on the left, rotating sample dog on the right. ─────────── */

.hero-syndicate {
  position: relative;
  padding: 56px 0 32px;
}
.hero-syndicate-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}
.hero-syndicate-eyebrow {
  display: inline-block;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ink);
  padding: 6px 12px;
  border: 2px solid var(--line);
  background: transparent;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.hero-syndicate-title {
  font-family: "Bebas Neue", "DM Sans", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(56px, 11vw, 144px);
  line-height: 0.86;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
}
.hero-syndicate-title .hero-syndicate-line-1 {
  display: block;
  color: var(--ink);
}
.hero-syndicate-title .hero-syndicate-line-2 {
  display: block;
  color: var(--accent);
}
.hero-syndicate-sub {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
  max-width: 520px;
  color: var(--ink-soft);
  margin: 0 0 28px;
}
.hero-syndicate-sub strong { color: var(--ink); }
.hero-syndicate-stats {
  display: flex;
  gap: 18px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.hero-syndicate-stat {
  flex: 1;
  min-width: 120px;
  padding: 14px 16px;
  background: var(--panel);
  border: 2px solid var(--line);
}
.hero-syndicate-stat-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0a08;
}
.hero-syndicate-stat-accent .hero-syndicate-stat-num,
.hero-syndicate-stat-accent .hero-syndicate-stat-label {
  color: #0b0a08;
}
.hero-syndicate-stat-accent .hero-syndicate-stat-unit { color: #0b0a08; }
.hero-syndicate-stat-num {
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink);
}
.hero-syndicate-stat-unit {
  font-size: 0.5em;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-left: 4px;
}
.hero-syndicate-stat-label {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 4px;
}
.hero-syndicate-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-xl {
  font-size: 16px !important;
  padding: 16px 28px !important;
  letter-spacing: 0.08em;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--line);
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.btn-ghost:hover {
  background: var(--line);
  color: var(--bg);
  text-decoration: none;
}

.hero-syndicate-art {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-syndicate-art-frame {
  position: relative;
  padding: 18px;
  background: var(--panel);
  border: 2px solid var(--line);
}
.hero-syndicate-art-frame canvas#spanielPreview {
  display: block;
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #ffe4b5;
}
.hero-syndicate-art-caption {
  margin-top: 14px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-syndicate-art-caption em {
  font-style: normal;
  color: var(--ink);
}

@media (max-width: 880px) {
  .hero-syndicate-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero-syndicate-art-frame canvas#spanielPreview {
    width: min(360px, 80vw);
    height: min(360px, 80vw);
  }
}

/* ── MYTHICS — feature grid of the 5 elaborate visuals. ─────────── */

.mythics {
  margin: 64px 0 32px;
}
.mythics-grid {
  display: grid;
  /* minmax(0, 1fr) prevents tracks from being widened by the
   * figcaption's intrinsic min-content; without it, the
   * justify-content:space-between row "#420  EMERALD GLITCH" can
   * push the column past its 1fr share and trigger horizontal
   * scroll at sub-320px viewports. */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.mythic-card {
  margin: 0;
  padding: 12px;
  background: var(--panel);
  border: 2px solid var(--line);
  position: relative;
  min-width: 0;
  transition: background .12s ease, color .12s ease;
}
.mythic-card:hover {
  background: var(--accent);
}
.mythic-card:hover figcaption strong,
.mythic-card:hover figcaption span {
  color: #0b0a08;
}
.mythic-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #1a1820;
}
.mythic-card figcaption {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.mythic-card figcaption strong {
  color: var(--accent);
  font-weight: 600;
  transition: color .12s ease;
}
.mythic-card figcaption span {
  color: var(--ink-soft);
  transition: color .12s ease;
}
@media (max-width: 980px) {
  .mythics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .mythics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* At very narrow widths the figcaption row can't fit "#420 EMERALD GLITCH"
 * side-by-side inside a ~110px content box. Stack the id over the name
 * so each mythic card stays inside its column. */
@media (max-width: 360px) {
  .mythic-card figcaption {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ── SYNDICATE MINT CARD — bigger, neon-edged variant of write-form-card. */

.mint-card-syndicate {
  background: var(--panel);
  border: 2px solid var(--line);
}
.mint-card-syndicate .write-form-submit {
  background: var(--accent);
  color: #1a1612;
  border: 2px solid var(--line);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--line);
  transition: transform .08s ease, box-shadow .08s ease;
}
.mint-card-syndicate .write-form-submit:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--line);
}
.mint-card-syndicate .write-form-submit:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--line);
}
.mint-card-syndicate .write-form-submit:disabled {
  background: var(--panel-2);
  color: var(--muted);
  box-shadow: none;
}

/* Quantity controls. */
.mint-quantity-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 24px;
  align-items: center;
  padding: 18px 0;
  margin: 14px 0 6px;
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
}
.mint-quantity-label {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  grid-column: 1 / 2;
}
.mint-quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  grid-column: 1 / 3;
}
.mint-qty-step {
  width: 36px;
  height: 36px;
  background: var(--panel-2);
  border: 2px solid var(--line);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.mint-qty-step:hover {
  background: var(--accent);
  color: #0b0a08;
}
.mint-quantity-controls input#mintQuantity {
  width: 80px;
  height: 36px;
  text-align: center;
  background: var(--panel-2);
  border: 2px solid var(--line);
  color: var(--ink);
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: 22px;
  letter-spacing: 0.05em;
}
.mint-quantity-controls input#mintQuantity:focus {
  outline: none;
  border-color: var(--accent);
}
.mint-quantity-presets {
  display: flex;
  gap: 6px;
  margin-left: 12px;
}
.mint-quantity-presets button {
  padding: 8px 12px;
  background: transparent;
  border: 2px solid var(--soft-line);
  color: var(--ink-soft);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.mint-quantity-presets button:hover {
  border-color: var(--line);
  background: var(--accent);
  color: #0b0a08;
}
.mint-quantity-total {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  font-family: "DM Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  white-space: nowrap;
  text-align: right;
}
.mint-quantity-total strong {
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: 26px;
  letter-spacing: 0.06em;
  color: var(--accent);
  display: block;
  margin-top: 4px;
}
@media (max-width: 600px) {
  .mint-quantity-row {
    grid-template-columns: 1fr;
  }
  .mint-quantity-total {
    grid-column: 1 / 2;
    grid-row: auto;
    text-align: left;
  }
  .mint-quantity-presets { margin-left: 0; }
}

/* ── Subtle nav wordmark tweak for the new brand. ─────────────── */

.nav-logo-default {
  font-family: "Bebas Neue", system-ui, sans-serif;
  letter-spacing: 0.08em;
  font-size: 18px;
  color: var(--ink);
}

/* ── VERIFY-ON-CHAIN STRIP ────────────────────────────────────────
 * Sharp Bauhaus block immediately under the hero. Four cells, each
 * a 2px-bordered label + value with a Solscan link on the value.
 * The trust signal pre-launch: anyone can independently verify the
 * Drop PDA, treasury, program, and provenance hash against the on-
 * chain state. Falls back to "—" if the data isn't loaded yet.
 */

.verify-strip {
  margin: 0 0 32px;
  padding: 0;
}
.verify-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 2px solid var(--line);
}
.verify-strip-item {
  padding: 14px 16px;
  border-right: 2px solid var(--line);
  background: var(--panel);
  min-width: 0;
}
.verify-strip-item:last-child { border-right: none; }
.verify-strip-label {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.verify-strip-value {
  font-family: "DM Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
  display: block;
}
.verify-strip-value:hover {
  text-decoration: underline;
  color: var(--ink);
}

.devnet-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border: 2px solid var(--accent);
  background: var(--panel);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.devnet-banner strong {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (max-width: 760px) {
  .verify-strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verify-strip-item:nth-child(2) { border-right: none; }
  .verify-strip-item:nth-child(1),
  .verify-strip-item:nth-child(2) { border-bottom: 2px solid var(--line); }
}
@media (max-width: 380px) {
  .verify-strip-grid { grid-template-columns: minmax(0, 1fr); }
  .verify-strip-item { border-right: none; border-bottom: 2px solid var(--line); }
  .verify-strip-item:last-child { border-bottom: none; }
}

/* ── SECTION LINK (top-right of section header) ───────────────────
 * "See all →" link that hangs at the end of a section-header row.
 * Visually muted; hover brightens.
 */
.section-link {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.section-link:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ── MARKET STATS PANEL ───────────────────────────────────────────
 * Four big numbers — floor, 24h volume, total volume, listed. Same
 * Bauhaus block treatment as the verify strip. Hidden when every
 * value is null.
 */

.market-section { position: relative; }
.market-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 2px solid var(--line);
  margin-bottom: 24px;
}
.market-stat {
  padding: 18px 16px;
  border-right: 2px solid var(--line);
  background: var(--panel);
  min-width: 0;
}
.market-stat:last-child { border-right: none; }
.market-stat-label {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.market-stat-value {
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: clamp(20px, 3.2vw, 30px);
  letter-spacing: 0.04em;
  color: var(--ink);
}
.market-stat-value.is-empty { color: var(--muted); }

.market-empty {
  border: 1px solid var(--soft-line);
  background: var(--panel);
  padding: 16px 18px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}
.market-section:has(#marketStats:not([hidden])) .market-empty { display: none; }

@media (max-width: 720px) {
  .market-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-stat:nth-child(2) { border-right: none; }
  .market-stat:nth-child(1),
  .market-stat:nth-child(2) { border-bottom: 2px solid var(--line); }
}
@media (max-width: 380px) {
  .market-stats { grid-template-columns: minmax(0, 1fr); }
  .market-stat { border-right: none; border-bottom: 2px solid var(--line); }
  .market-stat:last-child { border-bottom: none; }
}

/* ── TILE ROW (Top Sales + For Sale) ──────────────────────────────
 * Horizontal-flowing tile grid. Wraps on narrow widths. Each tile
 * has an image, an id, a price, and (optionally) a buyer/seller.
 */

.tile-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.sale-tile, .listing-tile {
  display: block;
  background: var(--panel);
  border: 2px solid var(--line);
  padding: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: background .12s ease;
}
.sale-tile:hover, .listing-tile:hover {
  background: var(--panel-2);
  text-decoration: none;
}
.sale-tile img, .listing-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #1a1820;
}
.sale-tile img.img-missing,
.listing-tile img.img-missing { visibility: hidden; }
.sale-tile-meta, .listing-tile-meta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.sale-tile-id, .listing-tile-id {
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.sale-tile-price, .listing-tile-price {
  color: var(--ink);
  font-size: 13px;
}
.sale-tile-actor {
  color: var(--muted);
  font-size: 10px;
}

/* ── BIDS STRIP ───────────────────────────────────────────────────
 * Compact rows: token id · bid price · bidder · time-ago.
 */

.bids-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bid-row {
  display: grid;
  grid-template-columns: 70px 90px 1fr auto;
  gap: 12px;
  padding: 10px 14px;
  border: 2px solid var(--soft-line);
  background: var(--panel);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  align-items: center;
}
.bid-token { color: var(--accent); font-weight: 600; letter-spacing: 0.06em; }
.bid-price { color: var(--ink); }
.bid-actor { color: var(--muted); }
.bid-time { color: var(--muted); font-size: 11px; }

@media (max-width: 480px) {
  .bid-row { grid-template-columns: 60px 1fr auto; }
  .bid-actor { display: none; }
}

/* ── HOLDERS LIST ─────────────────────────────────────────────────
 * Compact rows: wallet (link) · count.
 */

.holders-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.holder-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border: 2px solid var(--soft-line);
  background: var(--panel);
  font-family: "DM Mono", monospace;
  font-size: 13px;
}
.holder-wallet {
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.holder-wallet:hover {
  color: var(--ink);
  text-decoration: underline;
}
.holder-count {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── HERO STATS — 4-tile flow ─────────────────────────────────────
 * The 4th tile (Holders) joined the row. Allow wrap so the accent
 * stat stays on its own line at narrow widths instead of overflowing.
 */

.hero-syndicate-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-syndicate-stat {
  flex: 1 1 calc(50% - 6px);
  min-width: 120px;
}

@media (min-width: 720px) {
  .hero-syndicate-stat { flex: 1 1 calc(25% - 9px); }
}
@media (max-width: 380px) {
  .hero-syndicate-stat { flex: 1 1 100%; }
}

/* ── /market.html page ────────────────────────────────────────────
 * Same nav + footer, dedicated tabs surface for Sales / Listings /
 * Bids / Holders / Activity.
 */

.market-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 24px;
  border: 2px solid var(--line);
}
.market-page-tab {
  flex: 1 1 auto;
  padding: 12px 16px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--panel);
  border: none;
  border-right: 2px solid var(--line);
  color: var(--ink-soft);
  cursor: pointer;
  text-align: center;
}
.market-page-tab:last-child { border-right: none; }
.market-page-tab:hover { color: var(--ink); background: var(--panel-2); }
.market-page-tab[aria-selected="true"] {
  background: var(--accent);
  color: #0b0a08;
}

.market-page-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "DM Mono", monospace;
  font-size: 12px;
}
.market-page-table th,
.market-page-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--soft-line);
}
.market-page-table th {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 2px solid var(--line);
}
.market-page-table tr:hover td { background: var(--panel-2); }
.market-page-table .col-id { color: var(--accent); }
.market-page-table .col-price { color: var(--ink); }
.market-page-table .col-actor a { color: var(--ink-soft); }
.market-page-table .col-time { color: var(--muted); font-size: 11px; }
.market-page-table img.token-thumb {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  vertical-align: middle;
  margin-right: 10px;
}

.market-page-empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--soft-line);
  background: var(--panel);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 520px) {
  .market-page-table { font-size: 11px; }
  .market-page-table th,
  .market-page-table td { padding: 8px 8px; }
  .market-page-table img.token-thumb { width: 24px; height: 24px; margin-right: 6px; }
  .market-page-table .col-time { display: none; }
}

