/* Dot Marketplace — professional UI (minimal gradients) */

:root {
  --bg: #09090b;
  --bg-subtle: #0f0f12;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --surface-3: #27272a;
  --line: #27272a;
  --line-2: #3f3f46;
  --ink: #fafafa;
  --ink-2: #a1a1aa;
  --muted: #71717a;
  --brand: #5b5ef0;
  --brand-hover: #6d70f5;
  --brand-soft: rgba(91, 94, 240, 0.12);
  --brand-muted: rgba(91, 94, 240, 0.06);
  --accent: #5b5ef0;
  --accent-ink: #ffffff;
  --accent-soft: rgba(91, 94, 240, 0.12);
  --accent-line: rgba(91, 94, 240, 0.28);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.1);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.1);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.1);
  --star: #fbbf24;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 12px 32px rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.14), 0 6px 20px rgba(0, 0, 0, 0.1);
  --hdr: rgba(9, 9, 11, 0.9);
  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
}

:root[data-theme="light"] {
  --bg: #f0f2f8;
  --bg-subtle: #e8ecf4;
  --surface: #ffffff;
  --surface-2: #f6f7fc;
  --surface-3: #ebedf3;
  --line: #e0e4ee;
  --line-2: #cdd3e0;
  --ink: #111827;
  --ink-2: #4b5563;
  --muted: #6b7280;
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-soft: rgba(79, 70, 229, 0.1);
  --brand-muted: rgba(79, 70, 229, 0.07);
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --accent-soft: rgba(79, 70, 229, 0.1);
  --accent-line: rgba(79, 70, 229, 0.22);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.1);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --shadow: 0 1px 2px rgba(79, 70, 229, 0.05), 0 12px 32px rgba(17, 24, 39, 0.07);
  --shadow-sm: 0 1px 2px rgba(79, 70, 229, 0.04), 0 4px 12px rgba(17, 24, 39, 0.05);
  --shadow-card: 0 1px 2px rgba(79, 70, 229, 0.04), 0 4px 16px rgba(17, 24, 39, 0.06);
  --hdr: rgba(248, 249, 252, 0.88);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f0f2f8;
    --bg-subtle: #e8ecf4;
    --surface: #ffffff;
    --surface-2: #f6f7fc;
    --surface-3: #ebedf3;
    --line: #e0e4ee;
    --line-2: #cdd3e0;
    --ink: #111827;
    --ink-2: #4b5563;
    --muted: #6b7280;
    --brand: #4f46e5;
    --brand-hover: #4338ca;
    --brand-soft: rgba(79, 70, 229, 0.1);
    --brand-muted: rgba(79, 70, 229, 0.07);
    --accent: #4f46e5;
    --accent-soft: rgba(79, 70, 229, 0.1);
    --accent-line: rgba(79, 70, 229, 0.22);
    --shadow-card: 0 1px 2px rgba(79, 70, 229, 0.04), 0 4px 16px rgba(17, 24, 39, 0.06);
    --hdr: rgba(248, 249, 252, 0.88);
  }
}

/* ——— base + background ——— */
html {
  background: var(--bg);
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-size: 14px;
  letter-spacing: -0.011em;
  background: transparent !important;
  min-height: 100vh;
  color: var(--ink);
}

.mono {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace !important;
}

/* Background — soft colour washes + grid */
body::before {
  content: "" !important;
  display: block !important;
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 55% at 50% -20%, var(--brand-muted), transparent 65%),
    var(--bg);
}

