:root {
      --bg: #08090B;
      --bg-elevated: #101217;
      --bg-card: #13161C;
      --bg-glass: rgba(19, 22, 28, 0.92);
      --border: #222631;
      --border-subtle: #1A1E26;
      --gold: #E5C358;
      --gold-bright: #F4D879;
      --gold-dim: rgba(229, 195, 88, 0.12);
      --cyan: #4EA8DE;
      --cyan-dim: rgba(78, 168, 222, 0.12);
      --crimson: #FF5E5B;
      --ivory: #E6E1D3;
      --text: #F3F5F8;
      --text-secondary: #9CA3AF;
      --text-muted: #646D7A;
      --green: #10B981;
      --serif: "Cormorant Garamond", Georgia, serif;
      --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
      --mono: "JetBrains Mono", monospace;
      --max-w: 1120px;
    }

    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    html, body {
      max-width: 100vw;
      overflow-x: hidden;
      scroll-behavior: smooth;
    }
    body {
      background-color: var(--bg);
      background-image:
        radial-gradient(circle at 18% 12%, rgba(229, 195, 88, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 82% 28%, rgba(78, 168, 222, 0.05) 0%, transparent 42%);
      color: var(--text);
      font-family: var(--sans);
      font-size: 14.5px;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
      padding-bottom: env(safe-area-inset-bottom, 20px);
    }

    a { color: var(--gold); text-decoration: none; transition: opacity 0.2s; }
    a:hover { opacity: 0.85; }

    /* UNIFIED WRAPPER SYSTEM - IDENTICAL TO INDEX.HTML */
    .wrap {
      max-width: var(--max-w);
      margin: 0 auto;
      padding: 0 max(24px, env(safe-area-inset-right, 24px)) 0 max(24px, env(safe-area-inset-left, 24px));
      box-sizing: border-box;
    }
    @media (max-width: 680px) {
      .wrap {
        padding: 0 max(20px, env(safe-area-inset-right, 20px)) 0 max(20px, env(safe-area-inset-left, 20px));
      }
    }
    @media (max-width: 480px) {
      .wrap {
        padding: 0 max(18px, env(safe-area-inset-right, 18px)) 0 max(18px, env(safe-area-inset-left, 18px));
      }
    }
    @media (max-width: 360px) {
      .wrap {
        padding: 0 14px;
      }
    }

    /* Fixed Sticky Navbar (Matches index.html) */
    .navbar {
      position: sticky;
      top: 0;
      z-index: 100;
      background: var(--bg-glass);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--border);
    }
    .navbar-inner {
      max-width: var(--max-w);
      margin: 0 auto;
      padding: 12px max(24px, env(safe-area-inset-right, 24px)) 12px max(24px, env(safe-area-inset-left, 24px));
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: nowrap;
      position: relative;
    }
    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--text);
      font-family: var(--serif);
      font-size: 22px;
      font-weight: 700;
      letter-spacing: 0.16em;
      flex-shrink: 0;
      text-decoration: none;
    }
    .brand-emblem {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      background: var(--gold-dim);
      border: 1px solid var(--gold);
      display: grid;
      place-items: center;
      color: var(--gold);
      font-family: var(--mono);
      font-size: 13px;
      font-weight: 700;
      flex-shrink: 0;
    }
    .brand-name {
      display: inline-block;
      line-height: 1;
    }
    .nav-links {
      display: flex;
      gap: 18px;
      align-items: center;
      flex-shrink: 0;
    }
    .nav-links a {
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      text-decoration: none;
      transition: color 0.15s;
      white-space: nowrap;
    }
    .nav-links a:hover { color: var(--gold); }
    .nav-links a.nav-link-market {
      color: #70c4ff;
      border: 1px solid rgba(78, 168, 222, 0.35);
      background: rgba(78, 168, 222, 0.08);
      padding: 4px 10px;
      border-radius: 6px;
      font-family: var(--mono);
      font-size: 11.5px;
      font-weight: 700;
      letter-spacing: 0.02em;
    }
    .nav-links a.nav-link-market:hover {
      background: rgba(78, 168, 222, 0.2);
      border-color: var(--cyan);
      color: #ffffff;
    }
    .nav-links a.nav-link-agent {
      color: var(--gold);
      font-weight: 600;
    }

    .nav-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }
    .chain-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 10px;
      border-radius: 6px;
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      font-family: var(--mono);
      font-size: 11px;
      color: var(--text-secondary);
      white-space: nowrap;
      flex-shrink: 0;
    }
    .chain-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--gold);
      box-shadow: 0 0 8px var(--gold);
    }
    .btn-wallet {
      background: var(--gold);
      color: #090A0D;
      border: none;
      padding: 8px 15px;
      border-radius: 6px;
      font-family: var(--mono);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .btn-wallet:hover {
      background: var(--gold-bright);
      transform: translateY(-1px);
    }

    /* Mobile Quick Mint Button */
    .mobile-mint-btn {
      display: none;
      align-items: center;
      padding: 6px 10px;
      border-radius: 6px;
      background: var(--gold-dim);
      border: 1px solid rgba(229, 195, 88, 0.4);
      color: var(--gold);
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .mobile-mint-btn:hover {
      background: rgba(229, 195, 88, 0.25);
      border-color: var(--gold);
    }

    /* Mobile Hamburger Menu Toggle Button */
    .btn-menu-toggle {
      display: none;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 4px;
      width: 34px;
      height: 34px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 6px;
      cursor: pointer;
      padding: 0;
      flex-shrink: 0;
    }
    .btn-menu-toggle span {
      display: block;
      width: 16px;
      height: 2px;
      background: var(--text);
      border-radius: 1px;
      transition: all 0.2s;
    }
    .btn-menu-toggle.active span:nth-child(1) {
      transform: translateY(6px) rotate(45deg);
    }
    .btn-menu-toggle.active span:nth-child(2) {
      opacity: 0;
    }
    .btn-menu-toggle.active span:nth-child(3) {
      transform: translateY(-6px) rotate(-45deg);
    }

    /* Mobile Navigation Drawer */
    .mobile-drawer {
      display: none;
      background: #0E1015;
      border-top: 1px solid var(--border);
      padding: 16px 20px 24px;
    }
    .mobile-drawer.open {
      display: block;
      animation: drawerSlideDown 0.2s ease-out;
    }
    @keyframes drawerSlideDown {
      from { opacity: 0; transform: translateY(-6px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .drawer-status-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--border-subtle);
      font-family: var(--mono);
      font-size: 11px;
      color: var(--text-secondary);
    }
    .drawer-links {
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .drawer-link {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 6px;
      color: var(--text);
      font-size: 13px;
      font-weight: 500;
      text-decoration: none;
      transition: background 0.15s;
    }
    .drawer-link:hover, .drawer-link:active {
      background: var(--bg-card);
      color: var(--gold);
    }
    .dl-num {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--text-muted);
    }
    .drawer-link.muted {
      color: var(--text-muted);
      font-size: 11.5px;
      font-family: var(--mono);
      border-top: 1px solid var(--border-subtle);
      margin-top: 6px;
      padding-top: 10px;
    }

    /* RESPONSIVE BREAKPOINTS FOR NAVBAR */
    @media (max-width: 991px) {
      .nav-links { display: none; }
      .chain-pill { display: none; }
      .mobile-mint-btn { display: inline-flex; }
      .btn-menu-toggle { display: flex; }
      .navbar-inner { padding: 12px max(18px, env(safe-area-inset-right, 18px)) 12px max(18px, env(safe-area-inset-left, 18px)); }
    }
    @media (max-width: 480px) {
      .navbar-inner { padding: 10px max(16px, env(safe-area-inset-right, 16px)) 10px max(16px, env(safe-area-inset-left, 16px)); gap: 8px; }
      .brand { font-size: 19px; gap: 8px; }
      .brand-emblem { width: 28px; height: 28px; font-size: 12px; }
      .btn-wallet { padding: 6px 10px; font-size: 11px; }
      .mobile-mint-btn { padding: 5px 8px; font-size: 10px; }
      .nav-actions { gap: 6px; }
    }
    @media (max-width: 360px) {
      .navbar-inner { padding: 8px 12px; gap: 6px; }
      .brand { font-size: 17px; gap: 6px; }
      .brand-emblem { width: 26px; height: 26px; font-size: 11px; }
      .btn-wallet { padding: 5px 8px; font-size: 10px; }
      .mobile-mint-btn { padding: 4px 6px; font-size: 9.5px; }
    }

    /* HERO BAROMETER */
    .market-hero {
      padding: clamp(28px, 5vw, 48px) 0 28px;
    }
    .hero-badge {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 6px 12px; border-radius: 8px;
      background: rgba(78, 168, 222, 0.1); border: 1px solid rgba(78, 168, 222, 0.25);
      color: var(--cyan); font-family: var(--mono); font-size: 11px; font-weight: 600;
      margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.04em;
      line-height: 1.4; max-width: 100%; word-break: break-word;
    }
    .hero-badge .pulse-dot {
      width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
      box-shadow: 0 0 8px var(--cyan); flex-shrink: 0;
    }
    .hero-title {
      font-family: var(--serif); font-size: clamp(28px, 6.2vw, 52px);
      font-weight: 700; line-height: 1.18; color: var(--text);
      letter-spacing: -0.01em; margin-bottom: 14px;
    }
    .hero-title span { color: var(--gold); }
    .hero-desc {
      font-size: clamp(13.5px, 3.2vw, 15px); color: var(--text-secondary);
      line-height: 1.65; max-width: 680px; margin-bottom: 28px;
    }

    /* KPI METRICS GRID */
    .kpi-grid {
      display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
      margin-bottom: 32px;
    }
    .kpi-card {
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: 12px; padding: 16px 18px; box-sizing: border-box;
      min-width: 0; position: relative; overflow: hidden;
    }
    .kpi-card::before {
      content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
      background: var(--border);
    }
    .kpi-card.cyan::before { background: var(--cyan); }
    .kpi-card.gold::before { background: var(--gold); }
    .kpi-card.crimson::before { background: var(--crimson); }
    .kpi-card.green::before { background: var(--green); }

    .kpi-tag {
      font-family: var(--mono); font-size: 10.5px; text-transform: uppercase;
      font-weight: 700; letter-spacing: 0.04em; margin-bottom: 6px;
      color: var(--text-muted); line-height: 1.25;
    }
    .kpi-val {
      font-size: clamp(18px, 4vw, 23px); font-weight: 800; font-family: var(--mono);
      color: var(--text); white-space: nowrap; line-height: 1.2;
    }
    .kpi-sub {
      font-size: 11px; font-family: var(--mono); color: var(--text-secondary);
      margin-top: 6px; line-height: 1.4;
    }
    .kpi-sub-meta {
      display: block; font-size: 10px; color: var(--text-muted); margin-top: 2px;
    }

    /* INSPECTOR PANEL */
    .panel {
      background: var(--bg-elevated); border: 1px solid var(--border);
      border-radius: 14px; padding: clamp(18px, 4vw, 28px); margin-bottom: 32px;
      box-sizing: border-box;
    }
    .panel-head {
      display: flex; justify-content: space-between; align-items: flex-start;
      flex-wrap: wrap; gap: 14px; margin-bottom: 20px;
    }
    .panel-title {
      font-size: 18px; font-weight: 700; color: var(--text);
    }
    .panel-desc {
      font-size: 13px; color: var(--text-secondary); margin-top: 3px;
    }
    .search-box {
      display: flex; gap: 8px; align-items: center; width: 100%; max-width: 360px;
      box-sizing: border-box;
    }
    .search-input {
      flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--border);
      color: var(--text); padding: 10px 14px; border-radius: 6px;
      font-family: var(--mono); font-size: 13px; box-sizing: border-box;
    }
    .search-input:focus { outline: none; border-color: var(--cyan); }
    .btn-search {
      background: var(--cyan); color: #08090B; border: none; padding: 10px 16px;
      border-radius: 6px; font-family: var(--mono); font-size: 12px; font-weight: 700;
      cursor: pointer; white-space: nowrap; transition: all 0.15s; flex-shrink: 0;
    }
    .btn-search:hover { background: #60B7EB; }

    .inspector-card {
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: 10px; padding: 20px;
      display: grid; grid-template-columns: 150px 1fr; gap: 24px;
      align-items: center; box-sizing: border-box;
    }
    .thumb-frame {
      width: 150px; aspect-ratio: 1/1; border-radius: 8px;
      overflow: hidden; border: 1px solid var(--border); background: #0B0D10;
      box-sizing: border-box;
    }
    .data-grid {
      display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      gap: 12px; margin: 14px 0 16px;
    }
    .data-cell-label {
      font-size: 10.5px; font-family: var(--mono); color: var(--text-muted);
      text-transform: uppercase; display: block; margin-bottom: 2px;
    }
    .data-cell-val {
      font-size: 14px; font-family: var(--mono); font-weight: 700; color: var(--text);
    }

    /* ACTION BUTTONS */
    .btn-action-group {
      display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    }
    .btn-outline-link {
      display: inline-flex; align-items: center; gap: 6px;
      background: var(--bg-elevated); border: 1px solid var(--border);
      color: var(--text); padding: 7px 14px; border-radius: 6px;
      font-family: var(--mono); font-size: 11.5px; font-weight: 600;
      transition: all 0.15s;
    }
    .btn-outline-link:hover { border-color: var(--gold); color: var(--gold); }

    /* TRADING CONSOLE & ORDERBOOK */
    .section-title {
      font-size: clamp(18px, 4.5vw, 21px); font-weight: 700; color: var(--text); margin-bottom: 4px;
    }
    .section-subtitle {
      font-size: 12px; font-family: var(--mono); color: var(--text-muted); margin-bottom: 0;
    }
    .trading-header {
      display: flex; justify-content: space-between; align-items: center;
      flex-wrap: wrap; gap: 14px; margin-bottom: 18px;
    }
    .trade-tabs {
      display: inline-flex; background: var(--bg-card); border: 1px solid var(--border);
      border-radius: 8px; padding: 4px; gap: 4px; box-sizing: border-box;
    }
    .trade-tab-btn {
      background: transparent; border: 1px solid transparent; color: var(--text-secondary);
      font-family: var(--mono); font-size: 11.5px; font-weight: 600;
      padding: 7px 14px; border-radius: 6px; cursor: pointer; transition: all 0.15s;
      white-space: nowrap;
    }
    .trade-tab-btn.active {
      background: var(--bg-elevated); color: var(--gold);
      border-color: rgba(229, 195, 88, 0.35);
      box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    }
    .filter-bar {
      display: flex; justify-content: space-between; align-items: center;
      flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: 10px; padding: 10px 12px; box-sizing: border-box;
    }
    .filter-chips {
      display: flex; gap: 6px; flex-wrap: wrap; min-width: 0;
    }
    .filter-chip {
      background: var(--bg-elevated); border: 1px solid var(--border);
      color: var(--text-secondary); font-family: var(--mono); font-size: 11px;
      padding: 6px 11px; border-radius: 6px; cursor: pointer; transition: all 0.15s;
      white-space: nowrap; flex-shrink: 0;
    }
    .filter-chip.active {
      border-color: var(--cyan); color: #70c4ff;
      background: rgba(78, 168, 222, 0.12); font-weight: 700;
    }
    .sort-select {
      background: var(--bg); border: 1px solid var(--border);
      color: var(--text); font-family: var(--mono); font-size: 11.5px;
      padding: 7px 10px; border-radius: 6px; outline: none; cursor: pointer;
    }

    /* LISTING CARDS GRID */
    .market-grid {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
      margin-bottom: 36px;
    }
    .listing-card {
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: 14px; padding: 16px; display: flex;
      flex-direction: column; justify-content: space-between;
      box-sizing: border-box; transition: transform 0.2s, border-color 0.2s;
      position: relative; overflow: hidden; min-width: 0;
    }
    .listing-card:hover {
      transform: translateY(-2px); border-color: rgba(229, 195, 88, 0.4);
    }
    .listing-thumb-wrap {
      width: 100%; aspect-ratio: 1/1; border-radius: 10px;
      overflow: hidden; border: 1px solid var(--border); background: #0B0D10;
      margin-bottom: 12px; box-sizing: border-box;
    }
    .listing-info-row {
      display: flex; justify-content: space-between; align-items: center;
      gap: 8px; margin-bottom: 6px;
    }
    .listing-id {
      font-size: 16px; font-family: var(--mono); font-weight: 800; color: var(--text);
      flex-shrink: 0;
    }
    .listing-tier-pill {
      font-family: var(--mono); font-size: 10px; font-weight: 700;
      padding: 2px 7px; border-radius: 4px; letter-spacing: 0.03em;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 72%;
    }
    .listing-seller {
      font-family: var(--mono); font-size: 11px; color: var(--text-muted);
      margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center;
      gap: 8px;
    }
    .listing-price-box {
      background: var(--bg-elevated); border: 1px solid var(--border);
      border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
      font-family: var(--mono); box-sizing: border-box;
    }
    .lpb-header {
      display: flex; justify-content: space-between; align-items: center;
      gap: 8px; margin-bottom: 6px;
    }
    .lpb-label {
      font-size: 9.5px; color: var(--text-muted); text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .lpb-usdt-badge {
      background: rgba(229, 195, 88, 0.14); border: 1px solid rgba(229, 195, 88, 0.4);
      color: var(--gold-bright); font-size: 11px; font-weight: 800;
      padding: 2px 8px; border-radius: 5px; letter-spacing: 0.02em; white-space: nowrap;
    }
    .lpb-main-price {
      margin-bottom: 10px;
    }
    .lpb-ask {
      font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.1;
    }
    .lpb-floor-row {
      display: flex; justify-content: space-between; align-items: center;
      flex-wrap: wrap; gap: 6px 8px;
      padding-top: 9px; border-top: 1px dashed var(--border-subtle);
      font-size: 10.5px;
    }
    .lpb-floor-val {
      color: var(--cyan); font-weight: 700;
    }
    .lpb-spread {
      color: var(--green); font-weight: 700; font-size: 10px;
      padding: 2px 6px; background: rgba(16, 185, 129, 0.12);
      border-radius: 4px; white-space: nowrap;
    }
    .lpb-agent-cmd {
      margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border-subtle);
      font-size: 10px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .lpb-agent-cmd code {
      color: #9CA3AF;
    }
    .btn-buy-action {
      background: var(--gold); color: #08090B; border: none;
      padding: 11px 10px; border-radius: 8px; font-family: var(--mono);
      font-size: clamp(11px, 3.2vw, 12.5px); font-weight: 800; cursor: pointer; width: 100%;
      transition: all 0.15s; text-align: center; box-sizing: border-box;
      white-space: nowrap;
    }
    .btn-buy-action:hover {
      background: var(--gold-bright); box-shadow: 0 0 16px rgba(229, 195, 88, 0.3);
    }
    .btn-buy-action.sold {
      background: var(--bg-elevated); color: var(--text-muted);
      border: 1px solid var(--border); cursor: not-allowed;
    }

    /* SELLER STUDIO PANEL */
    .seller-studio-grid {
      display: grid; grid-template-columns: 260px 1fr; gap: 24px;
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: 14px; padding: clamp(16px, 4vw, 24px); margin-bottom: 36px;
      box-sizing: border-box;
    }
    .seller-inputs-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px;
    }
    .fee-calc-box {
      background: var(--bg-elevated); border: 1px solid var(--border);
      border-radius: 10px; padding: 12px 14px; margin: 14px 0;
      font-family: var(--mono); font-size: 11.5px; box-sizing: border-box;
    }
    .fc-row {
      display: flex; justify-content: space-between; align-items: baseline;
      flex-wrap: wrap; gap: 3px 10px; padding: 7px 0;
      border-bottom: 1px solid var(--border-subtle);
    }
    .fc-row > *:last-child {
      margin-left: auto; text-align: right;
    }
    .fc-row:last-child {
      border-bottom: none; padding-top: 10px; font-size: 12.5px; font-weight: 700;
    }

    /* FLYWHEEL STATS & TRADE STREAM TABLE */
    .flywheel-grid {
      display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
      margin-bottom: 24px;
    }
    .table-scroll-hint {
      display: none; font-family: var(--mono); font-size: 10.5px;
      color: var(--text-muted); margin-bottom: 6px;
    }
    .trade-table-wrap {
      overflow-x: auto; -webkit-overflow-scrolling: touch;
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: 12px; margin-bottom: 36px;
    }
    .trade-table {
      width: 100%; border-collapse: collapse; font-family: var(--mono);
      font-size: 12px; min-width: 620px;
    }
    .trade-table th, .trade-table td {
      padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border-subtle);
      white-space: nowrap;
    }
    .trade-table th {
      background: var(--bg-elevated); color: var(--text-muted);
      font-size: 10.5px; text-transform: uppercase;
    }

    /* MODAL DIALOG */
    .modal-backdrop {
      display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
      z-index: 1000; align-items: center; justify-content: center;
      padding: 14px; box-sizing: border-box;
    }
    .modal-backdrop.open {
      display: flex; animation: modalFadeIn 0.2s ease-out;
    }
    @keyframes modalFadeIn {
      from { opacity: 0; transform: scale(0.96); }
      to { opacity: 1; transform: scale(1); }
    }
    .modal-dialog {
      background: #11141B; border: 1px solid var(--border);
      border-radius: 16px; padding: clamp(16px, 4vw, 24px); width: 100%; max-width: 460px;
      max-height: calc(100vh - 28px); overflow-y: auto;
      box-shadow: 0 24px 60px rgba(0,0,0,0.85); position: relative;
      box-sizing: border-box;
    }
    .modal-close-btn {
      position: absolute; top: 14px; right: 16px; background: transparent;
      border: none; color: var(--text-muted); font-size: 18px; cursor: pointer;
    }
    .modal-close-btn:hover { color: var(--text); }

    /* AI COMMAND SPECIFICATION CARDS IN MARKET */
    .ai-cmd-grid {
      display: flex;
      flex-direction: column;
      gap: 18px;
      margin-bottom: 36px;
    }
    .ai-cmd-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: clamp(16px, 4vw, 24px);
      box-sizing: border-box;
      min-width: 0;
    }
    .ai-cmd-card.highlight {
      border-color: rgba(229, 195, 88, 0.45);
      background: linear-gradient(180deg, rgba(229, 195, 88, 0.05) 0%, var(--bg-card) 45%);
    }
    .ai-cmd-card.cyan {
      border-color: rgba(78, 168, 222, 0.45);
      background: linear-gradient(180deg, rgba(78, 168, 222, 0.05) 0%, var(--bg-card) 45%);
    }
    .ai-cmd-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px 12px;
      padding-bottom: 12px;
      margin-bottom: 12px;
      border-bottom: 1px solid var(--border);
    }
    .ai-cmd-title {
      font-size: clamp(15px, 3.8vw, 17px);
      font-weight: 700;
      color: var(--text);
    }
    .ai-cmd-badge {
      font-family: var(--mono);
      font-size: 10.5px;
      padding: 3px 9px;
      border-radius: 5px;
      background: var(--gold-dim);
      color: var(--gold);
      border: 1px solid rgba(229, 195, 88, 0.35);
      font-weight: 600;
    }
    .ai-cmd-desc {
      font-size: 13px;
      color: var(--text-secondary);
      margin-bottom: 14px;
      line-height: 1.6;
    }
    .ai-code-label {
      font-family: var(--mono);
      font-size: 10.5px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      margin-bottom: 5px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
    }
    .ai-code-box {
      background: #08090C;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 12px 14px;
      font-family: var(--mono);
      font-size: 11.5px;
      line-height: 1.6;
      color: var(--ivory);
      white-space: pre-wrap;
      word-break: break-all;
      overflow-wrap: anywhere;
      margin-bottom: 12px;
      box-sizing: border-box;
    }
    .ai-code-box:last-child {
      margin-bottom: 0;
    }
    .btn-copy-inline {
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      color: var(--gold);
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 4px;
      cursor: pointer;
      transition: all 0.15s;
    }
    .btn-copy-inline:hover {
      border-color: var(--gold);
      background: var(--gold-dim);
    }

    /* ROADMAP CARD */
    .roadmap-box {
      background: linear-gradient(90deg, rgba(229,195,88,0.06), rgba(78,168,222,0.06));
      border: 1px solid rgba(229, 195, 88, 0.35); border-radius: 12px;
      padding: clamp(16px, 4vw, 22px); display: flex; justify-content: space-between;
      align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 40px;
    }
    .roadmap-badge {
      display: inline-block; background: var(--gold); color: #08090B;
      font-family: var(--mono); font-size: 10px; font-weight: 700;
      padding: 5px 10px; border-radius: 4px; text-transform: uppercase;
      letter-spacing: 0.05em; white-space: nowrap;
    }

    /* FOOTER */
    footer {
      border-top: 1px solid var(--border); background: var(--bg-card);
      padding: 24px 0; font-size: 11.5px; color: var(--text-muted);
      font-family: var(--mono);
    }
    .footer-content {
      display: flex; justify-content: space-between; align-items: center;
      flex-wrap: wrap; gap: 10px; overflow-wrap: anywhere;
    }

    /* RESPONSIVE LAYOUT */
    @media (max-width: 991px) {
      .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
      .market-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
      .seller-studio-grid { grid-template-columns: 1fr; }
      .flywheel-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 680px) {
      .market-hero {
        padding: 24px 0 24px;
      }
      .hero-title {
        font-size: clamp(23px, 6.5vw, 30px);
        line-height: 1.25;
        margin-bottom: 14px;
      }
      .hero-desc {
        font-size: 13.5px;
        line-height: 1.68;
        margin-bottom: 24px;
      }
      .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
      .kpi-card { padding: 13px 12px; }
      .kpi-tag { font-size: 9.5px; letter-spacing: 0.02em; }
      .kpi-val { font-size: 17px; }
      .kpi-sub { font-size: 10.5px; }
      .market-grid { grid-template-columns: 1fr; gap: 14px; }
      .flywheel-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
      .trading-header { flex-direction: column; align-items: stretch; gap: 12px; }
      .trade-tabs { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
      .trade-tab-btn { padding: 8px 6px; font-size: 11px; text-align: center; }
      .filter-bar { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px; }
      .filter-chips {
        flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
        scrollbar-width: none; padding-bottom: 2px;
      }
      .filter-chips::-webkit-scrollbar { display: none; }
      .sort-select { width: 100%; }
      .seller-inputs-grid { grid-template-columns: 1fr; gap: 12px; }
      .seller-preview-col { text-align: center; }
      #sellerSvgThumb { max-width: 180px; margin: 0 auto 10px; }
      .table-scroll-hint { display: block; }
      .roadmap-box { flex-direction: column; align-items: flex-start; }
      .footer-content { flex-direction: column; align-items: flex-start; }
    }
    @media (max-width: 480px) {
      .hero-badge {
        font-size: 10px;
        padding: 5px 10px;
        margin-bottom: 14px;
        display: inline-flex;
        max-width: 100%;
        box-sizing: border-box;
      }
      .market-hero { padding: 20px 0 22px; }
      .hero-title {
        font-size: 23px;
        line-height: 1.28;
        letter-spacing: -0.01em;
        margin-bottom: 12px;
      }
      .hero-desc {
        font-size: 13px;
        line-height: 1.65;
        margin-bottom: 22px;
      }
      .kpi-grid { gap: 10px; margin-bottom: 24px; }
      .kpi-card { padding: 13px 12px; border-radius: 10px; }
      .kpi-val { font-size: 16px; }
      .kpi-tag { font-size: 9px; }
      .kpi-sub { font-size: 10.5px; }
      .listing-card { padding: 13px; }
      .lpb-ask { font-size: 18px; }
      .btn-buy-action { padding: 10px 8px; font-size: 11px; }
    }
    @media (max-width: 360px) {
      .kpi-grid {
        grid-template-columns: 1fr;
        gap: 8px;
      }
    }
