@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dm-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/dm-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/dm-sans-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-sans-latin-400-italic.woff2') format('woff2');
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 17px;
  overflow-x: hidden;
}

/* —— Icon system (consistent across header, nav, buttons) —— */
.icon {
  display: block;
  width: var(--icon-md);
  height: var(--icon-md);
  flex-shrink: 0;
}

.icon-xs { width: var(--icon-xs); height: var(--icon-xs); }
.icon-sm { width: var(--icon-sm); height: var(--icon-sm); }
.icon-md { width: var(--icon-md); height: var(--icon-md); }
.icon-lg { width: var(--icon-lg); height: var(--icon-lg); }
.icon-nav { width: var(--icon-md); height: var(--icon-md); }

svg.icon,
button svg:not([class*="icon"]) {
  width: var(--icon-md);
  height: var(--icon-md);
  flex-shrink: 0;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100dvh;
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display {
  font-family: 'DM Sans', system-ui, sans-serif;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.t-head { color: var(--text-primary); font-weight: 600; }
.t-sub { color: var(--text-secondary); }
.t-muted { color: var(--text-muted); }
.t-faint { color: var(--text-faint); }
.t-accent { color: var(--accent-bright); font-weight: 600; }
.t-cyan { color: var(--accent-cyan); }

.text-gradient {
  color: var(--text-primary);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.label-xs {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-eyebrow {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

#ambientCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--ambient-opacity);
  width: 100%;
  height: 100%;
}

#nodesCanvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--nodes-opacity);
  width: 100%;
  height: 100%;
}

.app-shell {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  background: transparent;
  overflow-x: hidden;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
}

.app-shell > * {
  position: relative;
}
.app-shell > .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.theme-dark .text-white,
.theme-light .text-white { color: var(--text-primary) !important; }
.theme-dark .text-gray-300,
.theme-light .text-gray-300 { color: var(--text-secondary) !important; }
.theme-dark .text-gray-400,
.theme-light .text-gray-400 { color: var(--text-muted) !important; }
.theme-dark .text-gray-500,
.theme-light .text-gray-500 { color: var(--text-muted) !important; }
.theme-dark .text-gray-600,
.theme-light .text-gray-600 { color: var(--text-faint) !important; }
.theme-dark .text-accent,
.theme-light .text-accent { color: var(--accent-bright) !important; }

.theme-dark .bg-surface,
.theme-light .bg-surface { background: var(--bg-input) !important; }
.theme-dark .border-white\/\[0\.06\],
.theme-dark .border-white\/\[0\.04\],
.theme-dark .border-white\/\[0\.08\],
.theme-dark .border-white\/\[0\.05\],
.theme-dark .border-white\/\[0\.10\],
.theme-light .border-white\/\[0\.06\] { border-color: var(--border-subtle) !important; }

.app-shell::before {
  display: none;
}

/* —— Layer system: solid surfaces, readable text —— */
.stack-1 {
  background: var(--bg-layer-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.stack-2 {
  background: var(--bg-layer-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.stack-3 {
  background: var(--bg-layer-3);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
}

.glass,
.glass-strong {
  background: var(--bg-glass);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.glass-strong {
  background: var(--bg-glass-strong);
}

.layer-panel {
  background: var(--bg-layer-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.layer-panel::before { display: none; }

.security-panel::after,
.security-corner { display: none !important; }

.surface-bar {
  background: color-mix(in srgb, var(--bg-panel-2) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border-subtle) !important;
}

.meta-sep {
  color: var(--text-faint);
  user-select: none;
}

.meta-line {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text-muted);
}

.meta-line strong {
  color: var(--text-primary);
  font-weight: 600;
}

.site-header {
  background: color-mix(in srgb, var(--bg-panel) 75%, transparent) !important;
  backdrop-filter: var(--header-blur);
  -webkit-backdrop-filter: var(--header-blur);
  border-color: var(--border-subtle) !important;
  padding-top: env(safe-area-inset-top, 0px);
}

.nav {
  color: var(--text-muted) !important;
  font-weight: 500;
}
.nav:hover { color: var(--text-primary) !important; background: var(--accent-soft); }

.tab-on {
  color: var(--text-primary) !important;
  background: var(--accent-soft) !important;
  border-color: var(--border-glow) !important;
  box-shadow: none;
}

.panel { display: none; }
.panel.active { display: block; animation: panelIn 0.2s ease; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-main {
  flex: 1 0 auto;
  width: 100%;
  min-height: min(72vh, 640px);
}

.panel-sell-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .panel-sell-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 2.5rem;
  }
}

.sell-form-col { min-width: 0; }
.sell-aside-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.btn-publish {
  min-height: var(--touch-min);
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.35;
}

.wallet-hint {
  background: var(--trust-blue-bg);
  border-color: var(--trust-blue-border);
  color: var(--text-secondary);
}

.wallet-hint--warn {
  background: rgba(245, 166, 35, 0.08);
  border-color: rgba(245, 166, 35, 0.28);
  color: var(--text-secondary);
}

.wallet-hint--ok {
  background: var(--trust-green-bg);
  border-color: var(--trust-green-border);
}

.wallet-hint strong { color: var(--text-primary); }

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
}

.site-footer__bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  line-height: 1.5;
}

.site-footer__sep {
  opacity: 0.45;
  user-select: none;
}

@media (min-width: 640px) {
  .site-footer__bar {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }
  .site-footer__meta {
    justify-content: flex-end;
    text-align: right;
    max-width: 28rem;
  }
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse) !important;
  font-weight: 600;
  border: 1px solid transparent;
  box-shadow: var(--shadow-btn);
  letter-spacing: 0.01em;
}
.btn-primary:hover {
  background: var(--accent-bright);
  border-color: transparent;
  color: var(--text-inverse) !important;
  box-shadow: var(--shadow-btn), var(--shadow-glow);
}

.btn-ghost {
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  background: var(--bg-panel);
  font-weight: 500;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--accent-soft);
  box-shadow: none;
}

.trust-pill {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
}
.trust-pill:hover { transform: none; box-shadow: none; border-color: var(--border-medium); }

.theme-toggle {
  min-width: auto;
  width: auto;
  height: 2.5rem;
  padding: 0 0.75rem;
  gap: 0.375rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border-medium);
  background: var(--bg-panel);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--icon-sm);
  height: var(--icon-sm);
  flex-shrink: 0;
}
.theme-toggle-icon svg {
  width: var(--icon-sm);
  height: var(--icon-sm);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-bright); }

.decentral-badge {
  display: inline-flex;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--border-glow);
  color: var(--accent-cyan);
}

.hero-cinematic {
  position: relative;
  min-height: min(78vh, 680px);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  overflow: visible;
  background: transparent;
}

.hero-cinematic::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 6, 8, 0) 0%,
    rgba(5, 6, 8, 0.12) 45%,
    rgba(19, 20, 25, 0.42) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.theme-light .hero-cinematic::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(238, 241, 246, 0.12) 45%,
    rgba(232, 236, 242, 0.48) 100%
  );
}