:root[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 90% 55% at 8% -8%, rgba(99, 102, 241, 0.18), transparent 58%),
    radial-gradient(ellipse 70% 50% at 96% 4%, rgba(168, 85, 247, 0.12), transparent 52%),
    radial-gradient(ellipse 65% 45% at 92% 92%, rgba(52, 211, 153, 0.1), transparent 50%),
    radial-gradient(ellipse 55% 40% at 4% 88%, rgba(59, 130, 246, 0.1), transparent 48%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(79, 70, 229, 0.06), transparent 55%),
    linear-gradient(165deg, #eef0fa 0%, #f2f4f9 42%, #f0f3f8 100%);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) body::before {
    background:
      radial-gradient(ellipse 90% 55% at 8% -8%, rgba(99, 102, 241, 0.18), transparent 58%),
      radial-gradient(ellipse 70% 50% at 96% 4%, rgba(168, 85, 247, 0.12), transparent 52%),
      radial-gradient(ellipse 65% 45% at 92% 92%, rgba(52, 211, 153, 0.1), transparent 50%),
      radial-gradient(ellipse 55% 40% at 4% 88%, rgba(59, 130, 246, 0.1), transparent 48%),
      radial-gradient(ellipse 80% 40% at 50% 100%, rgba(79, 70, 229, 0.06), transparent 55%),
      linear-gradient(165deg, #eef0fa 0%, #f2f4f9 42%, #f0f3f8 100%);
  }
}

body::after {
  content: "" !important;
  display: block !important;
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

:root[data-theme="light"] body::after {
  opacity: 0.65;
  background-image:
    radial-gradient(rgba(79, 70, 229, 0.07) 1px, transparent 1.5px),
    linear-gradient(rgba(79, 70, 229, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 70, 229, 0.05) 1px, transparent 1px);
  background-size: 28px 28px, 64px 64px, 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) body::after {
    opacity: 0.65;
    background-image:
      radial-gradient(rgba(79, 70, 229, 0.07) 1px, transparent 1.5px),
      linear-gradient(rgba(79, 70, 229, 0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(79, 70, 229, 0.05) 1px, transparent 1px);
    background-size: 28px 28px, 64px 64px, 64px 64px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
  }
}

.app {
  max-width: none !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 0 96px !important;
}

/* Full-width shell — only side padding, no narrow centered column */
.app > .topbar .topbar-in,
.app > #pagenav,
.app > .view {
  max-width: none !important;
  padding-left: clamp(20px, 3.5vw, 48px);
  padding-right: clamp(20px, 3.5vw, 48px);
}

.topbar {
  top: 0;
  margin-top: 0;
  width: 100%;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--hdr) !important;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: none;
}

.topbar-in {
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 20px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  margin-left: auto;
}

.searchwrap {
  max-width: 520px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand) !important;
  box-shadow: none !important;
}

.brand-mark svg circle { fill: #fff !important; }

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-name em {
  color: var(--brand);
  font-weight: 600;
}

.search {
  border-radius: var(--radius-sm);
  padding: 8px 12px 8px 36px;
  background: var(--surface-2) !important;
  border: 1px solid var(--line) !important;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search:focus {
  border-color: var(--accent-line) !important;
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface) !important;
}

.wallet {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface) !important;
  padding: 6px 8px 6px 12px;
}

.wallet .topup {
  border-radius: var(--radius-sm);
  background: var(--brand) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.wallet .topup:hover {
  background: var(--brand-hover) !important;
}

.iconbtn,
.avatar {
  border-radius: var(--radius-sm);
  background: var(--surface-2) !important;
  border: 1px solid var(--line);
}

.pagenav {
  gap: 2px;
  margin-top: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}

.ptab {
  padding: 11px 14px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease;
}

.ptab:hover {
  color: var(--ink);
  background: transparent;
}

.ptab.on {
  color: var(--brand);
  background: transparent;
  border-color: var(--brand);
}

.navdot {
  background: var(--danger) !important;
}

/* ——— trust + featured ——— */
.trust {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--surface) !important;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.trust-shield {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--success-soft) !important;
  color: var(--success) !important;
}

.feat {
  margin: 20px 0;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line) !important;
  background: var(--surface) !important;
  animation: none !important;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--brand) !important;
}

.feat-in {
  border-radius: var(--radius);
  padding: 14px 18px;
  background: transparent !important;
}

.feat-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
}

.feat-title {
  font-size: 14px;
  font-weight: 600;
}

