/* ── TAO Punks Market Design System ─────────────────────
   Dark theme with cyan/green accents
   Font: Space Mono (mono) + Inter (sans)
   ─────────────────────────────────────────────────────── */

:root {
  /* Dark theme */
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-50: rgba(18, 18, 26, 0.6);
  --bg-hover: #1a1a28;
  --border: rgba(255,255,255,0.08);
  --border-50: rgba(255,255,255,0.05);
  --text: #e8e8ed;
  --text-dim: #8888a0;
  --primary: #00d4ff;
  --primary-fg: #0a0a0f;
  --secondary: #1a1a28;
  --muted: #1e1e2e;
  --success: #00ff88;
  --danger: #ff4757;
  --warning: #f5a623;
  --elevate-1: rgba(255,255,255, .03);
  --elevate-2: rgba(255,255,255, .06);
  --badge-outline: rgba(255,255,255, .08);
  --button-outline: rgba(255,255,255, .12);
  --accent: #00d4ff;
  --price-color: #00ff88;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', 'Space Mono', sans-serif;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  /* Dark background + neural network subnet pattern (white nodes/lines) */
  background-color: #0a0a0f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='800'%3E%3Cg opacity='0.08'%3E%3Crect x='58' y='118' width='5' height='5' fill='%23fff'/%3E%3Crect x='138' y='78' width='5' height='5' fill='%23fff'/%3E%3Ccircle cx='30' cy='220' r='3' fill='%23fff'/%3E%3Crect x='178' y='198' width='5' height='5' fill='%23fff'/%3E%3Ccircle cx='90' cy='300' r='2' fill='%23fff'/%3E%3Crect x='48' y='398' width='5' height='5' fill='%23fff'/%3E%3Ccircle cx='160' cy='350' r='2' fill='%23fff'/%3E%3Ccircle cx='20' cy='500' r='3' fill='%23fff'/%3E%3Crect x='128' y='478' width='5' height='5' fill='%23fff'/%3E%3Ccircle cx='70' cy='600' r='2' fill='%23fff'/%3E%3Ccircle cx='170' cy='560' r='3' fill='%23fff'/%3E%3Crect x='38' y='698' width='5' height='5' fill='%23fff'/%3E%3Ccircle cx='150' cy='680' r='2' fill='%23fff'/%3E%3Cline x1='60' y1='120' x2='140' y2='80' stroke='%23fff' stroke-width='1'/%3E%3Cline x1='140' y1='80' x2='180' y2='200' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='60' y1='120' x2='30' y2='220' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='30' y1='220' x2='180' y2='200' stroke='%23fff' stroke-width='1'/%3E%3Cline x1='180' y1='200' x2='90' y2='300' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='30' y1='220' x2='90' y2='300' stroke='%23fff' stroke-width='0.6'/%3E%3Cline x1='90' y1='300' x2='50' y2='400' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='90' y1='300' x2='160' y2='350' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='50' y1='400' x2='160' y2='350' stroke='%23fff' stroke-width='1'/%3E%3Cline x1='50' y1='400' x2='20' y2='500' stroke='%23fff' stroke-width='0.6'/%3E%3Cline x1='160' y1='350' x2='130' y2='480' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='20' y1='500' x2='130' y2='480' stroke='%23fff' stroke-width='1'/%3E%3Cline x1='130' y1='480' x2='70' y2='600' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='70' y1='600' x2='170' y2='560' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='70' y1='600' x2='40' y2='700' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='40' y1='700' x2='150' y2='680' stroke='%23fff' stroke-width='1'/%3E%3Cline x1='60' y1='120' x2='180' y2='200' stroke='%23fff' stroke-width='0.5'/%3E%3Cline x1='20' y1='500' x2='70' y2='600' stroke='%23fff' stroke-width='0.6'/%3E%3Cline x1='170' y1='560' x2='150' y2='680' stroke='%23fff' stroke-width='0.6'/%3E%3Crect x='848' y='98' width='5' height='5' fill='%23fff'/%3E%3Crect x='938' y='58' width='5' height='5' fill='%23fff'/%3E%3Ccircle cx='880' cy='200' r='3' fill='%23fff'/%3E%3Crect x='958' y='178' width='5' height='5' fill='%23fff'/%3E%3Ccircle cx='820' cy='320' r='2' fill='%23fff'/%3E%3Crect x='928' y='278' width='5' height='5' fill='%23fff'/%3E%3Ccircle cx='870' cy='420' r='2' fill='%23fff'/%3E%3Crect x='968' y='398' width='5' height='5' fill='%23fff'/%3E%3Ccircle cx='840' cy='540' r='3' fill='%23fff'/%3E%3Crect x='948' y='498' width='5' height='5' fill='%23fff'/%3E%3Ccircle cx='890' cy='640' r='2' fill='%23fff'/%3E%3Crect x='968' y='618' width='5' height='5' fill='%23fff'/%3E%3Ccircle cx='850' cy='740' r='3' fill='%23fff'/%3E%3Cline x1='850' y1='100' x2='940' y2='60' stroke='%23fff' stroke-width='1'/%3E%3Cline x1='940' y1='60' x2='960' y2='180' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='850' y1='100' x2='880' y2='200' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='880' y1='200' x2='960' y2='180' stroke='%23fff' stroke-width='1'/%3E%3Cline x1='960' y1='180' x2='930' y2='280' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='880' y1='200' x2='820' y2='320' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='820' y1='320' x2='930' y2='280' stroke='%23fff' stroke-width='1'/%3E%3Cline x1='930' y1='280' x2='870' y2='420' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='820' y1='320' x2='870' y2='420' stroke='%23fff' stroke-width='0.6'/%3E%3Cline x1='870' y1='420' x2='970' y2='400' stroke='%23fff' stroke-width='1'/%3E%3Cline x1='970' y1='400' x2='950' y2='500' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='870' y1='420' x2='840' y2='540' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='840' y1='540' x2='950' y2='500' stroke='%23fff' stroke-width='1'/%3E%3Cline x1='950' y1='500' x2='890' y2='640' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='890' y1='640' x2='970' y2='620' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='890' y1='640' x2='850' y2='740' stroke='%23fff' stroke-width='0.8'/%3E%3Cline x1='850' y1='100' x2='960' y2='180' stroke='%23fff' stroke-width='0.5'/%3E%3Cline x1='840' y1='540' x2='890' y2='640' stroke='%23fff' stroke-width='0.6'/%3E%3Cline x1='970' y1='620' x2='850' y2='740' stroke='%23fff' stroke-width='0.6'/%3E%3Ccircle cx='250' cy='50' r='1.2' fill='%23fff'/%3E%3Ccircle cx='320' cy='30' r='1.2' fill='%23fff'/%3E%3Ccircle cx='450' cy='45' r='1.2' fill='%23fff'/%3E%3Ccircle cx='550' cy='25' r='1.2' fill='%23fff'/%3E%3Ccircle cx='650' cy='40' r='1.2' fill='%23fff'/%3E%3Ccircle cx='750' cy='55' r='1.2' fill='%23fff'/%3E%3Ccircle cx='280' cy='750' r='1.2' fill='%23fff'/%3E%3Ccircle cx='400' cy='770' r='1.2' fill='%23fff'/%3E%3Ccircle cx='520' cy='745' r='1.2' fill='%23fff'/%3E%3Ccircle cx='650' cy='760' r='1.2' fill='%23fff'/%3E%3Ccircle cx='770' cy='740' r='1.2' fill='%23fff'/%3E%3Cline x1='180' y1='200' x2='250' y2='50' stroke='%23fff' stroke-width='0.4'/%3E%3Cline x1='750' y1='55' x2='850' y2='100' stroke='%23fff' stroke-width='0.4'/%3E%3Cline x1='150' y1='680' x2='280' y2='750' stroke='%23fff' stroke-width='0.4'/%3E%3Cline x1='770' y1='740' x2='850' y2='740' stroke='%23fff' stroke-width='0.4'/%3E%3Cline x1='320' y1='30' x2='450' y2='45' stroke='%23fff' stroke-width='0.3'/%3E%3Cline x1='550' y1='25' x2='650' y2='40' stroke='%23fff' stroke-width='0.3'/%3E%3Cline x1='400' y1='770' x2='520' y2='745' stroke='%23fff' stroke-width='0.3'/%3E%3Cline x1='520' y1='745' x2='650' y2='760' stroke='%23fff' stroke-width='0.3'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 1000px 800px;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Navbar ─────────────────────────────────────── */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 32px;
  background: rgba(10, 10, 15, 0.92);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
}
.app-header .logo {
  font-family: 'Space Mono', monospace;
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.app-header .logo .brand-prefix { color: var(--text-dim); }
.app-header .logo .brand-accent { color: var(--primary); }
.app-header nav, .nav-menu { display: flex; gap: 2px; }

.nav-link {
  padding: 6px 14px; border-radius: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 12px; font-weight: 400;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-dim); cursor: pointer;
  text-decoration: none; transition: all 0.2s;
  border: none; background: none;
  position: relative;
}
.nav-link:hover { color: var(--text); background: var(--elevate-1); }
.nav-link.active { color: var(--primary); background: rgba(0, 212, 255, 0.1); font-weight: 700; }
.nav-link .inbox-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; font-size: 10px; font-weight: 700;
  background: var(--primary); color: var(--primary-fg);
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

.wallet-btn {
  padding: 8px 18px; border-radius: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: transparent; color: var(--text);
  border: 1px solid var(--button-outline);
  cursor: pointer; transition: 0.2s;
}
.wallet-btn:hover { border-color: var(--primary); color: var(--primary); }

.wallet-addr {
  font-size: 12px; color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  background: var(--muted); padding: 6px 12px; border-radius: 6px;
}

/* ── Container ──────────────────────────────────── */
.main-content {
  flex: 1; max-width: 1536px; margin: 0 auto;
  padding: 32px; width: 100%;
}

/* ── Section Headers ────────────────────────────── */
.section-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
}
.section-dot {
  width: 12px; height: 12px; border-radius: 3px;
  background: var(--primary);
}
.section-title {
  font-family: 'Space Mono', monospace;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text);
}
.section-subtitle {
  font-size: 13px; color: var(--text-dim); margin-bottom: 16px;
}

/* ── Stats Cards ────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card-50);
  border: 1px solid var(--border-50);
  border-radius: 12px; padding: 20px;
  backdrop-filter: blur(8px);
}
.stat-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.stat-icon { color: var(--primary); font-size: 14px; }
.stat-value {
  font-family: 'Space Mono', monospace;
  font-size: 24px; font-weight: 700; color: var(--text);
}
.stat-unit { font-size: 14px; color: var(--text-dim); margin-left: 4px; }

/* ── Profile Card ───────────────────────────────── */
.profile-card {
  background: var(--bg-card-50); border: 1px solid var(--border-50);
  border-radius: 12px; padding: 24px; text-align: center;
  backdrop-filter: blur(8px); margin-bottom: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.profile-card--has-profile {
  flex-direction: row; text-align: left; gap: 16px; align-items: flex-start;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--muted); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Mono', monospace; font-size: 24px;
  color: var(--text-dim); border: 2px solid rgba(0, 212, 255, 0.2);
}
.profile-avatar-img {
  width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; border: 2px solid rgba(0, 212, 255, 0.3);
}
.profile-info { flex: 1; min-width: 0; }
.profile-name {
  font-family: 'Space Mono', monospace;
  font-size: 18px; font-weight: 700; margin-bottom: 2px;
}
.profile-address {
  font-family: 'Space Mono', monospace;
  font-size: 16px; font-weight: 700; margin-bottom: 4px;
}
.profile-address-sub {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--text-dim);
}
.profile-bio {
  font-size: 13px; color: var(--text-dim); margin-top: 6px;
  line-height: 1.4; word-break: break-word;
}
.profile-up-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--primary); text-decoration: none;
  transition: color 0.15s, transform 0.15s;
}
.profile-up-link:hover { color: var(--primary); opacity: 0.8; transform: translateX(2px); }
.profile-up-icon { display: inline-flex; flex-shrink: 0; }
.profile-up-icon-img { width: 16px; height: 16px; }
.profile-full-addr {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: var(--text-dim);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.btn-link {
  background: none; border: none; cursor: pointer;
  color: var(--primary); font-size: 13px; padding: 0;
  font-family: 'Space Mono', monospace;
  text-decoration: underline; text-underline-offset: 3px;
}
.btn-link:hover { opacity: 0.8; }
.profile-add-link { margin-top: 4px; }
.profile-edit-link { flex-shrink: 0; }
.profile-actions {
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end; flex-shrink: 0; margin-top: 4px;
}

/* ── Link Extension Section ──────────────────── */
.link-extension-section {
  background: var(--bg-card-50); border: 1px solid var(--border-50);
  border-radius: 12px; padding: 24px; margin-bottom: 32px;
  backdrop-filter: blur(8px);
}
.link-extension-section .section-header {
  margin-bottom: 8px; display: flex; align-items: center;
}
.link-extension-section .section-title { flex: 1; }
.link-ext-close {
  background: none; border: none; color: var(--text-dim); font-size: 20px;
  cursor: pointer; padding: 0 4px; line-height: 1; opacity: 0.5;
  transition: opacity 0.15s;
}
.link-ext-close:hover { opacity: 1; }
.link-ext-desc {
  font-size: 13px; color: var(--text-dim); margin: 0 0 20px 0;
  line-height: 1.5;
}
.link-ext-steps {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px;
}
.link-ext-step {
  display: flex; align-items: center; gap: 10px; font-size: 13px;
}
.link-ext-step-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: rgba(0, 212, 255, 0.15); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: 'Space Mono', monospace;
}
.link-ext-step a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  padding-bottom: 1px; transition: border-color 0.15s;
}
.link-ext-step a:hover { border-bottom-color: var(--accent); }
.link-ext-detect {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.link-ext-info {
  font-size: 12px; color: var(--text-dim); margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--border-50); line-height: 1.5;
}
.link-ext-info a {
  color: var(--accent); text-decoration: underline; text-underline-offset: 2px;
}
.link-ext-info a:hover { opacity: 0.8; }
.link-extension-section .form-group { max-width: 520px; }
.link-extension-section .form-actions { margin-top: 16px; }