#howSection,
main,
#trustSection {
  background: transparent;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.protocol-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.protocol-tagline {
  color: var(--text-muted);
}

.hero-kicker {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.market-headline,
.panel-hero-title {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  max-width: 14ch;
}

.market-headline-accent,
.panel-hero-accent {
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.market-subline {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 0 1.25rem;
}

.market-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 0.25rem;
}

.marketplace-hero--compact {
  padding-bottom: 0.75rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.marketplace-hero--compact .market-headline {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
}

.marketplace-hero--compact .market-subline {
  margin-bottom: 0.75rem;
}

.marketplace-hero--compact .market-hero-actions {
  margin-bottom: 0;
}

.mobile-wallet-hint {
  border: 1px solid var(--trust-blue-border);
  background: var(--trust-blue-bg);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.mobile-wallet-hint__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.mobile-wallet-hint__text strong {
  color: var(--text-primary);
}

.mobile-connect-banner {
  border: 1px solid var(--trust-green-border);
  background: var(--trust-green-bg);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
}

.mobile-connect-banner__text {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.mobile-connect-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mobile-connect-banner__btn {
  flex: 1 1 auto;
  min-width: 7rem;
  justify-content: center;
  font-size: 0.8125rem;
  padding: 0.65rem 0.75rem;
}

.mobile-connect-banner__dismiss {
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  margin-left: auto;
}

.wallet-user-msg {
  font-family: inherit;
  line-height: 1.55;
  color: var(--text-secondary);
}

.wallet-user-msg--err {
  color: #f87171;
}

.trust-pillars {
  display: grid;
  gap: 0.75rem;
}

.trust-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.trust-fold {
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--bg-panel) 88%, transparent);
  overflow: hidden;
}

.trust-fold__summary {
  list-style: none;
  cursor: pointer;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: var(--touch-min);
}

.trust-fold__summary::-webkit-details-marker {
  display: none;
}

.trust-fold__summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.125rem;
  font-weight: 400;
  flex-shrink: 0;
}

.trust-fold[open] .trust-fold__summary::after {
  content: "−";
}

.trust-fold__body {
  padding: 0 0.75rem 0.75rem;
}

.trust-pillars--in-fold,
.trust-parties--in-fold {
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

.trust-parties--in-fold {
  border-radius: 0;
}

.trust-parties__head--compact {
  margin-bottom: 0.75rem;
}

.trust-parties__head--compact .trust-parties__title {
  font-size: 1rem;
}

@media (min-width: 768px) {
  .trust-stack {
    gap: 0.75rem;
  }

  .trust-fold {
    border: none;
    background: transparent;
    overflow: visible;
  }

  .trust-fold__summary {
    display: none;
  }

  .trust-fold__body {
    padding: 0;
  }

  .trust-pillars--in-fold {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
    margin-bottom: 0.75rem;
  }

  .trust-parties--in-fold {
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1rem;
    background: color-mix(in srgb, var(--bg-panel) 92%, transparent);
  }
}

.lang-menu {
  display: flex;
  align-items: center;
}

.lang-select {
  min-height: 2.25rem;
  max-width: 6.5rem;
  padding: 0.35rem 1.75rem 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa0ad' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
}

@media (min-width: 900px) {
  .trust-pillars {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

.trust-pillar {
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 1rem 1.125rem;
  background: color-mix(in srgb, var(--bg-panel) 88%, transparent);
}

.trust-pillar--strength {
  border-color: var(--trust-green-border);
  background: linear-gradient(145deg, var(--trust-green-bg) 0%, transparent 72%);
}

.trust-pillar--free {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border-medium));
}

.trust-pillar__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.trust-pillar__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display, inherit);
  font-size: clamp(1rem, 3.5vw, 1.125rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
}

.trust-pillar__body {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.trust-pillar__body strong {
  color: var(--text-primary);
}

.trust-pillar__link {
  margin-top: 0.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-bright);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.trust-pillar__link:hover {
  text-decoration: underline;
}

.trust-parties {
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1rem;
  background: color-mix(in srgb, var(--bg-panel) 92%, transparent);
}

@media (min-width: 640px) {
  .trust-parties {
    padding: 1.5rem 1.25rem;
  }
}

.trust-parties__head {
  margin-bottom: 1rem;
}

.trust-parties__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display, inherit);
  font-size: clamp(1.125rem, 3.5vw, 1.375rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
}

.trust-parties__lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.trust-parties__lead strong {
  color: var(--text-primary);
}

.trust-parties__grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 900px) {
  .trust-parties__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
  }
}

.trust-party {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: var(--bg-surface);
}

.trust-party--buyer {
  border-color: var(--trust-blue-border);
  background: linear-gradient(160deg, var(--trust-blue-bg) 0%, transparent 85%);
}

.trust-party--seller {
  border-color: var(--trust-green-border);
  background: linear-gradient(160deg, var(--trust-green-bg) 0%, transparent 85%);
}

.trust-party__role {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.trust-party__title {
  margin: 0 0 0.65rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

.trust-party__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.trust-party__list li + li {
  margin-top: 0.45rem;
}

.trust-party__list strong {
  color: var(--text-primary);
}

.trust-party__link {
  margin-top: 0.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-bright);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.protocol-network-card__status {
  margin: 0.35rem 0 0.5rem;
  color: var(--trust-green);
  line-height: 1.45;
}

/* How it works modal — plain CSS (reliable on mobile Safari / wallet browsers) */
.how-it-works-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-overflow-scrolling: touch;
}

.how-it-works-modal.is-open {
  display: flex;
}

/* Install app modal — top sheet on phone so Safari Share bar stays reachable */
#installModal.install-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 210;
  align-items: flex-start;
  justify-content: center;
  padding: max(0.65rem, env(safe-area-inset-top)) 0.65rem calc(5.25rem + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
@media (max-width: 767px) {
  #installModal.install-modal-backdrop.is-open.install-modal--ios {
    align-items: flex-start;
    padding: max(0.5rem, env(safe-area-inset-top)) 0.75rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.82) 0%,
      rgba(0, 0, 0, 0.45) 38%,
      transparent 62%
    );
  }
  #installModal.install-modal--ios .install-modal-panel {
    max-width: 22rem;
    max-height: none;
    padding: 1rem 1.1rem 1.1rem;
  }
  #installModal.install-modal--ios .install-modal-grab {
    margin-bottom: 0.5rem;
  }
  #installModal.install-modal--ios #installModalSub {
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
  }
  #installModal.install-modal--ios #installModalDone {
    margin-top: 0.85rem;
    padding: 0.65rem;
    font-size: 0.8125rem;
  }
}
.install-steps-list--compact {
  font-size: 0.8125rem;
  line-height: 1.45;
}
.install-steps-list--compact li + li {
  margin-top: 0.4rem;
}
#installModal.install-modal-backdrop.is-open {
  display: flex;
}
@media (min-width: 640px) {
  #installModal.install-modal-backdrop {
    align-items: center;
    padding: 1rem;
  }
}