.feat-action {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.feat-price b {
  font-size: 15px;
  font-weight: 700;
}

.feat-btn {
  flex: none !important;
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 14px 28px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand) 82%, #fff) 0%,
    var(--brand) 48%,
    color-mix(in srgb, var(--brand) 78%, #000) 100%
  ) !important;
  border: 1px solid color-mix(in srgb, var(--brand) 52%, #000) !important;
  border-bottom: 4px solid color-mix(in srgb, var(--brand) 38%, #000) !important;
  border-radius: 10px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 4px 0 color-mix(in srgb, var(--brand) 32%, #000),
    0 7px 18px rgba(0, 0, 0, 0.18) !important;
  cursor: pointer;
  transform: translateY(0);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-bottom-width 0.12s ease,
    border-bottom-color 0.12s ease,
    filter 0.15s ease;
}

.feat-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  border-bottom-color: color-mix(in srgb, var(--brand) 34%, #000) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 6px 0 color-mix(in srgb, var(--brand) 30%, #000),
    0 12px 24px rgba(0, 0, 0, 0.22) !important;
}

.feat-btn:active {
  transform: translateY(3px);
  filter: brightness(0.98);
  border-bottom-width: 1px !important;
  border-bottom-color: color-mix(in srgb, var(--brand) 45%, #000) !important;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 0 color-mix(in srgb, var(--brand) 32%, #000),
    0 3px 8px rgba(0, 0, 0, 0.14) !important;
}

/* ——— market ——— */
.mk-head h1 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.chips {
  gap: 6px;
  padding: 16px 0 8px;
}

.chip {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chip:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
}

.chip.on {
  background: var(--brand-soft) !important;
  border-color: var(--accent-line) !important;
  color: var(--brand) !important;
  box-shadow: none;
}

.chip.on .n {
  color: var(--brand) !important;
  opacity: 0.75;
}

.filters {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface) !important;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

/* ——— listing cards ——— */
.grid {
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.card {
  border-radius: var(--radius);
  transform: none !important;
  animation: none !important;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}

.card::after {
  display: none !important;
}

.card:hover {
  border-color: var(--line-2) !important;
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--brand-muted);
  transform: translateY(-2px) !important;
}

.thumb {
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.thumb::before,
.thumb::after,
.sheet-media::before,
.sheet-media::after {
  display: none !important;
}

.thumb .rings,
.sheet-media .rings {
  display: none !important;
}

.thumb .tile,
.sheet-media .tile {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  position: relative;
  z-index: 1;
}

.thumb .tile svg,
.sheet-media .tile svg {
  opacity: 0.75;
  stroke: currentColor;
}

.card:hover .tile {
  transform: none;
}

.thumb .cat-tag {
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.esc-chip {
  bottom: 10px;
  right: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--success);
  font-size: 10px;
  font-weight: 600;
}

.card-body {
  padding: 14px 15px 16px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.card-price .p {
  font-size: 16px;
  font-weight: 700;
}

.card-price .c {
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.s-vfy {
  color: var(--brand) !important;
}

.ctag.active {
  background: var(--brand-soft);
  border-color: var(--accent-line);
  color: var(--brand);
}

/* Category thumbs — soft flat tints */
.thumb-cat-accounts { background: #ede9fe !important; }
.thumb-cat-subscriptions { background: #fce7f3 !important; }
.thumb-cat-software { background: #ccfbf1 !important; }
.thumb-cat-services { background: #fef3c7 !important; }
.thumb-cat-digital { background: #f3e8ff !important; }
.thumb-cat-gaming { background: #dbeafe !important; }

:root[data-theme="dark"] .thumb-cat-accounts { background: #1e1b2e !important; }
:root[data-theme="dark"] .thumb-cat-subscriptions { background: #2a1520 !important; }
:root[data-theme="dark"] .thumb-cat-software { background: #0f2320 !important; }
:root[data-theme="dark"] .thumb-cat-services { background: #2a2210 !important; }
:root[data-theme="dark"] .thumb-cat-digital { background: #221a2e !important; }
:root[data-theme="dark"] .thumb-cat-gaming { background: #101e2e !important; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .thumb-cat-accounts { background: #1e1b2e !important; }
  :root:not([data-theme="light"]) .thumb-cat-subscriptions { background: #2a1520 !important; }
  :root:not([data-theme="light"]) .thumb-cat-software { background: #0f2320 !important; }
  :root:not([data-theme="light"]) .thumb-cat-services { background: #2a2210 !important; }
  :root:not([data-theme="light"]) .thumb-cat-digital { background: #221a2e !important; }
  :root:not([data-theme="light"]) .thumb-cat-gaming { background: #101e2e !important; }
}

/* ——— sidebar ——— */
.layout {
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
}

.rail {
  top: 72px;
}

@media (max-width: 1060px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .rail {
    position: static;
    top: auto;
  }
}

@media (max-width: 860px) {
  .layout {
    gap: 16px;
    margin-top: 16px !important;
  }

  .layout > main {
    min-width: 0;
  }

  /* Sidebar duplicates Deals/Escrow in bottom tab bar */
  .rail {
    display: none !important;
    position: static !important;
    top: auto !important;
  }

  #pagenav {
    display: none !important;
  }

  .feat-in {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .feat-title {
    width: 100%;
  }

  .feat-action {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }
}

.panel {
  border-radius: var(--radius);
  padding: 16px;
  animation: none !important;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-sm) !important;
}

.panel h2 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.deal {
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--surface-2) !important;
  border: 1px solid var(--line);
}

.pill.escrow {
  background: var(--brand-soft) !important;
  color: var(--brand) !important;
}

.how-n {
  background: var(--brand-soft) !important;
  color: var(--brand) !important;
  font-weight: 600;
}

.stat-strip {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  overflow: hidden;
}

.stat .v {
  font-size: 15px;
  font-weight: 700;
}

.rail-all {
  color: var(--brand) !important;
}

/* ——— buttons ——— */
.btn {
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-pri {
  background: var(--brand) !important;
  color: #fff !important;
  box-shadow: none !important;
  border: none !important;
}

.btn-pri::after {
  display: none !important;
}

.btn-pri:hover {
  background: var(--brand-hover) !important;
}

.btn-sec,
.btn-ghost {
  border: 1px solid var(--line);
  background: var(--surface);
}

.auth-btns .btn-up,
.auth-go {
  background: var(--brand) !important;
  box-shadow: none !important;
}

.auth-btns .btn-in:hover {
  border-color: var(--accent-line) !important;
  background: var(--brand-soft) !important;
  color: var(--brand) !important;
}

/* ——— forum / chat / wallet ——— */
.composer,
.thread,
.chatitem {
  border-radius: var(--radius);
  background: var(--surface) !important;
  border: 1px solid var(--line);
}

.thread h3 {
  font-size: 15px;
  font-weight: 600;
}

.chat-send {
  background: var(--brand) !important;
  box-shadow: none !important;
}

.chat-attach {
  background: var(--surface-2) !important;
  border-color: var(--line) !important;
}

.chat-attach:hover:not(:disabled) {
  color: var(--brand) !important;
  border-color: var(--accent-line) !important;
  background: var(--brand-soft) !important;
}

.chatitem.on {
  background: var(--brand-soft) !important;
}

.walt-card {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-sm) !important;
  color: var(--ink);
}

.walt-card::before {
  display: none !important;
}

.auth-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.sheet {
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  max-height: min(88vh, 760px);
  width: min(880px, 100%);
  background: var(--surface);
}

.sheet-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sheet-footer {
  flex: none;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.sheet-footer .buybar {
  margin-top: 0;
  display: flex;
  gap: 10px;
}

.sheet-footer .buybar .btn {
  flex: 1;
}

@media (max-width: 720px) {
  .overlay {
    align-items: flex-end;
    padding: 0;
  }

  .sheet {
    width: 100%;
    max-height: min(94dvh, 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .sheet-media {
    min-height: 120px !important;
  }

  .sheet-info {
    padding: 20px 16px 16px;
  }

  .sheet-footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
  }

  .sheet-footer .buybar {
    flex-direction: column;
    gap: 8px;
  }

  .sheet-footer .buybar .btn {
    flex: none;
    width: 100%;
  }

  .sheet-seller {
    flex-wrap: wrap;
  }

  .sheet-seller .msg {
    margin-left: 0;
    width: 100%;
    text-align: center;
    margin-top: 4px;
  }
}

.toast {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.tabbar .tab.on {
  color: var(--brand);
}

.tabbar .tab-sell,
.tabbar .fab {
  background: var(--brand) !important;
  box-shadow: none !important;
}

.view.on {
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sk .a,
.sk .b,
.sk .c {
  animation-duration: 1.2s;
}

/* ============================================================
   Responsive — mobile & tablet
   ============================================================ */

/* Tablet: 2-column cards */
@media (min-width: 481px) and (max-width: 860px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .deal-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Phone: single column */
@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile + bottom tab bar */
@media (max-width: 860px) {
  .app {
    padding: 0 0 calc(88px + env(safe-area-inset-bottom, 0)) !important;
  }

  .app > .topbar .topbar-in,
  .app > #pagenav,
  .app > .view {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar-in {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    gap: 10px !important;
    flex-wrap: wrap;
    align-items: center;
  }

  .topbar-actions {
    margin-left: auto;
    gap: 8px;
    flex-shrink: 0;
  }

  #authSlot {
    display: flex;
    align-items: center;
  }

  .auth-btns {
    flex-wrap: nowrap;
  }

  .searchwrap {
    order: 10;
    flex-basis: 100%;
    max-width: none !important;
  }

  .brand {
    flex: 1;
    min-width: 0;
  }

  .brand-name {
    font-size: 14px !important;
  }

  .wallet .cur {
    display: none;
  }

  .trust {
    margin-top: 14px;
    padding: 10px 12px;
    gap: 10px;
  }

  .trust p {
    font-size: 12.5px;
  }

  .trust-shield {
    width: 30px;
    height: 30px;
  }

  .feat {
    margin: 14px 0;
  }

  .feat-in {
    padding: 12px 14px;
  }

  .feat-btn {
    padding: 10px 18px !important;
    font-size: 13px !important;
    border-bottom-width: 3px !important;
  }

  .mk-head h1 {
    font-size: 18px;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 10px 12px;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .filters > * {
    flex: none;
  }

  .filters .reset {
    margin-left: auto;
  }

  .toggle .tl {
    white-space: nowrap;
  }

  .grid {
    gap: 12px;
  }

  .card-body {
    padding: 12px 13px 14px;
  }

  .composer {
    flex-wrap: wrap;
    gap: 10px;
  }

  .composer-in {
    flex-basis: 100%;
    order: 2;
    padding: 8px 0;
  }

  .composer .composer-btn {
    order: 3;
    width: 100%;
  }

  .thread {
    padding: 14px;
  }

  .thread-tag {
    display: none;
  }

  .comm-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .esc-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    gap: 12px;
  }

  .esc-hero-shield {
    display: none !important;
  }

  .esc-steps {
    grid-template-columns: 1fr;
  }

  .deal-list {
    grid-template-columns: 1fr !important;
  }

  .deal-act {
    flex-direction: column;
  }

  .deal-act .btn {
    width: 100%;
  }

  .walt {
    gap: 12px;
  }

  .walt-amt {
    font-size: 28px !important;
  }

  .walt-btns {
    flex-direction: column;
  }

  .walt-btns .btn {
    width: 100%;
  }

  .chatwrap {
    height: calc(100dvh - 220px - env(safe-area-inset-bottom, 0)) !important;
    min-height: 320px !important;
    margin-top: 12px;
    border-radius: var(--radius);
  }

  .tabbar {
    z-index: 80;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
  }

  .toasts {
    bottom: calc(88px + env(safe-area-inset-bottom, 0)) !important;
  }

  .overlay.auth-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .auth-card {
    width: 100%;
    max-height: min(94dvh, 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .auth-formside {
    padding: 24px 18px 20px !important;
  }

  .avamenu {
    right: 16px;
    left: 16px;
    min-width: 0;
  }
}

/* Small phones */
@media (max-width: 400px) {
  .feat-action {
    flex-direction: column;
    align-items: stretch;
  }

  .feat-btn {
    width: 100% !important;
    justify-content: center;
  }

  .sheet-info h3 {
    font-size: 17px;
  }

  .sheet-price .p {
    font-size: 22px;
  }
}