/* ── Import UP Section ───────────────────────── */
.import-toggle {
  margin-bottom: 20px;
}
.import-toggle-btn {
  font-size: 13px; padding: 8px 16px;
  transition: all 0.15s;
}
.import-toggle-btn.active {
  background: rgba(0, 212, 255, 0.15); border-color: var(--accent);
  color: var(--accent);
}
.import-section {
  background: rgba(0, 212, 255, 0.04); border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 10px; padding: 20px; margin-bottom: 20px;
}
.import-desc {
  font-size: 13px; color: var(--text-dim); margin: 0 0 16px 0; line-height: 1.5;
}
.import-detect {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.import-verify-row {
  margin-top: 8px; margin-bottom: 12px;
}
.up-preview {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; margin-top: 16px;
}
.up-preview-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.up-preview-avatar {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border);
}
.up-preview-avatar-placeholder {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: var(--secondary); display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 14px;
  color: var(--text-dim); font-family: 'Space Mono', monospace;
}
.up-preview-name {
  font-weight: 600; font-size: 15px; color: var(--text);
}
.up-preview-addr {
  font-size: 12px; color: var(--text-dim); font-family: 'Space Mono', monospace;
}
.up-preview-bio {
  font-size: 13px; color: var(--text-dim); line-height: 1.4; margin-bottom: 8px;
}
.up-preview-status { margin-top: 8px; }
.up-preview-badge {
  font-size: 11px; padding: 3px 10px; border-radius: 12px;
  font-family: 'Space Mono', monospace;
}
.up-preview-badge--controller {
  background: rgba(34, 197, 94, 0.12); color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.up-preview-badge--info {
  background: rgba(0, 212, 255, 0.1); color: var(--accent);
  border: 1px solid rgba(0, 212, 255, 0.2);
}
.profile-name-row {
  display: flex; align-items: center; gap: 8px;
}
.profile-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  font-family: 'Space Mono', monospace; font-weight: 600;
}
.profile-badge--imported {
  background: rgba(139, 92, 246, 0.12); color: hsl(262 83% 68%);
  border: 1px solid rgba(139, 92, 246, 0.25);
}
.form-actions-inner {
  display: flex; gap: 10px; align-items: center;
}

.form-input--readonly {
  opacity: 0.6; cursor: not-allowed; background: var(--bg-darker, #1a1a2e);
}
.form-hint--chain {
  color: var(--primary); font-style: italic;
}

/* ── Profile Edit Form ────────────────────────── */
.profile-edit-form {
  background: var(--bg-card-50); border: 1px solid var(--border-50);
  border-radius: 12px; padding: 24px; margin-bottom: 32px;
  backdrop-filter: blur(8px);
}
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-dim); margin-bottom: 6px;
  font-family: 'Space Mono', monospace; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border-50); background: var(--bg-dark);
  color: var(--text); font-family: 'Space Mono', monospace;
  font-size: 14px; box-sizing: border-box;
}
.form-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.15);
}
.form-textarea { resize: vertical; min-height: 60px; }
.form-hint { font-size: 12px; color: var(--text-dim); margin: 0; }
.form-error {
  background: rgba(255, 80, 80, 0.1); border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #ff5050;
  margin-top: 12px;
}
.form-actions { display: flex; gap: 10px; margin-top: 20px; }

/* ── Avatar Picker ────────────────────────────── */
.avatar-picker {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px; margin-top: 4px;
  max-height: 200px; overflow-y: auto;
  padding-right: 4px;
}
.avatar-picker::-webkit-scrollbar { width: 4px; }
.avatar-picker::-webkit-scrollbar-track { background: transparent; }
.avatar-picker::-webkit-scrollbar-thumb { background: var(--border-50); border-radius: 2px; }
.avatar-option {
  width: 56px; height: 56px; border-radius: 8px; overflow: hidden;
  cursor: pointer; border: 2px solid var(--border-50);
  transition: border-color 0.15s, transform 0.15s;
}
.avatar-option:hover { border-color: var(--text-dim); transform: scale(1.05); }
.avatar-option--selected {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.25);
}
.avatar-thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ── Dashboard Layout ───────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
.dashboard-main { min-width: 0; }
.dashboard-sidebar { display: flex; flex-direction: column; gap: 24px; }

/* ── Collections Browse Grid ────────────────────── */
.collections-grid {
  display: flex !important; flex-wrap: wrap;
  gap: 8px; margin-top: 12px;
}
.collection-chip {
  display: flex !important; flex-direction: row !important;
  align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border-50);
  border-radius: 20px; padding: 6px 14px 6px 6px;
  transition: all 0.2s ease; cursor: pointer;
  flex-shrink: 0; max-width: 200px;
}
.collection-chip:hover {
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.08);
}
.collection-chip-icon {
  width: 28px; height: 28px; min-width: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), #c77800);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; color: var(--bg-body);
  flex-shrink: 0;
}
.collection-chip-name {
  font-weight: 600; font-size: 13px; color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browse-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-dim); font-size: 12px;
  text-transform: uppercase; letter-spacing: 1px;
}
.browse-divider::before, .browse-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-50);
}

/* ── NFT Grid ───────────────────────────────────── */
.nft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin-top: 16px;
}

/* ── Pagination ─────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 20px; padding: 12px 0;
}
.pagination-btn {
  background: var(--bg-card); border: 1px solid var(--border-50);
  color: var(--text-main); padding: 8px 16px; border-radius: 8px;
  cursor: pointer; font-size: 13px; transition: all 0.2s ease;
}
.pagination-btn:hover:not(:disabled) { border-color: var(--amber); color: var(--amber); }
.pagination-btn:disabled { opacity: 0.3; cursor: default; }
.pagination-info { color: var(--text-dim); font-size: 13px; }

/* ── NFT Card ───────────────────────────────────── */
.nft-card {
  background: var(--bg-card); border: 1px solid var(--border-50);
  border-radius: 12px; overflow: hidden; cursor: pointer;
  transition: all 0.2s ease;
}
.nft-card:hover {
  border-color: rgba(0, 212, 255, 0.5);
  transform: translateY(-4px);
}
.nft-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
  background: rgba(0, 212, 255, 0.03);
}
.nft-card-image {
  position: relative; width: 100%; aspect-ratio: 1;
  overflow: hidden; background: var(--bg-hover);
}
.nft-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.nft-card:hover .nft-card-image img { transform: scale(1.05); }
.nft-rank {
  position: absolute; top: 8px; right: 8px;
  padding: 2px 8px; border-radius: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 10px; font-weight: 700;
  background: hsla(24, 18%, 5%, 0.85);
  color: var(--text-dim); border: 1px solid var(--border-50);
  backdrop-filter: blur(4px);
}
.nft-placeholder {
  width: 100%; aspect-ratio: 1; background: var(--bg-hover);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: var(--text-dim);
  font-family: 'Space Mono', monospace;
}
.nft-info { padding: 12px 14px; }
.nft-collection-label {
  font-size: 10px; color: var(--text-dim);
  letter-spacing: 0.03em; margin-bottom: 2px;
}
.nft-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nft-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-top: 1px solid var(--border-50);
}
.nft-floor-label { font-size: 10px; color: var(--text-dim); }
.nft-floor-value {
  font-family: 'Space Mono', monospace;
  font-size: 13px; font-weight: 700; color: var(--primary);
}
.nft-id {
  font-size: 11px; color: var(--text-dim);
  font-family: 'Space Mono', monospace;
}

/* ── Collection Breakdown ───────────────────────── */
.collection-card {
  background: var(--bg-card-50); border: 1px solid var(--border-50);
  border-radius: 12px; padding: 20px; backdrop-filter: blur(8px);
}
.collection-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border-50);
}
.collection-item:last-child { border-bottom: none; }
.collection-icon {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--muted); display: flex; align-items: center;
  justify-content: center; font-family: 'Space Mono', monospace;
  font-size: 11px; font-weight: 700; color: var(--text-dim);
  flex-shrink: 0;
}
.collection-name { font-size: 13px; font-weight: 500; }
.collection-count { font-size: 11px; color: var(--text-dim); }
.collection-floor { margin-left: auto; text-align: right; }
.collection-floor-value {
  font-family: 'Space Mono', monospace;
  font-size: 13px; font-weight: 700; color: var(--text);
}
.collection-floor-label {
  font-size: 10px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ── Activity Feed ──────────────────────────────── */
.activity-card {
  background: var(--bg-card-50); border: 1px solid var(--border-50);
  border-radius: 12px; padding: 20px; backdrop-filter: blur(8px);
}
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border-50);
  position: relative;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.activity-text { font-size: 13px; line-height: 1.4; }
.activity-date {
  font-family: 'Space Mono', monospace;
  font-size: 10px; color: var(--text-dim);
  letter-spacing: 0.03em;
}

/* ── Trade Cards ────────────────────────────────── */
.trade-card {
  background: var(--bg-card); border: 1px solid var(--border-50);
  border-radius: 12px; padding: 20px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 20px;
}
.trade-arrow {
  font-family: 'Space Mono', monospace;
  font-size: 20px; color: var(--primary);
}
.trade-nft { text-align: center; }
.trade-nft img {
  width: 80px; height: 80px; border-radius: 8px;
  object-fit: cover; border: 1px solid var(--border-50);
}
.trade-actions { margin-left: auto; display: flex; gap: 8px; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  padding: 8px 18px; border-radius: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  border: none; cursor: pointer; transition: 0.2s;
}
.btn-primary {
  background: var(--primary); color: var(--primary-fg);
  border: 1px solid rgba(0, 212, 255, 0.3);
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-success {
  background: rgba(34, 197, 94, 0.1); color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.btn-success:hover { background: rgba(34, 197, 94, 0.2); }
.btn-danger {
  background: rgba(220, 38, 38, 0.1); color: hsl(0 65% 55%);
  border: 1px solid rgba(220, 38, 38, 0.2);
}
.btn-danger:hover { background: rgba(220, 38, 38, 0.2); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--button-outline);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Input ────────────────────────────────────────── */
.input-field {
  width: 100%; padding: 10px 14px; border-radius: 6px;
  font-family: 'Space Mono', monospace; font-size: 13px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text); outline: none;
}
.input-field:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.input-field::placeholder { color: var(--text-dim); }

/* ── Steps ────────────────────────────────────────── */
.step-indicator { display: flex; gap: 8px; margin-bottom: 24px; }
.step {
  padding: 6px 14px; border-radius: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border-50);
}
.step.active {
  background: rgba(0, 212, 255, 0.08);
  color: var(--primary); border-color: rgba(0, 212, 255, 0.3);
}
.step.done {
  background: rgba(34, 197, 94, 0.08);
  color: var(--success); border-color: rgba(34, 197, 94, 0.2);
}

/* ── Status Badges ────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.badge-open {
  background: rgba(234, 179, 8, 0.1); color: hsl(45 100% 50%);
  border: 1px solid rgba(234, 179, 8, 0.2);
}
.badge-executed {
  background: rgba(34, 197, 94, 0.1); color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.badge-cancelled {
  background: rgba(220, 38, 38, 0.1); color: hsl(0 65% 55%);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* ── Fee Badge ────────────────────────────────────── */