/* Legal / policy modal — above how-it-works (120) */
.legal-modal-backdrop {
  z-index: 130;
}

@media (min-width: 640px) {
  .how-it-works-modal {
    align-items: center;
    padding: 1rem;
  }
}

body.modal-open {
  overflow: hidden;
}
body.modal-open .app-shell,
body.modal-open .mobile-chrome {
  pointer-events: none;
  user-select: none;
}
body.modal-open #installModal,
body.modal-open #legalModal,
body.modal-open #howItWorksModal,
body.modal-open .listing-modal-backdrop--open {
  pointer-events: auto;
  user-select: auto;
}

.how-it-works-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 48rem;
  max-height: 92vh;
  max-height: 92dvh;
  overflow: hidden;
  border: 1px solid var(--border-medium);
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);
}

@media (min-width: 640px) {
  .how-it-works-panel {
    border-radius: 1rem;
    max-height: min(90vh, 900px);
    max-height: min(90dvh, 900px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  }
}

.how-it-works__head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 640px) {
  .how-it-works__head {
    padding: 1rem 1.5rem;
  }
}

.how-it-works__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0.75rem calc(1rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 640px) {
  .how-it-works__scroll {
    padding: 1rem 1.25rem 1.25rem;
  }
}

.how-it-works-accordion .protocol-section__summary {
  font-size: 0.875rem;
  padding: 0.85rem 1rem;
}

@media (min-width: 640px) {
  .how-it-works-accordion .protocol-section__summary {
    font-size: 0.9375rem;
    padding: 0.95rem 1.1rem;
  }
}

.how-it-works-accordion .protocol-section__body {
  font-size: 0.875rem;
}

.forever-hero-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 1rem;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.08);
  max-width: 42rem;
}
.forever-hero-banner__text {
  flex: 1 1 12rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-sub, #9aa0ad);
}
.forever-hero-banner__btn {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  cursor: pointer;
}
.forever-hero-banner__btn:hover {
  background: rgba(52, 211, 153, 0.2);
}
.forever-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.forever-link-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.forever-link-row--featured .forever-link-label {
  color: #34d399;
  font-weight: 600;
}
.forever-link-row--muted .forever-link-label,
.forever-link-row--muted .forever-link-url {
  opacity: 0.75;
}
.forever-link-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9aa0ad;
}
.forever-link-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.forever-link-url {
  word-break: break-all;
  color: #34d399;
  font-weight: 500;
  font-size: 0.8125rem;
  text-decoration: none;
}
.forever-link-url:hover {
  text-decoration: underline;
}
.forever-link-url--mono {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}
.forever-copy-btn {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
  cursor: pointer;
}
.forever-copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.forever-steps {
  padding-left: 1.15rem;
}
.forever-funds-note {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.forever-accordion-teaser .protocol-section__summary span:first-child {
  color: #34d399;
}

#mobileHowItWorksBtn {
  -webkit-tap-highlight-color: transparent;
}

.mobile-wallet-tour-note {
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
}

/* Protocol guide accordion */
.protocol-guide {
  border: 1px solid var(--border-medium);
  background: linear-gradient(165deg, rgba(52, 211, 153, 0.05) 0%, rgba(255, 255, 255, 0.02) 40%, transparent 100%);
}

.protocol-guide__lead {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 52rem;
}

.protocol-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.protocol-section {
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.theme-light .protocol-section {
  background: rgba(255, 255, 255, 0.55);
}

.protocol-section[open] {
  border-color: var(--border-medium);
}

.protocol-section__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  list-style: none;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
}

.protocol-section__summary::-webkit-details-marker {
  display: none;
}

.protocol-section__summary:hover {
  color: var(--accent);
}

.protocol-section[open] .protocol-section__summary {
  color: var(--accent);
  border-bottom: 1px solid var(--border-subtle);
}

.protocol-section__chev {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  font-size: 1rem;
  line-height: 1;
  color: var(--text-muted);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.protocol-section[open] .protocol-section__chev {
  transform: rotate(45deg);
  border-color: var(--accent);
  color: var(--accent);
}

.protocol-section__body {
  padding: 1rem 1.1rem 1.15rem;
}

.protocol-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.protocol-list li {
  padding-left: 1rem;
  position: relative;
}

.protocol-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0.1rem;
  font-size: 0.5rem;
  color: var(--accent);
  opacity: 0.75;
}

.protocol-steps {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0;
}

.protocol-callout {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--trust-green-border);
  background: var(--trust-green-bg);
  line-height: 1.55;
}

.protocol-network-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .protocol-network-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.protocol-network-card {
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
}

.theme-light .protocol-network-card {
  background: rgba(255, 255, 255, 0.6);
}

.protocol-network-card__name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}

.protocol-network-card__meta {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.protocol-network-card__addr {
  word-break: break-all;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
}

.protocol-network-card__link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.protocol-network-card__link:hover {
  text-decoration: underline;
}

.protocol-network-card__link.hidden {
  display: none;
}

/* Public strength showcase (legacy — kept for legal modals) */
.strength-wall {
  border: 1px solid var(--border-medium);
  background: linear-gradient(165deg, rgba(52, 211, 153, 0.06) 0%, rgba(255, 255, 255, 0.02) 42%, transparent 100%);
}

.strength-wall__lead {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 48rem;
}

.strength-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .strength-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem;
  }
}

@media (min-width: 1024px) {
  .strength-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.strength-card {
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-light .strength-card {
  background: rgba(255, 255, 255, 0.65);
}

.strength-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.strength-card--accent {
  border-color: var(--trust-green-border);
  background: var(--trust-green-bg);
}

.strength-card__icon {
  display: block;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  opacity: 0.85;
}

.strength-card__title {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
}

.strength-card__body {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

.strength-card__body strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.strength-wall__footer .trust-chip--link {
  cursor: pointer;
  border-style: dashed;
  background: transparent;
  font: inherit;
}

.strength-wall__footer .trust-chip--link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Matrix Rules public explainer */
.matrix-rules-panel {
  border: 1px solid var(--border-medium);
  background: linear-gradient(165deg, rgba(99, 102, 241, 0.05) 0%, rgba(52, 211, 153, 0.04) 50%, transparent 100%);
}

.matrix-rules-panel__lead {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 52rem;
}

.matrix-rules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 900px) {
  .matrix-rules-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

.matrix-rules-block {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
}

.theme-light .matrix-rules-block {
  background: rgba(255, 255, 255, 0.7);
}

.matrix-rules-block__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

.matrix-rules-list strong.t-head {
  font-weight: 600;
}

.matrix-rules-table {
  border-collapse: collapse;
}

.matrix-rules-table th,
.matrix-rules-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.matrix-rules-table th {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  font-weight: 600;
}

.matrix-rules-table td strong {
  color: var(--text-primary);
}

.matrix-rules-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ── Fee board (marketplace fee table) ── */
.fee-board {
  background: var(--fee-board-bg);
  border: 1px solid var(--border-medium);
  border-radius: 1rem;
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: var(--fee-board-shadow);
}

.fee-board--protocol {
  padding: 1.25rem 1.35rem 1.35rem;
}

.fee-board__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.fee-board__title {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
}

.fee-board__sub {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.fee-board__badge {
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  color: var(--fee-lock-color);
  background: var(--accent-soft);
  border: 1px solid var(--fee-badge-border);
}

.fee-board__legend {
  margin-top: -0.25rem;
}

.fee-board__controls {
  margin-bottom: 0.85rem;
}

.fee-board__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.fee-board__input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fee-board__input {
  min-width: 0;
  padding: 0.55rem 0.75rem;
}

.fee-board__currency {
  min-width: 4.5rem;
  padding: 0.55rem 0.5rem;
}

.fee-board__sync-note {
  font-style: italic;
}

.fee-board__controls--readonly {
  margin-bottom: 0.75rem;
}

.fee-board__sync-amt {
  font-size: 1.125rem;
  font-weight: 700;
}

.fee-board__locks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 520px) {
  .fee-board__locks {
    grid-template-columns: 1fr;
  }
}

.fee-board__lock {
  background: var(--fee-board-card-bg);
  border: 1px solid var(--border-medium);
  border-radius: 0.65rem;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fee-board__lock-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.fee-board__lock-val {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.fee-board__pct {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--text-primary);
  line-height: 1.2;
}

.fee-board__pct--inline {
  display: inline;
  font-size: inherit;
}

.fee-board__pct--lock {
  color: var(--fee-lock-color);
}

.fee-board__pct--total {
  color: var(--fee-total-color);
}

.fee-board__pct--fee {
  color: var(--fee-deduct-color);
}

.fee-board__pct--gain {
  color: var(--fee-gain-color);
}

.fee-board__pct--platform {
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.fee-board-table .fee-board__pct {
  display: inline;
  font-size: 0.875rem;
}

.fee-board-table .fee-board__pct + .fee-board__hint {
  display: block;
}

.fee-board__hint {
  display: block;
  font-size: 0.625rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.35;
}

.fee-board__note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.45;
  min-width: 10rem;
}

.fee-board__legend {
  color: var(--text-secondary);
}

.fee-board__key {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.fee-board__locks--pct .fee-board__lock {
  align-items: flex-start;
}

.fee-board__estimate summary {
  list-style: none;
}

.fee-board__estimate summary::-webkit-details-marker {
  display: none;
}

.fee-board__estimate-summary::before {
  content: "+ ";
  color: var(--fee-lock-color);
}

.fee-board__estimate[open] .fee-board__estimate-summary::before {
  content: "− ";
}

.fee-estimate-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.fee-estimate-list li:last-child {
  border-bottom: 0;
}

.fee-board-table td:not(:first-child):not(:last-child) {
  white-space: nowrap;
}

.fee-board-table-wrap {
  position: relative;
  border: 1px solid var(--border-medium);
  border-radius: 0.65rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  max-width: 100%;
  background: var(--fee-board-table-bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}
.fee-board-table-wrap::-webkit-scrollbar {
  height: 6px;
}
.fee-board-table-wrap::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 999px;
}
.fee-board-scroll-hint {
  display: none;
  margin: 0.35rem 0 0.65rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
}
@media (max-width: 767px) {
  .fee-board-scroll-hint {
    display: block;
  }
  .fee-board-table-wrap {
    margin-left: -0.35rem;
    margin-right: -0.35rem;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
}

.fee-board-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.fee-board-table th,
.fee-board-table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.fee-board-table th {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  background: var(--fee-board-th-bg);
  white-space: nowrap;
}

.fee-board-table td {
  color: var(--text-secondary);
  line-height: 1.45;
}

.fee-board-table td:first-child {
  color: var(--text-primary);
  font-weight: 600;
  min-width: 7.5rem;
}

.fee-board-table td strong,
.fee-board-table .fee-board__amt {
  color: var(--text-primary);
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
}

.fee-board-table tbody tr:last-child td {
  border-bottom: 0;
}

.fee-board-table tbody tr:hover td {
  background: var(--fee-board-row-hover);
}

.fee-board-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--fee-board-th-bg) 40%, transparent);
}

.fee-board-table tbody tr:nth-child(even):hover td {
  background: var(--fee-board-row-hover);
}

.fee-board-table--compact td,
.fee-board-table--compact th {
  padding: 0.45rem 0.65rem;
}
.fee-board-table--compact {
  min-width: 28rem;
}

.fee-board-table .fee-board__rate {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.fee-board-table .fee-board__row--success td:first-child {
  color: var(--fee-lock-color);
}

.fee-board__foot {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.fee-board__tiers-title {
  margin: 0;
}

.hero-title {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--text-primary);
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  max-width: 14ch;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 36rem;
  margin-bottom: 2rem;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.5rem;
}

.hero-metric-val {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.hero-metric-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.hero-band {
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
}

.trust-top-bar {
  background: rgba(4, 5, 8, 0.55);
  backdrop-filter: blur(10px);
  border-color: var(--border-subtle) !important;
}

.brand-lockup {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.logo-img {
  width: var(--logo-size);
  height: var(--logo-size);
  border-radius: 10px;
}

.header-main-row {
  min-height: var(--header-h);
}

.header-tab-row {
  scrollbar-width: none;
}
.header-tab-row::-webkit-scrollbar { display: none; }

.header-tab-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}
.header-tab-icon-btn:hover,
.header-tab-icon-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent-bright);
}
.header-tab-icon-btn--install {
  color: var(--accent-bright);
  border-color: var(--accent-soft-border, rgba(52, 211, 153, 0.45));
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--bg-panel));
}

.modal-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent-bright);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.4rem 0.65rem;
  min-height: var(--touch-min);
  cursor: pointer;
  white-space: nowrap;
}
.modal-back-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}
.modal-back-btn.hidden {
  display: none;
}

.legal-modal-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
}
@media (max-width: 767px) {
  #themeToggleBtn,
  #notifySettingsBtn {
    display: none !important;
  }
  .legal-modal-head {
    grid-template-columns: auto 1fr auto;
  }
  .how-it-works-modal .how-it-works__head {
    align-items: flex-start;
  }
}

.listing-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle) !important;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.listing-card:hover {
  border-color: var(--accent) !important;
  transform: translateY(-1px);
  box-shadow: none;
}

.listing-photo-overlay {
  background: linear-gradient(180deg, transparent 35%, rgba(4, 5, 8, 0.82) 100%);
}

.theme-light .listing-photo-overlay {
  background: linear-gradient(180deg, transparent 35%, rgba(12, 16, 24, 0.55) 100%);
}

.listing-price-tag {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.listing-image-preview {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.listing-image-upload {
  background: var(--bg-input);
}

.fee-box {
  background: var(--bg-input);
  border-color: var(--border-subtle) !important;
}

.fee-box--success {
  border-color: var(--trust-green-border) !important;
  background: var(--trust-green-bg);
}

.fee-lines li strong {
  font-variant-numeric: tabular-nums;
}

.deal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.15s ease;
}

.deal-card--done {
  opacity: 0.88;
}

.deal-role {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.35rem;
}

.deal-meta {
  font-size: 0.6875rem;
  font-family: ui-monospace, monospace;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.5;
}

.deal-status-pill {
  align-self: flex-start;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border-medium);
  font-family: ui-monospace, monospace;
}