.fee-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.03em;
}
.fee-badge.exempt {
  background: rgba(34, 197, 94, 0.08); color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.fee-badge.standard {
  background: rgba(0, 212, 255, 0.08); color: var(--primary);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

/* ── Loading / Empty State ─────────────────────────── */
.loading { text-align: center; padding: 60px; color: var(--text-dim); }
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center; padding: 80px 20px; color: var(--text-dim);
  border: 1px dashed var(--border-50); border-radius: 12px;
  background: rgba(255,255,255,0.01);
}
.empty-state .icon {
  font-size: 48px; margin-bottom: 12px; opacity: 0.5;
}
.empty-state p {
  font-size: 13px; max-width: 300px; margin: 0 auto;
  line-height: 1.5;
}

/* ── Footer ───────────────────────────────────────── */
.app-footer {
  padding: 0 32px; height: 56px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Space Mono', monospace;
  font-size: 10px; color: var(--text-dim);
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* ── Review Panel ─────────────────────────────────── */
.review-panel {
  background: var(--bg-card); border: 1px solid var(--border-50);
  border-radius: 12px; padding: 24px; margin-top: 16px;
}
.review-pair {
  display: flex; align-items: center; justify-content: center;
  gap: 40px; margin: 24px 0;
}
.review-nft { text-align: center; }
.review-nft img {
  width: 120px; height: 120px; border-radius: 12px;
  object-fit: cover; border: 1px solid var(--border-50);
}
.review-nft .nft-name { margin-top: 8px; font-weight: 600; font-size: 13px; }

/* ── Inbox Offer Card ─────────────────────────────── */
.inbox-card {
  background: var(--bg-card); border: 1px solid var(--border-50);
  border-radius: 12px; padding: 20px; margin-bottom: 16px;
}
.inbox-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.inbox-from {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--text-dim);
}

/* (Responsive rules moved to bottom of file) */

/* ── Chat ──────────────────────────────────────── */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 80px);
  max-width: 820px;
  margin: 0 auto;
}
.chat-active-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.chat-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-logo {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.chat-title {
  font-family: 'Space Mono', monospace;
  font-weight: 700; color: var(--text);
}
.chat-subtitle {
  font-size: 12px; color: var(--text-dim);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 85%;
}
.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-msg.assistant { align-self: flex-start; }
.msg-avatar {
  width: 32px; height: 32px; min-width: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg.assistant .msg-bubble {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
.chat-msg.user .msg-bubble {
  background: var(--primary);
  color: var(--bg);
  font-weight: 500;
}
.chat-msg.streaming .msg-bubble {
  border-color: var(--primary);
}
.cursor {
  display: inline-block;
  width: 2px; height: 14px;
  background: var(--primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.tunking-typewriter {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--primary);
  max-width: 0;
  animation: tunking-type 2.5s steps(15, end) infinite;
  font-style: italic;
  opacity: 0.85;
}
@keyframes tunking-type {
  0% { max-width: 0; }
  40%, 70% { max-width: 15ch; }
  85%, 100% { max-width: 0; }
}
.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.chat-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--primary); }
.chat-input::placeholder { color: var(--text-dim); }
.chat-input:disabled { opacity: 0.5; }
.chat-send-btn {
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: var(--bg);
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.chat-send-btn:hover { opacity: 0.9; }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-stop-btn {
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.chat-stop-btn:hover { background: var(--primary); color: var(--bg); }
.spinner-small {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--bg);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Token Market ─────────────────────────────────── */
.token-market { max-width: 1200px; margin: 0 auto; }
.market-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 20px; flex-wrap: wrap;
}
.market-count {
  font-size: 12px; color: var(--text-dim);
  font-family: 'Space Mono', monospace;
}
.market-search {
  display: flex; gap: 8px; align-items: center;
}
.market-search .input-field { width: 280px; }

/* Sort tabs */
.sort-tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border-50); padding-bottom: 12px;
}
.sort-tab {
  padding: 6px 14px; border-radius: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-dim); cursor: pointer;
  border: none; background: none; transition: all 0.2s;
}
.sort-tab:hover { color: var(--text); background: var(--elevate-1); }
.sort-tab.active { color: var(--primary); background: rgba(0, 212, 255, 0.08); }

/* Token table */
.token-table { display: flex; flex-direction: column; gap: 2px; }
.token-row {
  display: grid;
  grid-template-columns: 40px 2fr 1fr 1fr 1fr 80px;
  align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 8px;
  cursor: pointer; transition: background 0.15s;
}
.token-row:hover { background: var(--elevate-1); }
.token-row.header {
  font-family: 'Space Mono', monospace;
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); cursor: default;
  border-bottom: 1px solid var(--border-50);
  padding-bottom: 10px; margin-bottom: 4px;
}
.token-row.header:hover { background: none; }

.col-rank {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--text-dim); text-align: center;
}
.col-name { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.token-name-col { display: flex; flex-direction: column; gap: 2px; }
.token-logo-sm {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: var(--elevate-2); border: 1.5px solid var(--elevate-2);
}
.token-logo-sm.token-logo-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 13px; font-weight: 700; color: var(--amber);
}
.token-symbol {
  font-family: 'Space Mono', monospace;
  font-size: 13px; font-weight: 700; color: var(--text);
}
.token-name { font-size: 11px; color: var(--text-dim); }
.col-price, .col-mcap, .col-volume {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--text);
}
.col-trades {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--text-dim); text-align: right;
}

/* ── Token Detail ─────────────────────────────────── */
.token-detail { max-width: 1100px; margin: 0 auto; }
.back-btn { margin-bottom: 16px; }

/* ── CMC-style Detail Header ── */
.detail-header-v2 { margin-bottom: 24px; }
.detail-header-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; flex-wrap: wrap;
}
.detail-header-left { flex: 1; min-width: 0; }
.detail-name-row {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 8px;
}
.token-logo-lg {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: var(--elevate-2); border: 2px solid var(--elevate-2);
}
.token-logo-lg.token-logo-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 18px; font-weight: 700; color: var(--amber);
}
.detail-title {
  font-family: 'Space Mono', monospace;
  font-size: 24px; font-weight: 700; color: var(--text);
}
.detail-symbol {
  font-family: 'Space Mono', monospace;
  font-size: 16px; color: var(--text-dim); font-weight: 600;
}
.detail-rank {
  display: inline-block; padding: 2px 8px;
  border-radius: 6px; background: var(--elevate-2);
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: var(--text-dim); font-weight: 600;
}
.detail-meta-row {
  display: flex; flex-direction: column; gap: 4px;
}
.detail-contract {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-dim);
}
.contract-label {
  display: inline-block; padding: 1px 6px;
  border-radius: 4px; background: var(--elevate-1);
  font-family: 'Space Mono', monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim);
}
.contract-addr {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--primary); text-decoration: none;
}
.contract-addr:hover { text-decoration: underline; }
.copy-btn {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; border: 1px solid var(--border);
  background: var(--elevate-1); cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 10px; color: var(--text-dim);
  transition: all 0.15s;
}
.copy-btn:hover { background: var(--elevate-2); color: var(--text); }
.copy-btn.copied { background: rgba(76, 175, 80, 0.15); color: var(--success); border-color: var(--success); }
.detail-links {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-dim);
}
.detail-links a {
  color: var(--primary); text-decoration: none;
  font-family: 'Space Mono', monospace;
}
.detail-links a:hover { text-decoration: underline; }
.detail-link-btn {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; border: 1px solid rgba(0, 212, 255, 0.25);
  background: rgba(0, 212, 255, 0.06);
  font-size: 11px !important;
}
.detail-link-sep { color: var(--border); }

/* Price display */
.detail-header-right { text-align: right; flex-shrink: 0; }
.detail-price-lg {
  font-family: 'Space Mono', monospace;
  font-size: 28px; font-weight: 700; color: var(--text);
  margin-bottom: 4px;
}
.price-change {
  font-family: 'Space Mono', monospace;
  font-size: 13px; font-weight: 600;
}
.price-change.up { color: var(--success); }
.price-change.down { color: var(--danger); }
.price-change.neutral { color: var(--text-dim); }

/* Detail stats grid */
.detail-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 32px;
}
.detail-stat {
  background: var(--bg-card-50); border: 1px solid var(--border-50);
  border-radius: 10px; padding: 16px;
}
.detail-stat .stat-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 6px;
}
.detail-stat .stat-value {
  font-family: 'Space Mono', monospace;
  font-size: 18px; font-weight: 700; color: var(--text);
}

/* ── Chart + Swap Side by Side ── */
.detail-chart-swap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 28px;
  align-items: start;
}
.detail-chart-col { min-width: 0; }
/* (moved to bottom responsive section) */

/* ── DEX Swap Panel ── */
.swap-panel {
  background: rgba(30, 25, 20, 0.7);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.swap-toggle {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 3px;
}
.swap-tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.swap-tab:hover { color: var(--text); }
.swap-tab.active.buy {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
}
.swap-tab.active.sell {
  background: rgba(244, 67, 54, 0.15);
  color: #f44336;
}

.swap-input-group, .swap-output-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.swap-input-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.swap-input-row, .swap-output-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px;
  transition: border-color 0.2s;
}
.swap-input-row:focus-within {
  border-color: rgba(0, 212, 255, 0.4);
}
.swap-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
}
.swap-input::placeholder { color: #5a5049; }
.swap-input::-webkit-inner-spin-button,
.swap-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.swap-input[type=number] { -moz-appearance: textfield; }

.swap-input-unit {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.swap-output-row {
  background: rgba(255,255,255,0.02);
  border-style: dashed;
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  min-height: 54px;
}

.swap-arrow {
  text-align: center;
  font-size: 18px;
  color: var(--text-dim);
  margin: -4px 0;
}

/* Slippage */
.swap-slippage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.slippage-label {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}
.slippage-options {
  display: flex;
  gap: 4px;
}
.slippage-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.slippage-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.slippage-btn.active {
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--primary);
}

/* Swap execute button */
.swap-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.swap-btn.buy {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}
.swap-btn.buy:hover {
  background: rgba(76, 175, 80, 0.3);
}
.swap-btn.sell {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.3);
}
.swap-btn.sell:hover {
  background: rgba(244, 67, 54, 0.3);
}
.swap-btn.submitting {
  opacity: 0.6;
  cursor: wait;
  background: rgba(255,255,255,0.06);
  color: var(--text-dim);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Detail section */
.detail-section { margin-top: 8px; }
.detail-section .section-title { margin-bottom: 16px; }

/* About section */
.detail-about {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 16px;
}
.about-text {
  color: #b5a898;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Trade list (in detail + feed) */
.trade-list, .feed-list { display: flex; flex-direction: column; gap: 4px; }
.trade-row, .feed-row {
  display: grid; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border-50);
  transition: background 0.15s;
}
.trade-row { grid-template-columns: 60px 1fr 1fr 100px 80px; }
.feed-row {
  grid-template-columns: 60px 1fr 1fr 100px 80px;
  cursor: pointer;
}
.trade-row:hover, .feed-row:hover { background: var(--elevate-1); }
.trade-row.buy, .feed-row.buy { border-left: 3px solid var(--success); }
.trade-row.sell, .feed-row.sell { border-left: 3px solid var(--danger); }

.trade-type {
  font-family: 'Space Mono', monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em;
}
.trade-type.buy { color: var(--success); }
.trade-type.sell { color: var(--danger); }

.feed-token, .feed-trader, .trade-trader {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--text-dim);
}
.feed-amount, .trade-amount {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--text); font-weight: 600;
}
.trade-tokens {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: var(--text-dim);
}
.feed-time, .trade-time {
  font-family: 'Space Mono', monospace;
  font-size: 10px; color: var(--text-dim); text-align: right;
}

/* ── Live Feed ────────────────────────────────────── */
.live-feed { max-width: 1000px; margin: 0 auto; }
.feed-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.feed-subtitle {
  font-size: 12px; color: var(--text-dim); margin-top: 4px;
}
.feed-controls { display: flex; gap: 8px; }

/* (Responsive token UI moved to bottom) */

/* ── Paywall Gate (Premium) ──────────────────────── */
.paywall-backdrop {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 20px;
}

.paywall-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px 32px;
  text-align: center;
  overflow: hidden;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.3),
    0 0 0 1px rgba(0, 212, 255, 0.06);
}

.paywall-glow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 3px;
  background: linear-gradient(90deg,
    transparent,
    var(--primary) 30%,
    hsl(38 100% 70%) 50%,
    var(--primary) 70%,
    transparent
  );
  border-radius: 0 0 4px 4px;
}

/* Avatar */
.paywall-identity {
  position: relative;
  width: 88px; height: 88px;
  margin: 0 auto 16px;
}
.paywall-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg-hover);
  box-shadow: 0 0 0 4px var(--bg-card), 0 0 20px rgba(0, 212, 255, 0.12);
}
.paywall-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.paywall-status-dot {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--success);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

/* Identity text */
.paywall-name {
  font-family: 'Space Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.paywall-role {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.paywall-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* Feature list */
.paywall-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin-bottom: 24px;
}
.paywall-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.3;
}
.feature-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}

/* Price */
.paywall-price {
  margin-bottom: 16px;
  padding: 12px 0;
}
.price-amount {
  font-family: 'Space Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}
.price-token {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.8;
}
.price-per {
  font-size: 13px;
  color: var(--text-dim);
}

/* Balance */
.paywall-balance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-50);
  margin-bottom: 20px;
  font-size: 13px;
}
.balance-label { color: var(--text-dim); }
.balance-value {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--text);
}
.balance-token { color: var(--text-dim); }
.balance-badge {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
}
.balance-badge.sufficient {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.balance-badge.insufficient {
  background: rgba(220, 38, 38, 0.1);
  color: hsl(0 65% 55%);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.balance-loading {
  color: var(--text-dim);
  font-size: 13px;
}
.loading-dots::after {
  content: '';
  animation: loadDots 1.5s steps(4, end) infinite;
}
@keyframes loadDots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
}

/* Error */
.paywall-error {
  font-size: 12px;
  color: hsl(0 65% 55%);
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

/* CTA button */
.paywall-cta {
  width: 100%;
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary), hsl(32 100% 50%));
  color: var(--primary-fg);
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.2);
}
.paywall-cta:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.35);
  filter: brightness(1.08);
}
.paywall-cta:active:not(:disabled) {
  transform: translateY(0);
}
.paywall-cta:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}
.paywall-cta.activating {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-dim);
  box-shadow: none;
}

.cta-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Footer */
.paywall-footer {
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.7;
}

/* ── Coming Soon Page ── */
.coming-soon-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 40px 20px;
}
.coming-soon-card {
  text-align: center;
  padding: 60px 40px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: var(--bg-card-50);
  backdrop-filter: blur(8px);
  max-width: 420px;
}
.coming-soon-icon {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0.6;
}
.coming-soon-title {
  font-family: 'Space Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.coming-soon-subtitle {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 24px;
}
.coming-soon-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.08);
  color: var(--primary);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

/* Nav "Soon" badge */
.nav-soon { opacity: 0.5; }
.soon-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(0, 212, 255, 0.15);
  color: var(--primary);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ── Token Price Chart ─────────────────────────────── */
.token-chart-container {
  margin-bottom: 24px;
  border: 1px solid var(--border-50);
  border-radius: 12px;
  background: var(--bg-card-50);
  overflow: hidden;
}
.chart-timerange {
  display: flex; gap: 4px;
  padding: 12px 16px 0;
}
.chart-timerange-btn {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s;
}
.chart-timerange-btn:hover {
  background: var(--elevate-1);
  color: var(--text);
}
.chart-timerange-btn.active {
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--primary);
}
.chart-area {
  width: 100%;
  height: 300px;
  padding: 8px 0;
}

/* (Chart responsive moved to bottom) */

/* ═══════════════════════════════════════════
   Fee Transparency Bar (Market Page)
   ═══════════════════════════════════════════ */
.fee-transparency-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  flex-wrap: wrap;
}
.fee-bar-item { display: flex; gap: 4px; align-items: center; }
.fee-bar-label { color: #7a7069; }
.fee-bar-value { color: #00d4ff; font-weight: 600; font-family: 'Space Mono', monospace; }
.fee-bar-sep { color: rgba(255,255,255,0.1); }
.fee-bar-link { color: #00d4ff; text-decoration: none; font-family: 'Space Mono', monospace; }
.fee-bar-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════
   Launch Page — Mode Switcher
   ═══════════════════════════════════════════ */
.launch-page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
}
.launch-mode-switcher {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 16px 20px 0;
  margin-bottom: 0;
}
.launch-mode-btn {
  padding: 10px 32px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 0;
}
.launch-mode-btn:first-child { border-radius: 8px 0 0 8px; }
.launch-mode-btn:last-child { border-radius: 0 8px 8px 0; }
.launch-mode-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.launch-mode-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 700;
}

/* ═══════════════════════════════════════════
   Collection Mint Section
   ═══════════════════════════════════════════ */
.collection-mint-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.mint-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.collection-mint-title {
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  color: var(--text-primary);
  margin: 0;
}
.mint-mode-switcher {
  display: flex;
  gap: 2px;
}
.mint-mode-btn {
  padding: 5px 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.mint-mode-btn:first-child { border-radius: 6px 0 0 6px; }
.mint-mode-btn:last-child { border-radius: 0 6px 6px 0; }
.mint-mode-btn:hover { background: var(--bg-hover); }
.mint-mode-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 700;
}
.collection-mint-form { display: flex; flex-direction: column; gap: 12px; }
.mint-form-row { display: flex; gap: 16px; align-items: flex-start; }

/* Batch mint */
.batch-add-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.batch-hint {
  color: var(--text-secondary);
  font-size: 13px;
}
.batch-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-hover);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.batch-item-preview {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}
.batch-item-preview img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
}
.batch-item-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-input-sm {
  padding: 6px 10px !important;
  font-size: 13px !important;
}
.btn-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.btn-remove:hover { background: #ff4444; color: #fff; border-color: #ff4444; }
.batch-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}
.batch-progress {
  color: var(--accent);
  font-size: 13px;
  font-family: 'Space Mono', monospace;
}
.mint-image-upload {
  width: 120px;
  height: 120px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.mint-image-upload:hover { border-color: var(--accent); }
.mint-image-preview {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.mint-image-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.mint-form-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.success-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════
   Launch Page — Community Takeover
   ═══════════════════════════════════════════ */
.launch-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

/* ── Hero Section ── */
.launch-hero {
  text-align: center;
  margin-bottom: 40px;
  padding: 48px 24px 40px;
  background: linear-gradient(180deg, rgba(0,212,255,0.06) 0%, transparent 100%);
  border-radius: 20px;
  border: 1px solid rgba(0,212,255,0.08);
}
.launch-hero-inner {
  max-width: 700px;
  margin: 0 auto;
}
.launch-hero-badge {
  display: inline-block;
  background: rgba(0,212,255,0.12);
  color: #00d4ff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(0,212,255,0.2);
  margin-bottom: 20px;
}
.launch-hero-title {
  font-size: 32px;
  font-weight: 800;
  color: #e8e0d8;
  margin: 0 0 20px;
  letter-spacing: -0.5px;
}
.launch-hero-text {
  color: #8a7e74;
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 14px;
}
.launch-hero-text:last-child { margin-bottom: 0; }
.launch-hero-text.highlight {
  color: #c4b8aa;
  font-weight: 500;
}
.launch-hero-text strong {
  color: #00d4ff;
  font-weight: 600;
}

/* ── Two Column Layout ── */
.launch-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
/* (Launch responsive moved to bottom) */

/* ── Info Cards (Left Column) ── */
.launch-info-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.launch-card {
  background: rgba(30, 25, 20, 0.6);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 24px;
}
.launch-card.safe {
  border-color: rgba(76,175,80,0.15);
  background: rgba(76,175,80,0.03);
}
.launch-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #00d4ff;
  margin: 0 0 14px;
  letter-spacing: -0.2px;
}
.launch-card-note {
  color: #7a7069;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 16px;
}

/* How It Works Steps */
.launch-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.launch-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,212,255,0.1);
  color: #00d4ff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.2);
}
.step-title {
  font-size: 14px;
  font-weight: 600;
  color: #e8e0d8;
  margin-bottom: 2px;
}
.step-desc {
  font-size: 13px;
  color: #7a7069;
  line-height: 1.5;
}

/* ── Fee Grid ── */
.fee-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.fee-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.fee-card.good {
  border-color: rgba(76,175,80,0.2);
  background: rgba(76,175,80,0.04);
}
.fee-card.warn {
  border-color: rgba(0,212,255,0.15);
  background: rgba(0,212,255,0.04);
}
.fee-card-value {
  font-size: 22px;
  font-weight: 700;
  color: #e8e0d8;
  font-family: 'Space Mono', monospace;
  margin-bottom: 4px;
}
.fee-card.good .fee-card-value { color: #4caf50; }
.fee-card.warn .fee-card-value { color: #00d4ff; }
.fee-card-label {
  font-size: 11px;
  color: #7a7069;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Fee Addresses */
.fee-addresses {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fee-addr-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
}
.fee-addr-label {
  color: #7a7069;
  font-weight: 500;
}
.fee-addr-value {
  color: #00d4ff;
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
}
.fee-addr-value:hover { text-decoration: underline; }

/* ── Safety List ── */
.safe-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.safe-item {
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 14px 10px 38px;
  border-radius: 8px;
  position: relative;
}
.safe-item::before {
  position: absolute;
  left: 12px;
  top: 10px;
  font-size: 14px;
}
.safe-item.ok {
  color: #b8d4ba;
  background: rgba(76,175,80,0.05);
}
.safe-item.ok::before { content: "\2713"; color: #4caf50; }
.safe-item.warn {
  color: #d4c4a8;
  background: rgba(0,212,255,0.05);
}
.safe-item.warn::before { content: "\26A0"; color: #00d4ff; font-size: 12px; }

/* ── Form Column (Right) ── */
.launch-form-col {
  position: sticky;
  top: 80px;
}
.launch-form-card {
  background: rgba(30, 25, 20, 0.7);
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: 16px;
  padding: 28px;
}
.launch-form-title {
  font-size: 20px;
  font-weight: 700;
  color: #e8e0d8;
  margin: 0 0 20px;
}

/* Form (shared) */
.create-token-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #a89888;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.form-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px 14px;
  color: #e8e0d8;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: rgba(0, 212, 255, 0.4);
}
.form-input::placeholder { color: #5a5049; }
.form-hint {
  font-size: 11px;
  color: #5a5049;
}

.form-info-box {
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-info-item {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}
.form-info-item strong {
  color: var(--primary);
}

.form-error {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.2);
  color: #f44336;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.form-success {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.2);
  color: #4caf50;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}

/* ── Image Upload ── */
.image-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-height: 120px;
  background: rgba(255,255,255,0.02);
}
.image-upload-area:hover {
  border-color: rgba(0,212,255,0.3);
  background: rgba(0,212,255,0.03);
}
.image-upload-area.has-image {
  border-style: solid;
  border-color: rgba(0,212,255,0.2);
  padding: 12px;
}
.image-upload-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.4;
}
.image-upload-text {
  font-size: 13px;
  color: #7a7069;
}
.image-upload-text strong {
  color: #00d4ff;
}
.image-upload-hint {
  font-size: 11px;
  color: #5a5049;
  margin-top: 4px;
}
.image-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0,212,255,0.2);
}
.image-preview-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.image-preview-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.image-preview-name {
  font-size: 13px;
  color: #e8e0d8;
  font-weight: 500;
}
.image-preview-change {
  font-size: 12px;
  color: #00d4ff;
  cursor: pointer;
}
.image-preview-change:hover { text-decoration: underline; }

.btn-launch {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  margin-top: 8px;
}
.btn-launch.submitting {
  opacity: 0.6;
  cursor: wait;
}

.connect-prompt {
  text-align: center;
  color: #7a7069;
  padding: 16px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px dashed rgba(255,255,255,0.08);
}

/* Fee Transparency Bar (Market Page) */
.fee-transparency-bar {
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}
.loading-text {
  color: #5a5049;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVE — Full UI Optimization
   ═══════════════════════════════════════════════════════ */

/* ── Hamburger Button (hidden on desktop) ── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; padding: 6px;
  z-index: 60;
}
.hamburger-line {
  display: block;
  width: 100%; height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger-btn.open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger-btn.open .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger-btn.open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Nav overlay backdrop ── */
.nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 40;
  opacity: 0; transition: opacity 0.3s;
}
.nav-overlay.active { opacity: 1; }

/* ── Wallet area class ── */
.header-wallet {
  display: flex; align-items: center; gap: 10px;
}

/* ════════════════════════════════════════════
   Tablet (max-width: 1024px)
   ════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-chart-swap { grid-template-columns: 1fr; }
  .launch-columns { grid-template-columns: 1fr; }
  .launch-form-col { position: static; }
}

/* ════════════════════════════════════════════
   Mobile Nav Breakpoint (max-width: 768px)
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Show hamburger */
  .hamburger-btn { display: flex; }

  /* Nav drawer */
  .nav-menu {
    position: fixed;
    top: 0; right: -280px;
    width: 280px; height: 100vh;
    background: var(--bg);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 72px 20px 24px;
    gap: 4px;
    z-index: 55;
    transition: right 0.3s ease;
    overflow-y: auto;
  }
  .nav-menu.open { right: 0; }
  .nav-overlay.active { display: block; }

  .nav-link {
    padding: 12px 14px;
    font-size: 13px;
    width: 100%;
    text-align: left;
    border-radius: 8px;
  }
  .nav-link.active {
    background: rgba(0, 212, 255, 0.1);
  }

  /* Header layout */
  .app-header {
    padding: 0 16px;
    gap: 8px;
  }

  /* Hide wallet on very small headers, show in nav drawer */
  .header-wallet { display: none; }

  /* Main content */
  .main-content { padding: 16px; }

  /* Footer */
  .app-footer { padding: 0 16px; font-size: 9px; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 20px; }

  /* NFT Grid */
  .nft-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .nft-card:hover { transform: none; } /* disable hover lift on touch */

  /* Token Market */
  .market-header { flex-direction: column; gap: 12px; }
  .market-search { width: 100%; }
  .market-search .input-field { width: 100%; flex: 1; }
  .sort-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .sort-tab { white-space: nowrap; flex-shrink: 0; }
  .token-row { grid-template-columns: 30px 1.5fr 1fr 80px; gap: 8px; padding: 10px 12px; }
  .token-row .col-volume, .token-row .col-trades { display: none; }
  .col-price, .col-mcap { font-size: 11px; }

  /* Token Detail */
  .detail-header-top { flex-direction: column; gap: 12px; }
  .detail-header-right { text-align: left; }
  .detail-price-lg { font-size: 22px; }
  .detail-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .detail-stat { padding: 12px; }
  .detail-stat .stat-value { font-size: 16px; }
  .detail-title { font-size: 20px; }
  .chart-area { height: 220px; }
  .chart-timerange { flex-wrap: wrap; gap: 6px; }

  /* Trade/Feed rows */
  .trade-row, .feed-row { grid-template-columns: 50px 1fr 80px 60px; gap: 8px; padding: 8px 10px; }
  .trade-row .trade-tokens, .feed-row .feed-trader { display: none; }

  /* Chat */
  .chat-container { height: calc(100vh - 72px); }
  .chat-messages { padding: 12px; gap: 12px; }
  .chat-msg { max-width: 95%; }
  .chat-header { padding: 12px 16px; }
  .chat-input-area { padding: 10px 12px; gap: 6px; }
  .chat-input { padding: 10px 12px; font-size: 14px; }
  .chat-send-btn { padding: 10px 14px; font-size: 12px; }
  .chat-stop-btn { padding: 10px 14px; font-size: 12px; }

  /* Swap panel */
  .swap-panel { padding: 16px; }
  .swap-input { font-size: 18px; }
  .swap-output-row { font-size: 18px; }

  /* Paywall */
  .paywall-card { padding: 28px 20px 24px; }
  .paywall-name { font-size: 16px; }
  .price-amount { font-size: 24px; }

  /* Launch page */
  .launch-page { padding: 20px 16px 32px; }
  .launch-hero { padding: 32px 16px 28px; }
  .launch-hero-title { font-size: 24px; }
  .launch-hero-text { font-size: 14px; }
  .launch-card { padding: 18px; }
  .launch-form-card { padding: 20px; }
  .fee-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .fee-card-value { font-size: 18px; }

  /* Coming soon */
  .coming-soon-card { padding: 40px 24px; }
  .coming-soon-title { font-size: 18px; }

  /* Dashboard */
  .dashboard-sidebar { order: -1; }

  /* Profile */
  .profile-card { padding: 16px; }
  .profile-card--has-profile { flex-direction: column; text-align: center; align-items: center; }
  .profile-avatar { width: 64px; height: 64px; font-size: 20px; }
  .profile-avatar-img { width: 64px; height: 64px; }
  .profile-address { font-size: 14px; }
  .avatar-option { width: 48px; height: 48px; }

  /* Review panel */
  .review-pair { gap: 20px; flex-wrap: wrap; }
  .review-nft img { width: 90px; height: 90px; }

  /* Fee transparency bar */
  .fee-transparency-bar { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 14px; font-size: 11px; }
}

/* ════════════════════════════════════════════
   Small phones (max-width: 480px)
   ════════════════════════════════════════════ */
@media (max-width: 480px) {
  .main-content { padding: 12px; }

  /* Stats single column on tiny screens */
  .stats-grid { grid-template-columns: 1fr; }

  /* NFT grid 2-col */
  .nft-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .nft-info { padding: 8px 10px; }
  .nft-name { font-size: 12px; }
  .nft-footer { padding: 6px 10px; }

  /* Token market — card-like layout */
  .token-row {
    grid-template-columns: 24px 1fr 1fr;
    gap: 6px; padding: 10px;
  }
  .token-row .col-mcap { display: none; }
  .token-logo-sm { width: 24px; height: 24px; }
  .token-symbol { font-size: 12px; }
  .token-name { font-size: 10px; }
  .col-price { font-size: 11px; }
  .col-rank { font-size: 11px; }

  /* Detail stats single column */
  .detail-stats { grid-template-columns: 1fr; }
  .detail-price-lg { font-size: 20px; }
  .detail-title { font-size: 18px; }
  .detail-symbol { font-size: 14px; }
  .chart-area { height: 180px; }

  /* Trade/feed simplified */
  .trade-row, .feed-row {
    grid-template-columns: 40px 1fr 70px;
    gap: 6px; padding: 8px;
  }
  .trade-row .trade-amount, .feed-row .feed-amount { display: none; }
  .trade-type, .feed-token { font-size: 10px; }
  .feed-time, .trade-time { font-size: 9px; }

  /* Chat full screen feel */
  .chat-container { height: calc(100vh - 64px); }
  .msg-bubble { padding: 8px 12px; font-size: 13px; }
  .msg-avatar { width: 28px; height: 28px; min-width: 28px; }
  .chat-input-area { padding: 8px; }

  /* Swap panel */
  .swap-input { font-size: 16px; }
  .swap-output-row { font-size: 16px; min-height: 48px; }
  .swap-btn { padding: 12px; font-size: 14px; }

  /* Paywall */
  .paywall-card { padding: 24px 16px 20px; border-radius: 16px; }
  .paywall-identity { width: 72px; height: 72px; }
  .paywall-avatar { width: 72px; height: 72px; }
  .price-amount { font-size: 22px; }
  .paywall-cta { padding: 12px 20px; font-size: 13px; }

  /* Launch */
  .launch-hero-title { font-size: 20px; }
  .launch-hero { padding: 24px 14px 24px; margin-bottom: 24px; }
  .fee-grid { grid-template-columns: 1fr; }
  .fee-card { padding: 10px; }
  .fee-card-value { font-size: 16px; }
  .fee-addr-row { flex-direction: column; gap: 2px; align-items: flex-start; }
  .fee-addr-value { font-size: 10px; word-break: break-all; }

  /* Footer */
  .app-footer {
    flex-direction: column; gap: 4px;
    height: auto; padding: 12px 16px;
    text-align: center;
  }

  /* Contract address truncation */
  .contract-addr { font-size: 11px; word-break: break-all; }
  .detail-contract { flex-wrap: wrap; }

  /* Section headers */
  .section-title { font-size: 12px; }
}

/* ── Touch-friendly tap targets ── */
@media (pointer: coarse) {
  .nav-link { min-height: 44px; display: flex; align-items: center; }
  .btn { min-height: 44px; }
  .sort-tab { min-height: 40px; padding: 8px 14px; }
  .chart-timerange-btn { min-height: 36px; padding: 6px 14px; }
  .slippage-btn { min-height: 36px; padding: 6px 12px; }
  .pagination-btn { min-height: 44px; padding: 10px 18px; }
  .wallet-btn { min-height: 44px; }
  .token-row { min-height: 52px; }
}

/* ═══════════════════════════════════════════════════════════════
   NFT Marketplace
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   TAO PUNKS MARKET — CryptoPunks-Style Grid
   ═══════════════════════════════════════════════ */

/* ── Neural Network Background Animation ────────────── */
@keyframes networkDrift {
  0% { background-position: 0% 0%, 50% 50%; }
  50% { background-position: 100% 100%, 0% 100%; }
  100% { background-position: 0% 0%, 50% 50%; }
}
@keyframes pulseNode {
  0%, 100% { opacity: 0.04; }
  50% { opacity: 0.08; }
}

.punks-market {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  position: relative;
}

/* ── Hero Header ─────────────────────────────────────── */
.punks-header {
  position: relative;
  padding: 40px 36px 32px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(18,18,26,0.95), rgba(26,26,40,0.9));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.2),
    0 4px 16px rgba(0,0,0,0.15),
    0 12px 40px rgba(0,0,0,0.1);
  overflow: hidden;
}
/* Subtle gradient accent line at top */
.punks-header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--success) 50%, var(--primary) 100%);
  opacity: 0.7;
}