.deal-status-pill--ok {
  color: var(--trust-green);
  border-color: var(--trust-green-border);
  background: var(--trust-green-bg);
}

.deal-status-pill--active {
  color: var(--accent-cyan);
  border-color: var(--border-glow);
  background: var(--accent-soft);
}

.deal-status-pill--danger {
  color: var(--accent-danger);
  border-color: rgba(232, 112, 112, 0.25);
  background: rgba(232, 112, 112, 0.08);
}

.empty-state {
  background: var(--bg-panel);
}

.market-toolbar {
  position: relative;
  top: auto;
  z-index: 30;
  isolation: isolate;
  transition: box-shadow 0.2s ease;
}
.market-toolbar--pinned {
  position: sticky;
  top: calc(72px + env(safe-area-inset-top, 0px));
  box-shadow: var(--shadow-card);
}

.market-filter-select {
  min-width: 0;
  width: 100%;
  padding-right: 2.75rem !important;
}

.market-filter-field {
  min-width: 8.75rem;
}

@media (min-width: 1024px) {
  .market-filter-field {
    min-width: 0;
  }
}

.market-stats {
  position: relative;
  z-index: 2;
}

.marketplace-head,
.panel {
  position: relative;
  z-index: 2;
}

.theme-light .panel,
.theme-light .marketplace-head {
  background: color-mix(in srgb, var(--bg-page) 88%, transparent);
  border-radius: var(--radius-lg);
}

.theme-light .market-toolbar {
  box-shadow: var(--shadow-card);
}

.market-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
}
.market-stat strong { color: var(--text-primary); font-weight: 700; }

.field-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  isolation: isolate;
}

.field-stack--select { z-index: 2; }
.field-stack--select:focus-within { z-index: 25; }

.field-label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.field-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.network-badge {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border-glow);
  color: var(--accent-cyan);
  background: var(--accent-soft);
}

.field-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

select.field-control,
select.market-input,
select.chain-select:not(.chain-select--overlay),
select:not(.chain-select--overlay) {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-feature-settings: normal;
  font-variant: normal;
  text-rendering: optimizeLegibility;
  background-color: var(--bg-input) !important;
  background-image: var(--select-chevron) !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 12px 12px !important;
  padding-right: 2.25rem !important;
  cursor: pointer;
}

.market-input,
input:not([type="checkbox"]):not([type="radio"]),
textarea {
  background-color: var(--bg-input) !important;
  border: 1px solid var(--border-medium) !important;
  color: var(--text-primary) !important;
  border-radius: 0.65rem;
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.security-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sell-side-card,
.security-stack-card {
  background: var(--bg-layer-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.375rem 1.5rem;
  box-shadow: var(--shadow-card);
  min-width: 0;
  overflow: visible;
}
.sell-fee-card {
  overflow: visible;
}
.sell-fee-card .fee-board {
  overflow: visible;
}

.sell-side-card h3,
.security-stack-card h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text-primary);
  margin: 0 0 0.875rem;
}

.sell-side-card ul,
.security-stack-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sell-side-card li,
.security-stack-card li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  line-height: 1.5;
}

.sell-side-card li:last-child,
.security-stack-card li:last-child { border-bottom: none; }

.sell-side-card li::before,
.security-stack-card li::before {
  content: "";
  width: 0.35rem;
  height: 0.6rem;
  margin-top: 0.35rem;
  border-right: 2px solid var(--accent-success);
  border-bottom: 2px solid var(--accent-success);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.market-input,
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  border: 1px solid var(--border-medium) !important;
  color: var(--text-primary) !important;
  border-radius: 0.65rem;
}
.market-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-faint) !important;
  opacity: 1;
}
.market-input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft) !important;
  outline: none;
}

.hero-band {
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
}

.trust-top-bar {
  background: rgba(4, 5, 8, 0.55);
  backdrop-filter: blur(10px);
  border-color: var(--border-subtle) !important;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.trust-chip--secure {
  background: var(--trust-green-bg);
  border-color: var(--trust-green-border);
  color: var(--trust-green);
}

.fund-flow-callout {
  background: var(--bg-layer-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}

.fund-flow-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fund-flow-list li {
  padding-left: 1rem;
  border-left: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.escrow-shield-table {
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.escrow-shield-table th,
.escrow-shield-table td {
  border: 1px solid var(--border-medium);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.escrow-shield-table th {
  background: var(--bg-layer-2);
  color: var(--text-primary);
  font-weight: 600;
}

.escrow-shield-table td {
  color: var(--text-secondary);
}

.escrow-shield-table .shield-yes {
  color: var(--trust-green);
  font-weight: 600;
}

.escrow-shield-table .shield-no {
  color: var(--text-muted);
}

.escrow-shield-table .shield-lock {
  color: var(--accent);
  font-weight: 600;
  text-align: center;
}

.legal-table {
  width: 100%;
  margin: 1rem 0;
}

.trust-layer-card {
  background: var(--bg-layer-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.375rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.trust-layer-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
}

.trust-layer-card p {
  color: var(--text-secondary);
}

.toolbar-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.375rem;
}

.trust-layer-num {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: 0.05em;
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid var(--border-glow);
  margin-bottom: 0.75rem;
}

.chill-callout,
.trust-callout {
  display: block;
  padding: 1rem 1.125rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--trust-green-bg);
  border: 1px solid var(--trust-green-border);
  box-shadow: none;
}

.chill-callout strong,
.trust-callout strong {
  color: var(--text-primary);
  font-weight: 600;
}

.trust-callout-icon {
  display: none;
}

.trust-callout--success {
  background: var(--trust-green-bg);
  border-color: var(--trust-green-border);
}

.tour-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: 'DM Sans', system-ui, sans-serif;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background: var(--accent-soft);
}

.section-intro {
  max-width: 36rem;
  line-height: 1.65;
}

.panel-heading {
  margin-bottom: 0.5rem;
}

.panel-sub {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 42rem;
  margin-bottom: 2rem;
}

.deal-trust-banner {
  font-size: 0.8125rem;
  line-height: 1.55;
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
}

.deal-trust-banner--info {
  background: var(--trust-blue-bg);
  border: 1px solid var(--trust-blue-border);
  color: var(--text-secondary);
}

.deal-trust-banner--success {
  background: var(--trust-green-bg);
  border: 1px solid var(--trust-green-border);
  color: var(--trust-green);
}

.deal-trust-banner--warn {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: var(--accent-warn);
}

.deal-trust-banner--danger {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: var(--accent-danger);
}

.listing-trust-tag {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-glow);
  color: var(--accent-cyan);
}

.price-band {
  background: linear-gradient(165deg, rgba(14, 18, 28, 0.95) 0%, rgba(6, 9, 14, 0.98) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-trust-note {
  font-size: 0.8125rem;
  line-height: 1.55;
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius-md);
  background: var(--trust-green-bg);
  border: 1px solid var(--trust-green-border);
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.modal-trust-note strong {
  color: var(--trust-green);
  font-weight: 600;
}

.legal-prose .trust-highlight {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1rem 0;
}

.chain-menu {
  position: relative;
}

.chain-menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 12rem;
  padding: 0.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-medium);
  background: var(--bg-layer-2);
  box-shadow: var(--shadow-card-hover);
  z-index: 60;
}

.chain-menu-panel.hidden { display: none; }

.chain-menu-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.chain-menu-item:hover,
.chain-menu-item.active {
  background: var(--accent-soft);
}

.chain-menu-name {
  font-size: 0.875rem;
  font-weight: 600;
}

.chain-menu-meta {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.logo-mark {
  display: block;
  width: var(--logo-size);
  height: var(--logo-size);
  border-radius: 11px;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-glow);
}

.header-actions {
  align-items: center;
}

.chain-picker {
  position: relative;
  display: inline-flex;
  min-width: 7.5rem;
}

.chain-picker-face {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1.85rem 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-medium);
  background: var(--bg-layer-2);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.chain-picker-face:hover {
  border-color: var(--border-glow);
  background: var(--bg-layer-3);
}

.chain-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.network-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.network-dot--live {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(0, 214, 143, 0.45);
}

.network-dot--idle {
  background: #6b7280;
  box-shadow: none;
}

.chain-picker-chevron {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.75rem;
  height: 0.75rem;
  color: var(--text-muted);
}

.chain-select--overlay {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  opacity: 0;
  pointer-events: none;
}

.chain-select {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 1.75rem 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border-medium);
  background-color: var(--bg-layer-2) !important;
  color: var(--text-primary);
  max-width: 9.5rem;
}
.chain-select:focus {
  border-color: var(--accent);
  outline: none;
}

.status-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  background: var(--bg-glass);
  text-transform: none;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
}
.status-badge.live {
  border-color: rgba(0, 214, 143, 0.45);
  color: var(--accent-success);
  background: rgba(0, 214, 143, 0.1);
}