.punks-title-row {
  display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px;
}
.punks-title {
  font-family: 'Space Mono', monospace;
  font-size: 36px; font-weight: 700; color: var(--text);
  letter-spacing: 0.12em; margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.punks-supply {
  font-size: 14px; color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  background: rgba(255,255,255,0.05); padding: 4px 12px;
  border-radius: 20px; letter-spacing: 0.02em;
}

/* ── Stats ── */
.punks-stats {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.punks-stat {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px 20px;
  min-width: 120px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.punks-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,212,255,0.1);
  border-color: rgba(0,212,255,0.2);
}
.punks-stat-value {
  font-family: 'Space Mono', monospace;
  font-size: 22px; font-weight: 700; color: var(--text);
  line-height: 1.2;
}
.punks-stat-unit {
  font-size: 12px; font-weight: 500; color: var(--text-dim);
  margin-left: 2px;
}
.punks-stat-label {
  font-size: 10px; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.08em; margin-top: 4px;
  font-family: 'Space Mono', monospace;
}

/* ── Controls ─────────────────────────────────────────── */
.punks-controls {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 16px;
}
.punks-filters { display: flex; gap: 6px; }
.punks-filter-btn {
  padding: 8px 20px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent; color: var(--text-dim); cursor: pointer;
  font-family: 'Space Mono', monospace; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 500;
  transition: all 0.2s ease;
}
.punks-filter-btn:hover {
  color: var(--text); border-color: var(--text-dim);
  background: rgba(255,255,255,0.03);
}
.punks-filter-btn.active {
  background: var(--primary); color: var(--primary-fg);
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(0,212,255,0.25);
}

.punks-search { display: flex; gap: 8px; position: relative; }
.punks-search-input {
  padding: 8px 16px 8px 36px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text); font-family: 'Space Mono', monospace;
  font-size: 11px; width: 180px;
  transition: all 0.2s ease;
}
.punks-search::before {
  content: '\1F50D'; /* magnifying glass */
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; opacity: 0.4; pointer-events: none;
}
.punks-search-input::placeholder { color: var(--text-dim); opacity: 0.6; }
.punks-search-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.15);
  width: 220px;
}

/* ── Grid Info ── */
.punks-grid-info {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 4px; font-size: 12px; color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.02em;
}
.punks-page-info { font-family: 'Space Mono', monospace; }

/* ── Punk Grid ── */
.punks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  margin-bottom: 24px;
}

/* ── Punk Cell ── */
.punk-cell {
  position: relative; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.06); border-radius: 6px;
  overflow: hidden; background: var(--bg-card);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.punk-cell:hover {
  transform: translateY(-3px) scale(1.02); z-index: 2;
  box-shadow:
    0 4px 8px rgba(0,212,255,0.1),
    0 8px 24px rgba(0,0,0,0.3);
  border-color: rgba(0,212,255,0.3);
}
.punk-cell--listed {
  border-color: var(--success);
  border-left: 3px solid var(--success);
  box-shadow: 0 1px 4px rgba(0, 255, 136, 0.1);
}
.punk-cell--listed:hover {
  box-shadow:
    0 4px 8px rgba(0, 255, 136, 0.12),
    0 8px 24px rgba(0, 255, 136, 0.08);
  border-color: var(--success);
}

.punk-cell-image {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #1a1a28;
}
.punk-cell-image img {
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.punk-cell-id {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-family: 'Space Mono', monospace; font-size: 10px;
  text-align: center; padding: 8px 0 3px;
  letter-spacing: 0.04em;
}

.punk-cell-price {
  position: absolute; top: 5px; right: 5px;
  background: var(--success); color: #0a0a0f;
  font-family: 'Space Mono', monospace; font-size: 9px;
  font-weight: 700; padding: 2px 7px; border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 255, 136, 0.3);
  letter-spacing: 0.02em;
}

/* ── Pagination ─────────────────────────────────────── */
.punks-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; padding: 24px 0;
}
.punks-page-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text); cursor: pointer;
  font-family: 'Space Mono', monospace; font-size: 12px;
  transition: all 0.2s ease;
}
.punks-page-btn:hover:not(:disabled) {
  background: var(--primary); color: var(--primary-fg);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,212,255,0.25);
  transform: translateY(-1px);
}
.punks-page-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.punks-page-num {
  font-family: 'Space Mono', monospace; font-size: 13px;
  color: var(--text); padding: 0 12px; font-weight: 600;
  background: rgba(255,255,255,0.05); border-radius: 20px;
  padding: 6px 16px;
}

/* ── Recent Activity ─────────────────────────────────── */
.punks-activity {
  margin-top: 40px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.punks-activity-title {
  font-family: 'Space Mono', monospace; font-size: 14px;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 18px 24px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
  margin: 0;
}
/* Live indicator dot */
.punks-activity-title::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
  animation: pulseNode 2s ease-in-out infinite;
}
.punks-activity-empty {
  color: var(--text-dim); font-size: 13px; padding: 32px 24px;
  text-align: center;
}
.punks-activity-list {}
.punks-activity-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
}
.punks-activity-row:last-child { border-bottom: none; }
.punks-activity-row:nth-child(even) { background: rgba(255,255,255,0.015); }
.punks-activity-row:hover {
  background: rgba(0,212,255,0.05);
  border-left: 3px solid var(--primary);
  padding-left: 21px;
}

.punks-event-badge {
  font-family: 'Space Mono', monospace; font-size: 10px;
  font-weight: 700; padding: 3px 10px; border-radius: 10px;
  text-transform: uppercase; min-width: 50px; text-align: center;
  letter-spacing: 0.04em;
}
.punks-event-badge.sale {
  background: rgba(0, 255, 136, 0.12); color: var(--success);
  box-shadow: 0 0 0 1px rgba(0, 255, 136, 0.2);
}
.punks-event-badge.list {
  background: rgba(255,255,255,0.04); color: var(--text-dim);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}

.punks-event-name {
  font-weight: 600; color: var(--text); min-width: 100px;
}
.punks-event-price {
  font-family: 'Space Mono', monospace; font-weight: 700;
  color: var(--success); min-width: 80px;
}
.punks-event-from { color: var(--text-dim); min-width: 80px; }
.punks-event-arrow { color: var(--text-dim); }
.punks-event-time {
  color: var(--text-dim); font-size: 11px; margin-left: auto;
  font-family: 'Space Mono', monospace;
}

/* ── Selection & Scrollbar ─────────────────────────── */
::selection { background: rgba(0,212,255,0.25); color: var(--text); }

/* Responsive */
@media (max-width: 768px) {
  .punks-market { padding: 0 12px; }
  .punks-market::before { opacity: 0.3; }
  .punks-header { padding: 24px 20px; border-radius: 12px; }
  .punks-title { font-size: 24px; letter-spacing: 0.08em; }
  .punks-stats { flex-wrap: wrap; gap: 8px; }
  .punks-stat { min-width: calc(50% - 4px); padding: 10px 14px; }
  .punks-stat-value { font-size: 18px; }
  .punks-controls { flex-direction: column; align-items: stretch; gap: 12px; }
  .punks-filters { justify-content: center; }
  .punks-search { justify-content: center; }
  .punks-search-input { width: 100%; }
  .punks-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 4px; }
  .punk-cell-id { font-size: 9px; padding: 6px 0 2px; }
  .punks-activity-row { gap: 10px; padding: 12px 16px; font-size: 12px; }
  .punks-event-from { display: none; }
  .punks-pagination { gap: 6px; }
  .punks-page-btn { width: 32px; height: 32px; font-size: 11px; }
}