.arbiter-badge {
  cursor: pointer;
  border-color: rgba(251, 191, 36, 0.45);
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.12);
  font-family: 'DM Sans', system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.arbiter-badge:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.65);
}

.step-num {
  background: var(--accent-soft);
  border: 1px solid var(--border-glow);
  color: var(--accent-bright);
  font-weight: 700;
}

.fee-success-box {
  background: var(--accent-soft) !important;
  border-color: var(--border-glow) !important;
}

.legal-prose h3 {
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.25rem 0 0.5rem;
}
.legal-prose p, .legal-prose li {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
}

.modal-scroll { max-height: min(70vh, 640px); overflow-y: auto; }

.mobile-chrome {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--bg-panel-2) 96%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.22);
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  contain: layout style;
}

.mobile-nav {
  display: flex;
  gap: 0.1rem;
  width: 100%;
  padding: 0.35rem 0.35rem 0.45rem;
  margin: 0;
  background: transparent;
  border: 0;
}
.mobile-install-fab {
  display: none !important;
}
.mobile-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: var(--touch-min);
  min-width: 0;
  padding: 0.35rem 0.15rem;
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-btn svg {
  width: var(--icon-md);
  height: var(--icon-md);
}
.mobile-nav-btn.active {
  color: var(--accent-bright);
  background: var(--accent-soft);
}
.mobile-nav-btn--connected {
  color: var(--accent-bright);
}
.mobile-nav-btn--arbiter {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.12);
}

.header-tab-tools {
  background: linear-gradient(90deg, transparent, var(--bg-header) 28%);
}

.install-safari-overlay {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 3;
  pointer-events: none;
  padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 0.35rem);
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.install-safari-overlay.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.install-safari-overlay__inner {
  margin: 0 auto;
  max-width: 24rem;
  padding: 0 0.75rem;
}
.install-safari-overlay__hint {
  margin: 0 0 0.45rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}
.install-safari-overlay__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.85rem;
  background: rgba(28, 28, 30, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.install-safari-overlay__chevron {
  color: #0a84ff;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 300;
}
.install-safari-overlay__url {
  flex: 1;
  min-width: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  color: #f2f2f7;
  font-size: 0.8125rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.install-safari-overlay__share {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 2.75rem;
  color: #0a84ff;
  font-size: 0.625rem;
  font-weight: 600;
}
.install-safari-overlay__share svg {
  width: 1.15rem;
  height: 1.15rem;
}
.install-safari-overlay__pulse {
  animation: install-share-pulse 1.4s ease-in-out infinite;
}
@keyframes install-share-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(10, 132, 255, 0.75)); }
}
@media (min-width: 768px) {
  .install-safari-overlay { display: none !important; }
}

.mobile-nav-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
}

@media (max-width: 768px) {
  .mobile-chrome {
    display: block;
  }
  .app-shell {
    padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 0.5rem);
  }
  .app-main {
    min-height: auto;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }
  .panel-sell-grid {
    gap: 1.25rem;
  }
  .sell-aside-col {
    order: 2;
  }
  .sell-form-col {
    order: 1;
  }
  .btn-publish {
    font-size: 0.8125rem;
    padding: 0.75rem 0.875rem;
  }
  .site-footer {
    padding-top: 2rem;
    padding-bottom: 0.5rem;
  }
  .site-footer__grid {
    gap: 1.5rem;
  }
  .site-footer__meta {
    text-align: left;
    max-width: none;
  }
  .header-main-row {
    min-height: var(--header-h-mobile);
    height: var(--header-h-mobile);
  }
  .logo-mark {
    width: var(--logo-size-mobile);
    height: var(--logo-size-mobile);
  }
  .market-toolbar {
    top: calc(var(--header-h-mobile) + 2.75rem + env(safe-area-inset-top, 0px));
  }
  #toast {
    bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 0.75rem);
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
  .hero-cinematic {
    min-height: auto;
  }
  .market-headline,
  .panel-hero-title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    max-width: none;
  }
  .market-hero-actions {
    flex-direction: column;
  }
  .market-hero-actions .btn-primary,
  .market-hero-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }
  .protocol-section__summary {
    font-size: 0.9375rem;
    padding: 0.875rem 0.75rem;
  }
  .protocol-section__body {
    font-size: 0.9375rem;
  }
  .trust-pillar {
    padding: 0.875rem 1rem;
  }
  .trust-pillar__body {
    font-size: 0.9375rem;
  }
  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    max-width: none;
  }
  .hero-lead {
    font-size: 1rem;
  }
  .panel-sub {
    font-size: 0.9375rem;
  }
  .listing-detail-foot,
  .listing-detail-head {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .modal-panel,
  .listing-detail-panel {
    max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 380px) {
  html { font-size: 16px; }
  .mobile-nav-btn {
    font-size: 0.5rem;
    letter-spacing: 0.01em;
    padding: 0.3rem 0.08rem;
    gap: 0.15rem;
  }
  .mobile-nav-label {
    font-size: 0.5rem;
    letter-spacing: 0.02em;
  }
  .chain-picker-face {
    padding: 0.4rem 1.65rem 0.4rem 0.55rem;
    font-size: 0.75rem;
  }
  .theme-toggle {
    min-width: var(--touch-min);
    padding: 0 0.55rem;
  }
}

@media (min-width: 769px) {
  .header-actions .theme-toggle {
    min-width: auto;
  }
}

/* Touch-friendly controls */
.btn-primary,
.btn-ghost,
.field-control,
.chain-picker-face,
.theme-toggle,
.modal-close {
  min-height: 2.75rem;
}
@media (pointer: coarse) {
  .btn-primary,
  .btn-ghost {
    min-height: var(--touch-min);
  }
  .nav {
    min-height: 2.5rem;
  }
}

.fee-details summary::-webkit-details-marker { display: none; }

.buy-delivery-opt.delivery-selected,
.buy-delivery-opt:has(input:checked) {
  border-color: var(--accent) !important;
  color: var(--accent-bright) !important;
  background: var(--accent-soft) !important;
}

#toast {
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-panel,
.listing-detail-panel {
  background: var(--bg-panel-2);
  backdrop-filter: blur(16px);
}

.modal-close {
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.legal-close {
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.legal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent-bright);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.4rem 0.65rem;
  min-height: var(--touch-min);
  cursor: pointer;
  white-space: nowrap;
}

.legal-back:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.legal-back.hidden {
  display: none;
}
.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.listing-detail-head,
.listing-detail-foot {
  background: var(--bg-panel-2);
}

.listing-detail-gallery {
  position: relative;
  background: var(--bg-input);
  min-height: 12rem;
}

.listing-detail-gallery > img {
  display: none;
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
}

.listing-detail-gallery > img.active {
  display: block;
}

.listing-detail-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.listing-detail-thumb {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.55;
  background: transparent;
}

.listing-detail-thumb.active {
  opacity: 1;
  border-color: var(--accent);
}

.listing-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-detail-placeholder {
  min-height: 10rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
}

.listing-open {
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

button.listing-open.price-band {
  display: flex;
}

.listing-photo-count {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(4, 5, 8, 0.65);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.listing-loc-tag,
.listing-tag-muted {
  background: rgba(4, 5, 8, 0.55);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.listing-tag-muted {
  color: var(--text-muted);
}

.listing-type-tag,
.listing-fulfillment-tag {
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.listing-type-tag--physical {
  background: rgba(245, 166, 35, 0.14);
  color: #b45309;
}

.theme-dark .listing-type-tag--physical {
  background: rgba(245, 166, 35, 0.15);
  color: rgba(251, 191, 36, 0.95);
}

.listing-type-tag--digital {
  background: var(--accent-soft);
  color: var(--accent-cyan);
}

.listing-chain-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.listing-chain-tag {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.listing-chain-tag--1 {
  color: #627eea;
  border: 1px solid rgba(98, 126, 234, 0.35);
  background: rgba(98, 126, 234, 0.1);
}

.listing-chain-tag--8453 {
  color: #0052ff;
  border: 1px solid rgba(0, 82, 255, 0.35);
  background: rgba(0, 82, 255, 0.1);
}

.listing-chain-hint {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.listing-card-meta {
  min-width: 0;
}

.listing-card-seller {
  color: var(--text-secondary);
  font-weight: 600;
}

.listing-card-escrow {
  color: var(--text-muted);
  line-height: 1.45;
}

.listing-card-stock {
  font-variant-numeric: tabular-nums;
}

.listing-card-stock--ok {
  color: var(--fee-lock-color);
}

.listing-card-stock--out {
  color: var(--accent-warn);
}

.theme-light .listing-card-stock--ok {
  color: var(--fee-lock-color);
}

.theme-light .listing-card-escrow {
  color: var(--text-secondary);
}

.listing-qty-tag {
  background: rgba(245, 166, 35, 0.18);
  color: #b45309;
  border: 1px solid rgba(245, 166, 35, 0.35);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: none;
}

.theme-dark .listing-qty-tag {
  color: rgba(251, 191, 36, 0.95);
}

.listing-qty-tag--inline {
  display: inline-block;
}

.listing-fulfillment-tag {
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.theme-light .listing-loc-tag,
.theme-light .listing-tag-muted {
  background: var(--bg-layer-3);
  color: var(--text-secondary);
  border-color: var(--border-medium);
}

.listing-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.listing-image-preview {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.listing-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-image-remove {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
}

.buy-modal-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.buy-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deal-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.timeline-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
}

.timeline-step--done {
  border-color: var(--border-glow);
  background: var(--accent-soft);
}

.timeline-step__dot {
  font-size: 0.5625rem;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  color: var(--text-faint);
  min-width: 1.25rem;
  text-align: center;
}

.timeline-step--done .timeline-step__dot {
  color: var(--accent-cyan);
}

.timeline-step__label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin: 0;
}

.timeline-step--done .timeline-step__label {
  color: var(--text-secondary);
}

.deal-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.chat-msg {
  max-width: 85%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  font-family: ui-monospace, monospace;
  line-height: 1.5;
}

.chat-msg--out {
  background: var(--accent-soft);
  border: 1px solid var(--border-glow);
}

.chat-msg--in {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}

.market-stat strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

#toast.toast-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
  border-color: var(--trust-green-border) !important;
  background: var(--bg-panel-2) !important;
  box-shadow: none;
}

.shadow-neon { box-shadow: none; border-color: var(--border-glow); }

.fixed.inset-0.bg-black\/85 {
  background: rgba(0, 0, 0, 0.72) !important;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}

/* PWA + mobile alerts */
.pwa-install-banner,
.wallet-browser-banner {
  margin-bottom: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent-soft-border, var(--border-subtle));
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--bg-panel-2));
}
.pwa-install-banner__text,
.wallet-browser-banner__text {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
}
.pwa-install-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.pwa-install-banner__btn,
.wallet-browser-banner__btn {
  min-height: var(--touch-min);
  padding: 0.55rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
}
.pwa-install-banner__dismiss,
.wallet-browser-banner__dismiss {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 0.75rem;
  min-height: var(--touch-min);
  padding: 0.35rem 0.5rem;
}
.wallet-browser-banner {
  position: relative;
  padding-right: 2.5rem;
}
.wallet-browser-banner__dismiss {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1;
  min-height: 2.25rem;
  min-width: 2.25rem;
}

.install-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  max-height: min(58dvh, 24rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-panel-2);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), 0 24px 80px rgba(0, 0, 0, 0.55);
  isolation: isolate;
}
.theme-dark .install-modal-panel {
  background: #1a1b22;
}
.theme-light .install-modal-panel {
  background: #f8fafc;
}
.install-modal-steps {
  min-width: 0;
}
.install-modal-installed {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent-soft-border, rgba(52, 211, 153, 0.35));
  background: color-mix(in srgb, var(--accent-soft) 40%, var(--bg-panel-2));
}
.install-modal-grab {
  width: 2.5rem;
  height: 0.25rem;
  margin: 0 auto 0.75rem;
  border-radius: 999px;
  background: var(--border-medium);
}
@media (min-width: 640px) {
  .install-modal-grab { display: none; }
}