/* ── Legacy marketplace (keep for collection/listing detail pages) ── */
.marketplace { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ── Market Hero (Featured Collection Banner) ── */
.market-hero {
  margin-bottom: 32px;
}
.market-hero-banner {
  position: relative;
  background: linear-gradient(135deg, hsl(24 30% 8%), hsl(24 20% 14%), hsl(38 40% 12%));
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  padding: 48px 40px;
}
.market-hero-banner::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 60%; height: 200%;
  background: radial-gradient(ellipse, hsla(38, 100%, 58%, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.market-hero-content { position: relative; z-index: 1; }
.market-hero-badge {
  display: inline-block;
  background: hsla(38, 100%, 58%, 0.15);
  color: var(--primary);
  padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 16px;
}
.market-hero-title {
  font-size: 36px; font-weight: 800; color: var(--text);
  margin: 0 0 8px; line-height: 1.1;
}
.market-hero-desc {
  color: var(--text-dim); font-size: 14px; line-height: 1.5;
  max-width: 500px; margin: 0 0 24px;
}
.market-hero-stats {
  display: flex; gap: 32px; margin-bottom: 24px;
}
.hero-stat {}
.hero-stat-value {
  display: block; font-size: 22px; font-weight: 700;
  color: var(--primary); font-family: 'Space Mono', monospace;
}
.hero-stat-label {
  display: block; font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px;
}
.market-hero-cta {
  padding: 12px 28px; font-size: 14px; font-weight: 700;
  border-radius: 8px;
}

/* ── Global Stats Bar ── */
.market-stats-bar {
  display: flex; gap: 16px; margin-bottom: 28px;
  padding: 16px 20px; background: var(--bg-card);
  border-radius: 12px; border: 1px solid var(--border);
}
.market-stat-pill {
  flex: 1; text-align: center;
}
.market-stat-pill .market-stat-value {
  display: block; font-size: 18px; font-weight: 700;
  color: var(--primary); font-family: 'Space Mono', monospace;
}
.market-stat-pill .market-stat-label {
  display: block; font-size: 10px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px;
}

/* ── Market Controls (Tabs + Sort + Search) ── */
.market-controls {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.market-tabs { display: flex; gap: 4px; }
.market-tab {
  padding: 8px 20px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--text-dim); cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all 0.15s;
}
.market-tab:hover { color: var(--text); background: var(--bg-hover); }
.market-tab.active {
  background: var(--primary); color: var(--primary-fg);
  border-color: var(--primary);
}

.market-toolbar {
  display: flex; align-items: center; gap: 12px;
}
.market-sort {
  padding: 8px 12px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; cursor: pointer;
}
.market-sort:focus { outline: none; border-color: var(--primary); }
.market-search {
  display: flex; gap: 6px;
}
.market-search-input {
  padding: 8px 14px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; width: 200px;
}
.market-search-input::placeholder { color: var(--text-dim); }
.market-search-input:focus { outline: none; border-color: var(--primary); }
.market-search-btn {
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text-dim); cursor: pointer;
  font-size: 13px; transition: all 0.15s;
}
.market-search-btn:hover { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }

.market-loading, .market-empty {
  text-align: center; padding: 60px 20px; color: var(--text-dim);
}
.market-empty h3 { margin-bottom: 8px; color: var(--text); }

/* ── Market Grid (Items) ── */
.market-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 24px;
}

/* ── Collections Grid ── */
.collections-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px; margin-bottom: 24px;
}

/* ── Market Pagination ── */
.market-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 16px; padding: 20px 0;
}

/* ── Listing Card Footer ── */
.listing-card-footer {
  padding: 8px 12px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-dim);
}
.listing-card-footer .listing-card-seller {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0; border: none;
}

/* ── SOLD Overlay ── */
.listing-card-sold-overlay {
  position: absolute; top: 12px; right: 12px;
  background: rgba(231, 76, 60, 0.9); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 4px; letter-spacing: 0.5px;
}

/* ── Activity List ── */
.activity-list {
  display: flex; flex-direction: column;
}
.activity-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.1s;
}
.activity-row:hover { background: var(--bg-hover); }
.activity-row--header {
  cursor: default; font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
  padding: 8px 16px; background: var(--bg-card); border-radius: 8px 8px 0 0;
}
.activity-row--header:hover { background: var(--bg-card); }

.activity-badge {
  display: inline-block; min-width: 48px; text-align: center;
  padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.activity-badge.sale { background: hsla(142, 60%, 45%, 0.15); color: var(--success); }
.activity-badge.listing { background: hsla(38, 100%, 58%, 0.15); color: var(--primary); }

.activity-thumb {
  width: 40px; height: 40px; border-radius: 6px; overflow: hidden;
  background: var(--bg-card); flex-shrink: 0;
}
.activity-thumb img { width: 100%; height: 100%; object-fit: cover; }
.activity-thumb-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-dim);
}

.activity-info {
  flex: 1; min-width: 0;
}
.activity-nft-name {
  display: block; font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.activity-coll-name {
  display: block; font-size: 11px; color: var(--text-dim);
}

.activity-price {
  min-width: 80px;
}
.activity-price .price-value {
  font-size: 14px; font-weight: 700; color: var(--primary);
  font-family: 'Space Mono', monospace;
}
.activity-price .price-unit {
  font-size: 11px; color: var(--text-dim);
}

.activity-parties {
  min-width: 120px; font-size: 12px; color: var(--text-dim);
}
.activity-from { color: var(--text); }
.activity-arrow { color: var(--text-dim); }
.activity-to { color: var(--text); }

.activity-time {
  min-width: 60px; font-size: 12px; color: var(--text-dim); text-align: right;
}

/* ── Legacy aliases (keep for backward compat) ── */
.marketplace-hero { display: none; }
.marketplace-stats-bar { display: none; }
.marketplace-controls { display: none; }
.marketplace-tabs { display: none; }
.marketplace-search { display: none; }
.marketplace-loading, .marketplace-empty { display: none; }
.marketplace-grid { display: none; }
.marketplace-pagination { display: none; }

/* Responsive */
@media (max-width: 768px) {
  .market-hero-banner { padding: 28px 20px; }
  .market-hero-title { font-size: 24px; }
  .market-hero-stats { flex-wrap: wrap; gap: 16px; }
  .market-stats-bar { flex-wrap: wrap; }
  .market-controls { flex-direction: column; align-items: stretch; }
  .market-toolbar { flex-wrap: wrap; }
  .market-search-input { width: 100%; }
  .market-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .collections-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
  .activity-parties { display: none; }
  .activity-row { gap: 10px; padding: 10px 12px; }
}

/* ── Collection Grid (OpenSea-style) ── */
.collection-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px; margin-bottom: 24px;
}

.collection-card {
  background: var(--surface-2); border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.collection-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  border-color: var(--accent);
}

.collection-card-image {
  aspect-ratio: 16/9; overflow: hidden; background: var(--surface-1);
  display: flex; align-items: center; justify-content: center;
}
.collection-card-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.collection-card-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: var(--accent);
  background: linear-gradient(135deg, var(--surface-1), var(--surface-2));
}