.header-tab-a2hs-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-soft-border, rgba(52, 211, 153, 0.45));
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--bg-panel));
  color: var(--accent-bright);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  min-height: 2rem;
  cursor: pointer;
}
.header-tab-a2hs-btn__icon {
  font-size: 0.875rem;
  line-height: 1;
  font-weight: 400;
}
.header-tab-a2hs-btn:active {
  transform: scale(0.98);
}

.install-ios-visual {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  text-align: center;
}
.install-ios-chrome-callout {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.1);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.install-ios-chrome-callout strong {
  color: #fcd34d;
}
.install-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch-min);
}
.install-share-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}
.install-share-hint {
  line-height: 1.45;
}
.install-ios-visual__bar {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-medium);
  color: var(--accent-bright);
  font-size: 0.875rem;
  font-weight: 700;
}
.install-ios-visual__icon {
  width: 1.1rem;
  height: 1.1rem;
}
.install-ios-visual__caption {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.install-steps-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}
.install-steps-list li + li {
  margin-top: 0.5rem;
}
.install-steps-list strong {
  color: var(--text-primary);
}
.install-app-btn svg {
  display: block;
}
@media (max-width: 767px) {
  #installAppHeaderBtn {
    display: none !important;
  }
}

.mobile-nav-icon-wrap {
  position: relative;
  display: inline-flex;
}
.mobile-nav-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--accent-bright);
  box-shadow: 0 0 0 2px var(--bg-panel-2);
}
.mobile-nav-badge.hidden { display: none; }
.listing-card .buy,
.listing-card .listing-open,
.mobile-connect-banner__btn,
.mobile-nav-btn {
  min-height: var(--touch-min);
}
@media (max-width: 768px) {
  #toast {
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 2.85rem);
    max-width: none;
  }
  .market-input,
  .field-control,
  .toolbar-label + input,
  .toolbar-label + select {
    min-height: var(--touch-min);
    font-size: 1rem;
  }
}

/* ── Mobile marketplace UX (hero, filters, skeletons, pull-refresh) ── */
.marketplace-hero--minimal .market-subline,
.marketplace-hero--minimal .market-hero-actions {
  display: none;
}
.marketplace-hero--minimal .market-headline {
  font-size: clamp(1.35rem, 5vw, 1.65rem);
  margin-bottom: 0;
}
.marketplace-hero--minimal {
  padding-bottom: 0.35rem;
  margin-bottom: 0.5rem;
}
.market-hero-expand {
  display: inline-flex;
  margin-top: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-md);
}
.marketplace-hero--minimal .market-hero-expand {
  display: inline-flex;
}
@media (max-width: 767px) {
  .marketplace-hero--minimal .forever-hero-banner,
  .marketplace-hero--minimal .protocol-badge {
    display: none;
  }
}

.listing-swipe-hint {
  width: 2.5rem;
  height: 0.25rem;
  margin: 0.35rem auto 0;
  border-radius: 999px;
  background: var(--border-medium);
  opacity: 0.7;
}
.listing-detail-panel.listing-detail-panel--dragging {
  transition: none;
}

.notify-pref-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0;
  cursor: pointer;
  color: var(--text-primary);
}
.notify-pref-row input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.listing-photo--broken {
  background: var(--bg-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-promo-slot > [hidden] {
  display: none !important;
}
.mobile-promo-slot > :not([hidden]) {
  margin-bottom: 0.75rem;
}

.market-filters-fold {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.65rem;
}
@media (min-width: 1024px) {
  .market-filters-fold {
    border-top: 0;
    padding-top: 0;
  }
  .market-filters-fold__summary {
    display: none;
  }
}
.market-filters-fold__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--touch-min);
  padding: 0.35rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
}
.market-filters-fold__summary::-webkit-details-marker {
  display: none;
}
.market-filters-fold__summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  opacity: 0.65;
  flex-shrink: 0;
}
.market-filters-fold[open] .market-filters-fold__summary::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}
.filter-active-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-bright);
}
.filter-active-badge.hidden {
  display: none;
}

.listings-grid {
  position: relative;
}
.listing-skeleton {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
}
.listing-skeleton__media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(
    90deg,
    var(--bg-layer-2) 0%,
    var(--bg-layer-3) 45%,
    var(--bg-layer-2) 90%
  );
  background-size: 200% 100%;
  animation: listing-shimmer 1.25s ease-in-out infinite;
}
.listing-skeleton__body {
  padding: 1.15rem 1.25rem 1.35rem;
}
.listing-skeleton__line {
  height: 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.55rem;
  background: linear-gradient(
    90deg,
    var(--bg-layer-2) 0%,
    var(--bg-layer-3) 45%,
    var(--bg-layer-2) 90%
  );
  background-size: 200% 100%;
  animation: listing-shimmer 1.25s ease-in-out infinite;
}
.listing-skeleton__line--sm { width: 42%; }
.listing-skeleton__line--md { width: 68%; }
.listing-skeleton__line--lg { width: 88%; }
.listing-skeleton__line--xl { width: 100%; height: 0.85rem; margin-top: 0.35rem; }
@keyframes listing-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .listing-skeleton__media,
  .listing-skeleton__line {
    animation: none;
    background: var(--bg-layer-2);
  }
  .listing-card:hover {
    transform: none;
  }
}

.listing-card .listing-photo {
  background: var(--bg-layer-2);
}
.listing-card .listing-photo[data-loaded="0"] {
  opacity: 0;
}
.listing-card .listing-photo[data-loaded="1"] {
  opacity: 1;
  transition: opacity 0.25s ease;
}

.pull-refresh-indicator {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 0.5rem);
  left: 50%;
  transform: translate(-50%, -120%);
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-medium);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 0.75rem;
  color: var(--text-secondary);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.pull-refresh-indicator--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.pull-refresh-indicator--ready .pull-refresh-indicator__spinner {
  border-top-color: var(--accent-bright);
}
.pull-refresh-indicator__spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border-medium);
  border-top-color: var(--text-muted);
  border-radius: 50%;
  animation: pull-spin 0.7s linear infinite;
}
.pull-refresh-indicator--loading .pull-refresh-indicator__spinner {
  border-top-color: var(--accent-bright);
}
@keyframes pull-spin {
  to { transform: rotate(360deg); }
}

.listing-modal-backdrop.listing-modal-backdrop--open {
  align-items: flex-end;
}
@media (max-width: 639px) {
  .listing-modal-backdrop .listing-detail-panel {
    max-height: min(100dvh, 100vh);
    border-radius: 1rem 1rem 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.listing-modal-open {
    overflow: hidden;
  }
}

.trust-stack--after-listings {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  #heroCanvas,
  .hero-canvas {
    display: none !important;
  }
}