.collection-card-info {
  padding: 12px 14px 4px;
}
.collection-card-name {
  font-weight: 700; font-size: 15px; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.collection-card-symbol {
  font-size: 11px; color: var(--text-muted); margin-left: 6px;
}

.collection-card-stats {
  display: flex; justify-content: space-between; padding: 10px 14px;
  border-top: 1px solid var(--border); margin-top: 8px;
}
.collection-stat { text-align: center; flex: 1; }
.collection-stat-value {
  display: block; font-size: 13px; font-weight: 700; color: var(--text-primary);
}
.collection-stat-label {
  display: block; font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px;
}

/* ── Collection Page ── */
.collection-page { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.collection-page-back { margin-bottom: 16px; }

.collection-page-header {
  margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.collection-page-identity {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.collection-page-avatar {
  width: 72px; height: 72px; border-radius: 12px; overflow: hidden;
  background: var(--surface-2); border: 2px solid var(--border); flex-shrink: 0;
}
.collection-page-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.collection-page-avatar-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: var(--accent);
  background: linear-gradient(135deg, var(--surface-1), var(--surface-2));
}
.collection-page-name {
  font-size: 24px; font-weight: 800; color: var(--text-primary); margin: 0;
}
.collection-page-symbol {
  font-size: 12px; color: var(--text-muted); margin-left: 8px;
}
.collection-page-addr {
  font-size: 11px; color: var(--text-muted); margin-top: 4px;
  word-break: break-all; font-family: monospace;
}

.collection-page-stats {
  display: flex; gap: 24px; flex-wrap: wrap;
}
.collection-page-stat {
  text-align: center; padding: 10px 20px;
  background: var(--surface-2); border-radius: 8px; border: 1px solid var(--border);
}
.collection-page-stat .stat-value {
  display: block; font-size: 16px; font-weight: 700; color: var(--accent);
}
.collection-page-stat .stat-label {
  display: block; font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px;
}

.collection-page-links { margin-top: 12px; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── Listing Grid ── */
.marketplace-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 24px;
}

.listing-card {
  background: var(--surface-2); border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.listing-card--sold { opacity: 0.7; }

.listing-card-image {
  position: relative; aspect-ratio: 1; overflow: hidden;
  background: var(--surface-1);
}
.listing-card-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.listing-card-no-image {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: var(--accent);
  background: linear-gradient(135deg, var(--surface-1), var(--surface-2));
}
.listing-card-collection {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,0.7); color: var(--text-primary);
  padding: 2px 8px; border-radius: 4px; font-size: 11px;
}

.listing-card-info { padding: 12px; }
.listing-card-name {
  font-weight: 600; font-size: 14px; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 6px;
}
.listing-card-price { display: flex; align-items: baseline; gap: 4px; }
.listing-card-price .price-value {
  font-size: 16px; font-weight: 700; color: var(--accent);
}
.listing-card-price .price-unit {
  font-size: 12px; color: var(--text-muted);
}

.listing-card-seller {
  padding: 8px 12px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-secondary);
}
.seller-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verified-badge {
  background: var(--accent); color: #000; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 3px; white-space: nowrap;
}
.sold-badge {
  background: #e74c3c; color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 3px; margin-left: auto;
}

.marketplace-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 16px; padding: 20px 0;
}
.page-num { color: var(--text-muted); font-size: 13px; }

/* ── Listing Detail ── */

.listing-detail { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
.listing-detail-back { margin-bottom: 20px; }
.listing-detail-loading, .listing-detail-error {
  text-align: center; padding: 40px; color: var(--text-muted);
}

.listing-detail-content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}
.listing-detail-image { border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.listing-detail-image img { width: 100%; display: block; }
.listing-detail-placeholder {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 14px;
}

.listing-detail-info { display: flex; flex-direction: column; gap: 16px; }
.listing-detail-collection {
  font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px;
}
.listing-detail-name { font-size: 24px; font-weight: 700; color: var(--text-primary); margin: 0; }
.listing-detail-desc { color: var(--text-secondary); font-size: 14px; line-height: 1.5; }

.listing-detail-price {
  background: var(--surface-2); padding: 16px; border-radius: 8px;
}
.listing-detail-price .price-label {
  display: block; font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.listing-detail-price .price-amount {
  font-size: 28px; font-weight: 700; color: var(--accent);
}
.listing-detail-price .price-unit {
  font-size: 16px; color: var(--text-secondary); margin-left: 4px;
}

.listing-detail-status { }
.status-badge {
  display: inline-block; padding: 4px 12px; border-radius: 4px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.status-active { background: rgba(46,204,113,0.2); color: #2ecc71; }
.status-sold { background: rgba(231,76,60,0.2); color: #e74c3c; }
.status-cancelled { background: rgba(149,165,166,0.2); color: #95a5a6; }

.listing-detail-seller, .listing-detail-buyer {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.seller-label, .buyer-label { font-size: 12px; color: var(--text-muted); }
.seller-addr { font-size: 11px; color: var(--text-muted); word-break: break-all; width: 100%; }

.listing-action { margin-top: 8px; }
.btn-buy {
  width: 100%; padding: 14px; font-size: 16px; font-weight: 700;
}
.tx-pending { color: var(--accent); font-size: 13px; }
.tx-status { margin-top: 8px; font-size: 12px; color: var(--text-secondary); word-break: break-all; }
.connect-prompt { color: var(--text-muted); font-size: 13px; }

.listing-detail-meta {
  font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px;
}
.listing-detail-meta a { color: var(--accent); }

/* ── List for Sale ── */

.list-for-sale {
  background: var(--surface-2); border-radius: 10px; padding: 20px;
  max-width: 480px;
}
.list-preview {
  display: flex; gap: 12px; align-items: center; margin-bottom: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.list-preview img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.list-preview-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.list-preview-collection { font-size: 12px; color: var(--text-muted); }

.list-steps { margin-bottom: 16px; }
.step-indicators { display: flex; gap: 12px; }
.step {
  font-size: 12px; color: var(--text-muted); padding: 4px 10px;
  border-radius: 4px; background: var(--surface-1);
}
.step.active { color: var(--accent); background: rgba(0,255,163,0.1); font-weight: 600; }
.step.done { color: #2ecc71; }

.list-step-content { display: flex; flex-direction: column; gap: 12px; }
.list-error { color: #e74c3c; font-size: 12px; }
.list-success { text-align: center; }
.list-success h3 { color: #2ecc71; margin-bottom: 8px; }

@media (max-width: 768px) {
  .collection-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
  .marketplace-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .listing-detail-content { grid-template-columns: 1fr; }
  .marketplace-stats-bar { gap: 8px; }
  .stat-pill { padding: 6px 10px; }
  .stat-pill .stat-value { font-size: 14px; }
  .marketplace-controls { flex-direction: column; align-items: stretch; }
  .marketplace-hero { flex-direction: column; align-items: flex-start; }
  .marketplace-title { font-size: 22px; }
  .collection-page-stats { gap: 12px; }
  .collection-page-stat { padding: 8px 12px; }
  .collection-page-identity { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ── P2P Swap UI ───────────────────────────────────── */

/* Portfolio Tabs */
.portfolio-tabs {
  display: flex; gap: 8px; margin-bottom: 24px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-50);
}
.portfolio-tabs .tab-btn {
  padding: 8px 16px; border-radius: 6px; border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary); cursor: pointer;
  font-family: 'Space Mono', monospace; font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; transition: all 0.15s;
}
.portfolio-tabs .tab-btn.active,
.portfolio-tabs .tab-btn:hover {
  background: var(--primary); color: var(--primary-fg); border-color: var(--primary);
}
.tab-badge {
  display: inline-block; background: #ff4444; color: #fff; font-size: 10px;
  padding: 1px 6px; border-radius: 10px; margin-left: 4px; font-weight: 700;
}

/* Selection Counter */
.selection-counter {
  font-size: 12px; color: var(--text-dim); margin-left: auto;
  font-family: 'Space Mono', monospace;
}

/* Wizard */
.swap-wizard { }
.wizard-steps {
  display: flex; gap: 4px; margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border-50);
}
.wizard-step {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 6px; font-size: 12px; color: var(--text-dim);
  font-family: 'Space Mono', monospace;
}
.wizard-step.active { color: var(--primary); font-weight: 700; }
.wizard-step.done { color: var(--text-secondary); }
.wizard-step-num {
  width: 22px; height: 22px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
  border: 1px solid var(--border-50); background: transparent;
}
.wizard-step.active .wizard-step-num {
  background: var(--primary); color: var(--primary-fg); border-color: var(--primary);
}
.wizard-step.done .wizard-step-num {
  background: var(--bg-card); border-color: var(--text-secondary);
}
.wizard-step-label { display: none; }
@media (min-width: 640px) {
  .wizard-step-label { display: inline; }
}
.wizard-panel { margin-bottom: 20px; }
.wizard-actions {
  display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--border-50);
}

/* Trade NFT Thumbnails */
.trade-nft-strip {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.trade-nft-thumb {
  width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border-50); flex-shrink: 0;
}
.trade-nft-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.trade-nft-thumb-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); color: var(--text-dim); font-size: 11px;
  font-family: 'Space Mono', monospace;
}

/* Trade Card (multi-NFT) */
.trade-card {
  background: var(--bg-card); border: 1px solid var(--border-50);
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.trade-side { margin-bottom: 8px; }
.trade-side-label {
  font-size: 11px; color: var(--text-dim); margin-bottom: 6px;
  font-family: 'Space Mono', monospace; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.trade-arrow {
  font-family: 'Space Mono', monospace; font-size: 18px;
  color: var(--primary); text-align: center; padding: 4px 0;
}
.trade-actions { display: flex; gap: 8px; margin-top: 12px; }
.trade-payment, .trade-expiry {
  font-size: 12px; color: var(--text-dim); margin-top: 4px;
  font-family: 'Space Mono', monospace;
}
.tx-status-msg { font-size: 12px; color: var(--primary); }

/* Status Badges */
.status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 700; font-family: 'Space Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--bg-card); color: var(--text-dim); border: 1px solid var(--border-50);
  margin-bottom: 8px;
}
.status-badge.executed { background: rgba(0, 200, 100, 0.15); color: #00c864; border-color: rgba(0, 200, 100, 0.3); }
.status-badge.cancelled { background: rgba(255, 68, 68, 0.15); color: #ff4444; border-color: rgba(255, 68, 68, 0.3); }
.trade-card--history { opacity: 0.85; }
.trade-meta { font-size: 11px; color: var(--text-dim); margin-top: 8px; }
.trade-tx-link { color: var(--primary); text-decoration: none; margin-right: 12px; }
.trade-tx-link:hover { text-decoration: underline; }
.trade-cancelled-by { color: var(--text-dim); }

/* Swap Review Panel */
.swap-review { margin-top: 16px; }
.swap-review-sides {
  display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px;
}
.swap-review-side { flex: 1; }
.swap-review-side h4 {
  font-size: 12px; color: var(--text-dim); margin-bottom: 8px;
  font-family: 'Space Mono', monospace; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.swap-arrow-col {
  font-size: 20px; color: var(--primary); padding-top: 28px;
  font-family: 'Space Mono', monospace;
}
.review-field {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 13px;
}
.review-label { color: var(--text-dim); font-family: 'Space Mono', monospace; font-size: 11px; }
.review-value { color: var(--text); font-family: 'Space Mono', monospace; }
.payment-section { margin: 16px 0; }
.approve-progress {
  font-size: 13px; color: var(--primary); font-family: 'Space Mono', monospace;
  padding: 12px 0;
}
.tx-status {
  font-size: 13px; color: var(--text); font-family: 'Space Mono', monospace;
  padding: 8px 0;
}

/* NftCard selected state in wizard */
.nft-card.selected {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px var(--primary);
}

@media (max-width: 640px) {
  .portfolio-tabs { flex-wrap: wrap; }
  .wizard-steps { flex-wrap: wrap; }
  .swap-review-sides { flex-direction: column; }
  .swap-arrow-col { text-align: center; padding: 8px 0; }
}

/* ═══════════════════════════════════════════════════
   Agent Registry
   ═══════════════════════════════════════════════════ */

.agent-registry {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

.agent-description {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.agent-description p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.agent-claim-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.agent-connect-prompt {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}
.agent-connect-prompt p {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
}

/* How It Works */
.agent-how-it-works {
  margin-bottom: 24px;
}

.agent-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.agent-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color 0.2s;
}
.agent-step-card:hover {
  border-color: rgba(0, 212, 255, 0.25);
}

.agent-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  font-family: 'Space Mono', monospace;
}

.agent-step-title {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.agent-step-desc {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
}

/* Contract Details */
.agent-contract-info {
  margin-bottom: 24px;
}

.agent-info-grid {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.agent-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.agent-info-row:last-child {
  border-bottom: none;
}

.agent-info-label {
  color: var(--text-dim);
  font-size: 13px;
  font-family: 'Space Mono', monospace;
}

.agent-info-value {
  color: var(--text);
  font-size: 13px;
  font-family: 'Space Mono', monospace;
  text-align: right;
}
a.agent-info-link {
  color: var(--primary);
  text-decoration: none;
}
a.agent-info-link:hover {
  text-decoration: underline;
}

/* Owner address link on punk detail */
a.punk-detail-owner {
  text-decoration: none;
}
a.punk-detail-owner:hover {
  text-decoration: underline;
}

.section-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .agent-steps {
    grid-template-columns: 1fr 1fr;
  }
  .agent-claim-section {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .agent-steps {
    grid-template-columns: 1fr;
  }
}

/* ═════════════════��═════════════════════════════════
   Market Layout wrapper
   ═══════════════════════════════��═══════════════════ */

.market-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}


/* ═══════════════════════════════════════════════════
   Landing Page — CryptoPunks-Inspired Enhancement
   ═══════════════════════════════════════════════════ */

.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  background: var(--bg);
  overflow-x: hidden;
}

/* ── Landing Nav ── */
.landing-nav {
  width: 100%;
  max-width: 1400px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 48px;
}

.landing-logo {
  font-family: 'Space Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.landing-logo-link {
  cursor: pointer;
}
.landing-logo .brand-prefix {
  color: var(--text);
}
.landing-logo .brand-accent {
  color: var(--primary);
}

.landing-nav-links {
  display: flex;
  gap: 12px;
}

.landing-nav-link {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  padding: 10px 24px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.04em;
}
.landing-nav-link:hover {
  color: var(--text);
  border-color: var(--primary);
  background: rgba(0, 212, 255, 0.06);
}

/* ── Mobile hamburger (hidden on desktop) ── */
.landing-nav-hamburger {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s;
}
.landing-nav-hamburger:hover {
  border-color: var(--primary);
}
.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 1px;
  transition: background 0.2s;
}
.landing-nav-hamburger:hover .hamburger-bar {
  background: var(--text);
}

/* ── Mobile slide drawer ── */
.landing-drawer {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
}
.landing-drawer--open {
  right: 0;
}
.landing-drawer-content {
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 4px;
}
.landing-drawer-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 28px;
  cursor: pointer;
  padding: 0 4px;
  margin-bottom: 16px;
  transition: color 0.2s;
}
.landing-drawer-close:hover {
  color: var(--text);
}
.landing-drawer-link {
  display: block;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  padding: 14px 0;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.landing-drawer-link:hover {
  color: var(--primary);
}
.landing-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.landing-drawer-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Hero ── */
.landing-hero {
  text-align: center;
  padding: 72px 48px 48px;
  max-width: 1000px;
}

.landing-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 36px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.landing-title-count {
  color: var(--primary);
  display: block;
  font-size: 48px;
  margin-bottom: 12px;
}
.landing-title-chain {
  color: var(--success);
}
.landing-title-evm {
  color: var(--text-dim);
  font-size: 0.55em;
  vertical-align: baseline;
}

.landing-subtitle {
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-top: 12px;
  opacity: 0.7;
}

/* ── Featured punks row ── */
.landing-featured {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 48px 32px 64px;
  flex-wrap: wrap;
}

.landing-featured-punk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.landing-featured-punk:hover {
  transform: translateY(-6px);
}

.landing-featured-img {
  width: 100px;
  height: 100px;
  image-rendering: pixelated;
  border-radius: 6px;
  background: #638596;
  padding: 4px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.landing-featured-punk:hover .landing-featured-img {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3);
}

.landing-featured-id {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* ── Content sections ── */
.landing-section {
  width: 100%;
  padding: 80px 48px;
}
.landing-section-dark {
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.landing-section-inner {
  max-width: 800px;
  margin: 0 auto;
}
.landing-section-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  color: var(--text);
  margin: 0 0 28px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.landing-section-text {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.9;
  margin: 0 0 16px;
}
.landing-section-highlight {
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
  margin-top: 28px;
  line-height: 1.5;
}
.landing-section-muted {
  color: var(--text-dim);
  font-size: 14px;
  opacity: 0.75;
  margin-top: 24px;
  line-height: 1.7;
}

/* ── V1 Problems ── */
.landing-problems {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 24px 0;
}
.landing-problem {
  padding: 12px 18px;
  background: rgba(255, 71, 87, 0.04);
  border: 1px solid rgba(255, 71, 87, 0.12);
  border-radius: 8px;
  font-size: 14px;
  transition: background 0.2s;
}
.landing-problem:hover {
  background: rgba(255, 71, 87, 0.08);
}
.landing-problem-fn {
  font-family: 'Space Mono', monospace;
  color: #ff4757;
  font-weight: 700;
}
.landing-problem-desc {
  color: var(--text-dim);
}
.landing-contract-addr {
  margin-top: 20px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
}
.landing-addr-label { color: var(--text-dim); }
.landing-addr-value { color: var(--primary); }
.landing-addr-link {
  color: var(--primary);
  text-decoration: none;
}
.landing-addr-link:hover {
  text-decoration: underline;
}

/* ═══ Punk Grid — OpenSeadragon Interactive Viewer ═══ */
.landing-grid-section {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  position: relative;
}

.punk-grid-viewer {
  width: 100%;
  height: 500px;
  background-color: #0a0a0f;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(0, 255, 136, 0.06) 0%, transparent 50%),
    radial-gradient(circle, rgba(0, 212, 255, 0.25) 1px, transparent 1px),
    linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 100%,
    32px 32px,
    32px 32px,
    32px 32px;
  cursor: grab;
}
.punk-grid-viewer:active {
  cursor: grabbing;
}

/* Pixel-perfect rendering for punk art */
.punk-grid-viewer canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Style OpenSeadragon navigation controls */
.punk-grid-viewer .navigator {
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px !important;
}

.punk-grid-viewer .openseadragon-container > div:last-child {
  /* Controls container - subtle styling */
}

.landing-grid-hint {
  text-align: center;
  padding: 12px 16px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  opacity: 0.7;
}

/* ── V2 Feature cards ── */
.landing-v2-hero, .landing-agent-stats {
  display: flex;
  justify-content: center;
  gap: 64px;
  padding: 32px 0;
  flex-wrap: wrap;
}
.landing-v2-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.landing-v2-number {
  font-family: 'Press Start 2P', cursive;
  font-size: 28px;
  color: var(--primary);
}
.landing-v2-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 28px 0;
}
.landing-feature-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px 22px;
  transition: border-color 0.25s, background 0.25s;
}
.landing-section-dark .landing-feature-card {
  background: rgba(0, 0, 0, 0.2);
}
.landing-feature-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.03);
}
.landing-feature-title {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.landing-feature-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ── Standalone punk showcase ── */
.landing-showcase {
  padding: 72px 48px;
  display: flex;
  justify-content: center;
}
.landing-showcase-punk {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.landing-showcase-punk:hover {
  transform: scale(1.04);
}
.landing-showcase-img {
  width: 320px;
  height: 320px;
  image-rendering: pixelated;
  border-radius: 12px;
  background: #638596;
  padding: 16px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.landing-showcase-punk:hover .landing-showcase-img {
  border-color: var(--primary);
  box-shadow: 0 16px 64px rgba(0, 212, 255, 0.2);
}
.landing-showcase-caption {
  margin-top: 20px;
  text-align: center;
}
.landing-showcase-id {
  display: block;
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  color: var(--text);
}
.landing-showcase-sub {
  display: block;
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* ── Airdrop steps ── */
.landing-airdrop-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 28px 0;
}
.landing-airdrop-step {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color 0.2s;
}
.landing-airdrop-step:hover {
  border-color: rgba(0, 212, 255, 0.2);
}
.landing-airdrop-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  font-family: 'Space Mono', monospace;
}
.landing-airdrop-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}
.landing-airdrop-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ── Intelligence layer trait mapping ── */
.landing-badge-soon {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--warning);
  border: 1px solid var(--warning);
  border-radius: 4px;
  padding: 4px 10px;
  margin-left: 14px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.landing-traits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.landing-trait-map {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  transition: border-color 0.2s;
}
.landing-trait-map:hover {
  border-color: rgba(0, 212, 255, 0.2);
}
.landing-trait-from {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}
.landing-trait-arrow {
  color: var(--primary);
  font-size: 16px;
}
.landing-trait-to {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.landing-trait-desc {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ── Final quote ── */
.landing-final-quote {
  text-align: center;
  padding: 72px 48px 32px;
}
.landing-quote-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 2;
}
.landing-quote-accent {
  color: var(--primary);
  font-size: 22px;
}

/* ── Stats Row ── */
.landing-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 48px 32px;
  flex-wrap: wrap;
}

.landing-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.landing-stat-value {
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.landing-stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.landing-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
}

/* ── CTA ── */
.landing-cta-section {
  padding: 24px 0 72px;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.landing-cta {
  background: var(--primary);
  color: var(--primary-fg);
  border: none;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  padding: 16px 48px;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.25s;
}
.landing-cta:hover {
  background: #33ddff;
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.35);
  transform: translateY(-2px);
}
.landing-cta-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.landing-cta-secondary:hover {
  background: rgba(0, 212, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.15);
}

/* ── Landing Footer ── */
.landing-footer {
  width: 100%;
  max-width: 1400px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.landing-footer-contract {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}

.landing-footer-addr {
  color: var(--primary);
}

.landing-footer-links {
  display: flex;
  gap: 24px;
}

.landing-footer-link {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
  text-decoration: none;
}
.landing-footer-link:hover {
  color: var(--primary);
}
.landing-footer-tg {
  color: #26A5E4;
}
.landing-footer-tg:hover {
  color: #4FC3F7;
}
.landing-footer-copy {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.5;
  margin-top: 8px;
}

/* ── Landing Responsive ── */
@media (max-width: 768px) {
  .landing-nav {
    padding: 16px 20px;
  }
  .landing-nav-links {
    display: none;
  }
  .landing-nav-hamburger {
    display: flex;
  }
  .landing-hero { padding: 48px 24px 32px; }
  .landing-title { font-size: 22px; }
  .landing-title-count { font-size: 32px; }
  .landing-section { padding: 56px 24px; }
  .landing-section-title { font-size: 13px; text-align: center; }
  .landing-section-inner { text-align: center; }
  .landing-features-grid { grid-template-columns: 1fr; }
  .landing-airdrop-steps { grid-template-columns: 1fr 1fr; }
  .landing-traits-grid { grid-template-columns: 1fr 1fr; }
  .landing-v2-hero, .landing-agent-stats { gap: 32px; }
  .landing-v2-number { font-size: 20px; }
  .landing-showcase-img { width: 240px; height: 240px; }
  .landing-featured { gap: 20px; padding: 32px 16px 48px; }
  .landing-featured-img { width: 80px; height: 80px; }
  .landing-stats { gap: 28px; flex-wrap: wrap; }
  .landing-stat-divider { display: none; }
  .landing-footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 24px;
  }
  .landing-grid-section {
    width: 100%;
    margin-left: 0;
    overflow: hidden;
  }
  .punk-grid-viewer { height: 400px; }
}

@media (max-width: 480px) {
  .landing-nav {
    padding: 14px 16px;
  }
  .landing-logo {
    font-size: 18px;
  }
  .landing-hero { padding: 32px 16px 24px; }
  .landing-title { font-size: 14px; line-height: 1.8; }
  .landing-title-count { font-size: 22px; }
  .landing-subtitle { font-size: 13px; }
  .landing-section { padding: 40px 16px; }
  .landing-section-text { font-size: 13px; }
  .landing-airdrop-steps { grid-template-columns: 1fr; }
  .landing-airdrop-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .landing-traits-grid { grid-template-columns: 1fr; }
  .landing-featured { gap: 16px; padding: 24px 12px 40px; }
  .landing-featured-img { width: 56px; height: 56px; }
  .landing-featured-id { font-size: 9px; }
  .landing-showcase-img { width: 180px; height: 180px; }
  .landing-grid-section {
    width: 100%;
    margin-left: 0;
    overflow: hidden;
  }
  .punk-grid-viewer { height: 300px; }
  .landing-grid-hint { font-size: 11px; }
  .landing-v2-hero, .landing-agent-stats {
    flex-direction: column;
    gap: 20px;
  }
  .landing-stats {
    flex-direction: column;
    gap: 20px;
    padding: 32px 16px;
  }
  .landing-cta-section {
    padding: 32px 16px;
  }
  .landing-cta {
    font-size: 12px;
    padding: 14px 24px;
    width: 100%;
  }
}

/* ═══════════��═══════════════════════════════════════
   Agent Registry Nav
   ═══════��═══════════════════════════════════════════ */

.agent-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  margin-bottom: 8px;
}

.agent-nav-links {
  display: flex;
  gap: 8px;
}

.agent-nav-link {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.04em;
}
.agent-nav-link:hover {
  color: var(--text);
  border-color: var(--primary);
  background: rgba(0, 212, 255, 0.06);
}

/* ═══════════════════════════════════════════════════
   Landing Page — Lore Sections
   ═══════════════════════════════════════════════════ */

.landing-lore {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 32px 32px;
}

.landing-lore-section {
  margin-bottom: 48px;
}

.landing-lore-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  color: var(--text);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.landing-lore-text {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 12px;
}

.landing-lore-highlight {
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  margin-top: 16px;
}

.landing-lore-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.landing-lore-feature {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.lore-feature-title {
  color: var(--primary);
  font-weight: 700;
  font-family: 'Space Mono', monospace;
}

.lore-feature-desc {
  color: var(--text-dim);
}

.lore-code {
  font-family: 'Space Mono', monospace;
  color: var(--primary);
  background: rgba(0, 212, 255, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

.landing-lore-quote {
  border-left: 3px solid var(--primary);
  padding: 16px 24px;
  background: rgba(0, 212, 255, 0.04);
  border-radius: 0 8px 8px 0;
}
.landing-lore-quote p {
  color: var(--text);
  font-family: 'Press Start 2P', cursive;
  font-size: 11px;
  line-height: 1.8;
  margin: 0;
}

@media (max-width: 768px) {
  .landing-lore {
    padding: 32px 20px 24px;
  }
  .landing-lore-title {
    font-size: 12px;
  }
  .landing-lore-quote p {
    font-size: 9px;
  }
}

/* ═══════════════════════════════════════════════════
   Punk Detail Page
   ═══════════════════════════════════════════════════ */

.punk-detail-page {
  min-height: 100vh;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav / breadcrumb */
.punk-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}

.punk-detail-breadcrumb {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
}

.punk-detail-back {
  background: none;
  border: none;
  color: var(--primary);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.punk-detail-back:hover {
  text-decoration: underline;
}

.punk-detail-sep {
  color: var(--text-dim);
  margin: 0 4px;
}

/* Showcase image */
.punk-showcase {
  display: flex;
  justify-content: center;
  padding: 16px 0 32px;
}

.punk-showcase-img-wrap {
  background: #638596;
  border-radius: 8px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 480px;
  width: 100%;
}

.punk-showcase-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  image-rendering: pixelated;
  display: block;
}

/* Info section */
.punk-detail-info {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 48px;
}

.punk-detail-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 20px;
  color: var(--text);
  margin: 0 0 8px;
}

.punk-detail-sub {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 32px;
}

.punk-detail-section {
  margin-bottom: 32px;
}

.punk-detail-section-title {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.punk-detail-owner {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--primary);
}
.punk-detail-owner.dim {
  color: var(--text-dim);
}

.punk-detail-loading {
  color: var(--text-dim);
  font-size: 13px;
  font-family: 'Space Mono', monospace;
}

/* Traits grid */
.punk-detail-traits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.punk-trait {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.punk-trait-type {
  color: var(--primary);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.punk-trait-value {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

/* Nav buttons (prev / next) */
.punk-detail-nav-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 24px 0 48px;
  flex-wrap: wrap;
}

.punk-nav-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.punk-nav-btn:hover {
  color: var(--text);
  border-color: var(--primary);
  background: rgba(0, 212, 255, 0.06);
}

@media (max-width: 768px) {
  .punk-detail-title {
    font-size: 16px;
  }
  .punk-detail-traits {
    grid-template-columns: repeat(2, 1fr);
  }
  .punk-showcase-img-wrap {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .punk-detail-traits {
    grid-template-columns: 1fr;
  }
  .punk-detail-title {
    font-size: 13px;
  }
}

/* ── FAQ ──────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 24px;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child {
  border-top: 1px solid var(--border);
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--text);
  transition: color 0.2s;
}
.faq-question:hover {
  color: var(--primary);
}
.faq-toggle {
  font-size: 18px;
  color: var(--text-dim);
  flex-shrink: 0;
  margin-left: 16px;
  width: 20px;
  text-align: center;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0;
}
.faq-answer--open {
  max-height: 300px;
  padding-bottom: 18px;
}
.faq-answer p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}
.faq-link {
  color: var(--primary);
  text-decoration: none;
}
.faq-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .faq-question {
    font-size: 13px;
    padding: 14px 0;
  }
}

/* ── Locked Page ─────────────────────────────────── */
.locked-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.locked-page .agent-nav {
  border-bottom: 1px solid var(--border);
}
.locked-page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  gap: 16px;
}
.locked-page-title {
  font-family: 'Space Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
.locked-page-text {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 400px;
  line-height: 1.6;
}

/* ── Agent Registry: Progress Bar ─────────────────── */
.agent-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--border);
}
.agent-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  border-radius: 3px;
  transition: width 0.3s ease;
}
.agent-progress-text {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 6px;
}

/* ── Agent Registry: My Agents Section ────────────── */
.agent-my-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}
.agent-subsection-title {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 16px 0 12px;
}
.agent-my-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

/* ── Agent Registry: Tabs ─────────────────────────── */
.agent-tabs {
  margin: 24px 0 16px;
}
.agent-tabs-inner {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.agent-tab {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.agent-tab:hover {
  color: var(--text);
}
.agent-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.agent-tab-count {
  font-size: 11px;
  opacity: 0.6;
}

/* ── Agent Registry: Punk Card Badges ─────────────── */
.punk-cell--agent-active {
  border-color: rgba(0, 255, 136, 0.3) !important;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.08);
}
.punk-cell-agent-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--success);
  color: #0a0a0f;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.agent-card-stats {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
}
.punk-cell-activate-btn {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--primary-fg);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.punk-cell:hover .punk-cell-activate-btn {
  opacity: 1;
}

/* ── Agent Registry: Scan Status / Empty State ────── */
.agent-scan-status {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  padding: 40px 20px;
}
.agent-empty-state {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* ── Agent Registry: Activation Modal ─────────────── */
.agent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.agent-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}
.agent-modal-img {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  image-rendering: pixelated;
  margin-bottom: 16px;
  border: 2px solid var(--border);
}
.agent-modal h3 {
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  margin-bottom: 12px;
}
.agent-modal-warning {
  font-size: 13px;
  color: var(--warning);
  margin-bottom: 24px;
  line-height: 1.5;
}
.agent-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.agent-modal-actions .btn {
  flex: 1;
  max-width: 160px;
}
.agent-modal-error {
  margin-top: 12px;
  font-size: 12px;
  color: var(--danger);
  font-family: 'Space Mono', monospace;
}

/* ── Agent Registry: Responsive ───────────────────── */
@media (max-width: 768px) {
  .agent-my-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
  }
  .agent-tabs-inner {
    justify-content: center;
  }
  .agent-tab {
    font-size: 12px;
    padding: 8px 14px;
  }
  .agent-modal {
    padding: 24px;
  }
  .agent-modal-img {
    width: 96px;
    height: 96px;
  }
}
@media (max-width: 480px) {
  .agent-my-section {
    padding: 16px;
  }
  .agent-my-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}