/* ═══════════════════════════════════════════════════════
   GISTRO — Design System
   Mobile-first · Celulares usados · La Plata
═══════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --blue:        #1847D4;
  --blue-dk:     #1238B0;
  --blue-lt:     #EEF2FD;
  --blue-md:     #C5D3F7;

  --green:       #059669;
  --green-dk:    #047857;
  --green-lt:    #ECFDF5;
  --green-bd:    rgba(5,150,105,.18);

  --amber:       #D97706;
  --amber-lt:    #FFFBEB;
  --amber-bd:    rgba(217,119,6,.2);

  --red:         #DC2626;
  --red-lt:      #FEF2F2;
  --red-bd:      rgba(220,38,38,.2);

  --ink:         #0D0D0D;
  --ink-2:       #3D3D3D;
  --ink-3:       #6B6B6B;
  --ink-4:       #A0A0A0;

  --bg:          #F5F4F0;
  --sf:          #FFFFFF;
  --bd:          #E4E2DB;
  --bd-2:        #C8C6BF;

  --sh-xs: 0 1px 2px rgba(0,0,0,.05);
  --sh-sm: 0 1px 4px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --sh-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --sh-lg: 0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.04);
  --sh-xl: 0 16px 48px rgba(0,0,0,.12), 0 8px 16px rgba(0,0,0,.06);
  --sh-blue:  0 4px 16px rgba(24,71,212,.28);
  --sh-green: 0 4px 14px rgba(5,150,105,.24);

  --r-xs:   5px;
  --r-sm:   9px;
  --r-md:   13px;
  --r-lg:   17px;
  --r-xl:   22px;
  --r-full: 9999px;

  --nav-h:  62px;
  --hdr-h:  54px;
  --ease:   .16s cubic-bezier(.4,0,.2,1);
  --spring: .2s cubic-bezier(.34,1.56,.64,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* overflow-x on html (not body) — prevents the body overflow from propagating
   to the viewport in a way that collapses body width in some browsers */
html {
  width: 100%;
  background: var(--bg);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  width: 100%;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--sf);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
button { font-family: inherit; cursor: pointer; }
a { text-decoration: none; color: inherit; }
input, select, textarea { font-family: inherit; }

/* ── App shell ── */
#app {
  width: 100%;
  display: flex; flex-direction: column; min-height: 100vh;
}
#app-body { display: block; }
#sidebar  { display: none; }

#main {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Clear fixed bottom nav */
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
}

.view { display: none; }
.view--active { display: block; }

/* ── Header ── */
#hdr {
  position: sticky; top: 0; z-index: 60;
  height: var(--hdr-h);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center;
  padding: 0 16px; gap: 8px;
}

.hdr-brand {
  display: flex; align-items: center; gap: 8px; flex: 1;
}
.brand-mark {
  width: 28px; height: 28px;
  background: var(--blue); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-name {
  font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.7px;
}
.brand-city {
  font-size: 11px; font-weight: 600; color: var(--ink-4);
  background: var(--bg); border: 1px solid var(--bd);
  border-radius: var(--r-full); padding: 2px 8px;
  margin-left: 2px; letter-spacing: .1px;
}

#hdr-title {
  flex: 1; font-size: 15px; font-weight: 700; color: var(--ink);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hdr-actions { display: flex; align-items: center; gap: 4px; }

#btn-back {
  width: 34px; height: 34px; border: none; background: none;
  border-radius: 50%; display: none; align-items: center; justify-content: center;
  color: var(--ink); transition: background var(--ease); -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
#btn-back:hover { background: var(--bg); }

/* ── Bottom Nav ── */
#nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  width: 100%;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--bd);
  display: flex; align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 60;
}

.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; min-width: 0;
  border: none; background: none;
  font-size: 10px; font-weight: 600; color: var(--ink-4);
  padding: 8px 4px;
  transition: color var(--ease); -webkit-tap-highlight-color: transparent;
  letter-spacing: .1px; line-height: 1.2; cursor: pointer;
}
.nav-item svg { width: 21px; height: 21px; flex-shrink: 0; transition: transform var(--spring); }
.nav-item:active svg { transform: scale(.88); }
.nav-item--active { color: var(--blue); }

/* Publish item — icon gets the blue pill treatment */
.nav-item--publish { color: var(--ink-4); }
.nav-publish-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-blue);
  transition: background var(--ease), transform var(--spring);
}
.nav-item--publish:active .nav-publish-icon { transform: scale(.91); background: var(--blue-dk); }
.nav-publish-icon svg { width: 18px; height: 18px; }

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: var(--r-full);
  max-width: min(400px, calc(100vw - 40px)); text-align: center;
  z-index: 200; opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none; white-space: nowrap;
}
.toast--in    { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--ok    { background: var(--green); }
.toast--error { background: var(--red); }

/* ════════════════════════════════════════
   FEED
════════════════════════════════════════ */

.feed-hdr {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 20px 16px 14px;
}
.feed-hdr__left h1 { font-size: 26px; font-weight: 800; letter-spacing: -.7px; line-height: 1.1; }
.feed-hdr__left p  { font-size: 13px; color: var(--ink-3); margin-top: 3px; font-weight: 500; }

/* Search + filter row */
.search-row {
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px 12px;
}
.search-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1.5px solid var(--bd);
  border-radius: var(--r-md); padding: 10px 13px;
  transition: border-color var(--ease);
}
.search-wrap:focus-within { border-color: var(--blue); }
.search-wrap svg { width: 15px; height: 15px; color: var(--ink-4); flex-shrink: 0; }
.search-wrap input {
  flex: 1; border: none; background: none; font-size: 14px; color: var(--ink);
  outline: none; min-width: 0;
}
.search-wrap input::placeholder { color: var(--ink-4); }

.filter-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  border: 1.5px solid var(--bd); background: var(--sf);
  border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); transition: all var(--ease); -webkit-tap-highlight-color: transparent;
  position: relative;
}
.filter-btn:hover { border-color: var(--bd-2); }
.filter-btn--active { border-color: var(--blue); color: var(--blue); background: var(--blue-lt); }
.filter-btn svg { width: 17px; height: 17px; }
.filter-badge {
  position: absolute; top: -5px; right: -5px;
  width: 16px; height: 16px; background: var(--blue); border-radius: 50%;
  font-size: 9px; font-weight: 800; color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--sf);
}

/* Active filters row */
.active-filters {
  display: flex; gap: 6px; padding: 0 16px 12px;
  overflow-x: auto; scrollbar-width: none;
}
.active-filters::-webkit-scrollbar { display: none; }
.active-filter-chip {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  padding: 5px 10px; background: var(--blue-lt); border: 1.5px solid var(--blue-md);
  border-radius: var(--r-full); font-size: 12px; font-weight: 700; color: var(--blue);
  -webkit-tap-highlight-color: transparent;
}
.active-filter-chip svg { width: 12px; height: 12px; }

/* Results count */
.results-count {
  padding: 0 16px 12px;
  font-size: 12px; color: var(--ink-4); font-weight: 500;
}

/* Grid */
.grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 0 16px;
}
@media (max-width: 330px) { .grid { grid-template-columns: 1fr; } }

/* ── Phone Card ── */
.pcard {
  background: var(--sf); border-radius: var(--r-lg);
  border: 1px solid var(--bd); overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: transform var(--ease), box-shadow var(--ease);
  cursor: pointer; outline: none;
  -webkit-tap-highlight-color: transparent;
}
.pcard:hover  { transform: translateY(-2px); box-shadow: var(--sh-md); }
.pcard:active { transform: scale(.97); box-shadow: var(--sh-xs); }
.pcard:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.pcard__img {
  height: 120px; display: flex; align-items: center;
  justify-content: center; position: relative; overflow: hidden;
}
.pcard__img-icon { width: 54px; height: 54px; }
.pcard__cond {
  position: absolute; top: 8px; left: 8px;
  background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r-full); padding: 2px 8px;
  font-size: 9px; font-weight: 800; color: #fff; letter-spacing: .2px; text-transform: uppercase;
}

.pcard__body { padding: 10px 11px 12px; }
.pcard__brand { font-size: 10px; font-weight: 700; color: var(--ink-4); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.pcard__model { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.25; margin-bottom: 3px; }
.pcard__storage { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-bottom: 6px; }
.pcard__price { font-size: 18px; font-weight: 900; color: var(--ink); letter-spacing: -.5px; margin-bottom: 8px; }

.pcard__signals { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }

.pcard__footer {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding-top: 8px; border-top: 1px solid var(--bd);
}
.pcard__zone { font-size: 10px; color: var(--ink-4); display: flex; align-items: center; gap: 3px; }
.pcard__zone svg { width: 10px; height: 10px; }
.pcard__seller-verified {
  width: 16px; height: 16px; background: var(--blue); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pcard__seller-verified svg { width: 8px; height: 8px; color: #fff; }

/* ── Signal badges ── */
.signal {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: var(--r-full);
  font-size: 9px; font-weight: 800; letter-spacing: .1px; white-space: nowrap;
}
.signal svg { width: 9px; height: 9px; flex-shrink: 0; }
.signal--battery { background: var(--green-lt); color: var(--green); }
.signal--battery-mid { background: var(--amber-lt); color: var(--amber); }
.signal--battery-low { background: var(--red-lt); color: var(--red); }
.signal--battery-pending { background: var(--bg); color: var(--ink-3); border: 1px solid var(--bd); }
.signal--checklist { background: var(--blue-lt); color: var(--blue); }
.signal--verified   { background: var(--green-lt); color: var(--green); }
.signal--unlocked   { background: var(--blue-lt); color: var(--blue); }
.signal--locked     { background: var(--amber-lt); color: var(--amber); }

/* ── Badge (shared) ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0;
}
.badge--green  { background: var(--green-lt); color: var(--green); }
.badge--blue   { background: var(--blue-lt);  color: var(--blue); }
.badge--amber  { background: var(--amber-lt); color: var(--amber); }
.badge--red    { background: var(--red-lt);   color: var(--red); }
.badge--gray   { background: var(--bg);       color: var(--ink-3); border: 1px solid var(--bd); }

/* ── Empty state ── */
.empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 28px; text-align: center;
}
.empty__ico {
  width: 54px; height: 54px; background: var(--bg); border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center; color: var(--ink-4); margin-bottom: 16px;
}
.empty__ico svg { width: 24px; height: 24px; }
.empty__title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.empty__sub   { font-size: 13px; color: var(--ink-3); line-height: 1.6; max-width: 260px; margin-bottom: 24px; }

/* ════════════════════════════════════════
   PRODUCT DETAIL
════════════════════════════════════════ */

.det-hero {
  height: 240px; display: flex; align-items: center;
  justify-content: center; position: relative; overflow: hidden;
}
.det-hero__icon { width: 108px; height: 108px; position: relative; z-index: 1; }
.det-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.4));
}

.det-body { padding: 0 16px 120px; }

/* Condition + posted row */
.det-toprow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 10px;
}
.det-posted { font-size: 12px; color: var(--ink-4); }

.det-title { font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; margin-bottom: 4px; }
.det-sub   { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }

.det-price { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 0; }

/* ── Divider ── */
.divider { height: 1px; background: var(--bd); margin: 18px 0; }

/* ── Section label ── */
.section-lbl {
  font-size: 11px; font-weight: 800; color: var(--ink-4);
  text-transform: uppercase; letter-spacing: .7px; margin-bottom: 12px;
}

/* ── Spec table ── */
.spec-table { display: flex; flex-direction: column; }
.spec-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--bd);
}
.spec-row:last-child { border-bottom: none; }
.spec-row__label { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.spec-row__val   { font-size: 13px; color: var(--ink); font-weight: 700; text-align: right; }
.spec-row__val--green { color: var(--green); }
.spec-row__val--amber { color: var(--amber); }
.spec-row__val--red   { color: var(--red); }

/* ── Battery section ── */
.battery-section {
  background: var(--bg); border: 1px solid var(--bd);
  border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 6px;
}
.battery-section--verified {
  background: var(--green-lt); border-color: var(--green-bd);
}
.battery-section--pending {
  background: var(--amber-lt); border-color: var(--amber-bd);
}

.battery-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.battery-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--ink);
}
.battery-label svg { width: 15px; height: 15px; }
.battery-status {
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}
.battery-status svg { width: 11px; height: 11px; }
.battery-status--ok      { color: var(--green); }
.battery-status--pending { color: var(--amber); }
.battery-status--none    { color: var(--ink-4); }

.battery-track {
  height: 8px; background: rgba(0,0,0,.08);
  border-radius: 4px; overflow: hidden; margin-bottom: 8px;
}
.battery-fill {
  height: 100%; border-radius: 4px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.battery-fill--high { background: var(--green); }
.battery-fill--mid  { background: var(--amber); }
.battery-fill--low  { background: var(--red); }

.battery-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.battery-pct  { font-size: 22px; font-weight: 900; color: var(--ink); letter-spacing: -.5px; }
.battery-note { font-size: 11px; color: var(--ink-3); max-width: 160px; text-align: right; line-height: 1.4; }

/* ── Checklist section ── */
.checklist-section { margin-bottom: 6px; }
.checklist-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.check-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; background: var(--bg);
  border: 1px solid var(--bd); border-radius: var(--r-sm);
}
.check-item--ok   { background: var(--green-lt); border-color: var(--green-bd); }
.check-item--no   { background: var(--amber-lt); border-color: var(--amber-bd); }
.check-item--miss { background: var(--bg); border-color: var(--bd); }

.check-ico {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.check-ico--ok   { background: var(--green); }
.check-ico--no   { background: var(--amber); }
.check-ico--miss { background: var(--bd-2); }
.check-ico svg   { width: 9px; height: 9px; color: #fff; }

.check-lbl { font-size: 11px; font-weight: 600; color: var(--ink-2); line-height: 1.2; }

/* Checklist summary (incomplete) */
.checklist-incomplete {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--bg);
  border: 1px solid var(--bd); border-radius: var(--r-md);
}
.checklist-incomplete svg { width: 16px; height: 16px; color: var(--ink-4); flex-shrink: 0; }
.checklist-incomplete p { font-size: 13px; color: var(--ink-3); line-height: 1.4; }

/* Repair notice */
.repair-notice {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 13px; background: var(--amber-lt);
  border: 1px solid var(--amber-bd); border-radius: var(--r-sm);
  margin-top: 10px;
}
.repair-notice svg { width: 15px; height: 15px; color: var(--amber); flex-shrink: 0; margin-top: 1px; }
.repair-notice div { font-size: 12px; color: var(--amber); line-height: 1.5; }
.repair-notice strong { font-weight: 800; display: block; margin-bottom: 2px; }

/* ── Seller card ── */
.seller-card {
  display: flex; align-items: center; gap: 13px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.seller-card:hover .seller-card__name { color: var(--blue); }

.seller-av {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue-lt); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
  border: 2px solid var(--blue-md);
}
.seller-card__info { flex: 1; min-width: 0; }
.seller-card__name {
  font-size: 15px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: 5px; margin-bottom: 3px;
  transition: color var(--ease);
}
.seller-verified-ico {
  width: 16px; height: 16px; background: var(--blue); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.seller-verified-ico svg { width: 8px; height: 8px; color: #fff; }
.seller-card__meta {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-3); flex-wrap: wrap;
}
.seller-card__rating { display: flex; align-items: center; gap: 3px; font-weight: 700; color: var(--ink-2); }
.seller-card__rating svg { width: 11px; height: 11px; color: #F59E0B; }
.seller-card__sep { color: var(--ink-4); }
.seller-card__zone { display: flex; align-items: center; gap: 3px; }
.seller-card__zone svg { width: 11px; height: 11px; }

.seller-card__arrow { color: var(--ink-4); flex-shrink: 0; }
.seller-card__arrow svg { width: 16px; height: 16px; }

/* ── Sticky CTA ── */
.det-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  width: 100%;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--bd);
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
}
.det-cta__row { display: flex; align-items: center; gap: 12px; }
.det-cta__price { flex-shrink: 0; }
.det-cta__price-lbl { font-size: 10px; font-weight: 700; color: var(--ink-4); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 1px; }
.det-cta__price-val { font-size: 18px; font-weight: 900; color: var(--ink); letter-spacing: -.4px; }
.det-cta__price-val span { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }

/* ════════════════════════════════════════
   PUBLISH FLOW (3 steps)
════════════════════════════════════════ */

.pub-hdr { padding: 20px 16px 16px; }
.pub-hdr h1 { font-size: 24px; font-weight: 800; letter-spacing: -.6px; margin-bottom: 4px; }
.pub-hdr p  { font-size: 13px; color: var(--ink-3); font-weight: 500; }

/* Step indicator */
.step-indicator {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 0 16px 20px;
}
.step-dot {
  display: flex; align-items: center; gap: 8px;
}
.step-dot__circle {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  border: 2px solid var(--bd); color: var(--ink-4); background: var(--sf);
  transition: all var(--ease);
}
.step-dot__label { font-size: 11px; font-weight: 600; color: var(--ink-4); }
.step-dot--active .step-dot__circle  { border-color: var(--blue); color: var(--blue); background: var(--blue-lt); }
.step-dot--active .step-dot__label  { color: var(--blue); font-weight: 700; }
.step-dot--done .step-dot__circle   { border-color: var(--green); background: var(--green); color: #fff; }
.step-dot--done .step-dot__label    { color: var(--green); }
.step-connector { flex: 1; height: 1px; background: var(--bd); max-width: 32px; }
.step-connector--done { background: var(--green); }

/* Form */
.pub-form { padding: 0 16px 32px; display: flex; flex-direction: column; gap: 16px; }
.pub-step { display: none; }
.pub-step--active { display: block; }

/* Photo upload area */
.photo-upload {
  border: 2px dashed var(--bd-2); border-radius: var(--r-lg);
  padding: 28px; text-align: center; cursor: pointer;
  transition: all var(--ease); -webkit-tap-highlight-color: transparent;
  background: var(--bg);
}
.photo-upload:hover { border-color: var(--blue); background: var(--blue-lt); }
.photo-upload svg   { width: 24px; height: 24px; color: var(--ink-4); margin: 0 auto 8px; }
.photo-upload__title { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 3px; }
.photo-upload__sub   { font-size: 12px; color: var(--ink-4); }

/* Battery verification form */
.battery-guide {
  background: var(--bg); border: 1px solid var(--bd);
  border-radius: var(--r-md); padding: 16px; margin-bottom: 16px;
}
.battery-guide__title {
  font-size: 13px; font-weight: 800; color: var(--ink); margin-bottom: 10px;
  display: flex; align-items: center; gap: 7px;
}
.battery-guide__title svg { width: 14px; height: 14px; color: var(--blue); }
.battery-guide__step {
  display: flex; gap: 10px; margin-bottom: 8px;
}
.battery-guide__step:last-child { margin-bottom: 0; }
.battery-guide__n {
  width: 18px; height: 18px; border-radius: 50%; background: var(--blue);
  color: #fff; font-size: 9px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.battery-guide__txt { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.battery-guide__txt strong { font-weight: 800; color: var(--ink); }

.device-selector { display: flex; gap: 8px; margin-bottom: 16px; }
.device-option {
  flex: 1; padding: 12px; border: 1.5px solid var(--bd);
  border-radius: var(--r-md); text-align: center; cursor: pointer;
  transition: all var(--ease); -webkit-tap-highlight-color: transparent;
}
.device-option:hover { border-color: var(--blue-md); }
.device-option--active { border-color: var(--blue); background: var(--blue-lt); }
.device-option__label { font-size: 13px; font-weight: 700; color: var(--ink); }
.device-option__sub   { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

.pct-input-wrap { position: relative; margin-bottom: 8px; }
.pct-input {
  width: 100%; height: 64px; font-size: 32px; font-weight: 900; letter-spacing: -1px;
  text-align: center; background: var(--bg);
  border: 1.5px solid var(--bd); border-radius: var(--r-md);
  color: var(--ink); outline: none; font-family: inherit;
  transition: border-color var(--ease);
  -webkit-appearance: none; appearance: none;
}
.pct-input:focus { border-color: var(--blue); }
.pct-suffix {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 20px; font-weight: 700; color: var(--ink-3); pointer-events: none;
}

/* Checklist publish form */
.checklist-form { display: flex; flex-direction: column; gap: 8px; }
.check-toggle {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--bg); border: 1.5px solid var(--bd);
  border-radius: var(--r-md); cursor: pointer;
  transition: all var(--ease); -webkit-tap-highlight-color: transparent;
}
.check-toggle--on  { background: var(--green-lt); border-color: var(--green-bd); }
.check-toggle--off { background: var(--bg); border-color: var(--bd); }
.check-toggle__ico {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background var(--ease);
}
.check-toggle--on  .check-toggle__ico { background: var(--green); }
.check-toggle--off .check-toggle__ico { background: var(--bd-2); }
.check-toggle__ico svg { width: 12px; height: 12px; color: #fff; }
.check-toggle__info { flex: 1; }
.check-toggle__label { font-size: 13px; font-weight: 700; color: var(--ink); }
.check-toggle__desc  { font-size: 11px; color: var(--ink-3); margin-top: 1px; }

/* Publish success */
.pub-success {
  padding: 40px 20px 32px; text-align: center;
  animation: fadeUp .25s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.success-ico {
  width: 72px; height: 72px; background: var(--green-lt);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  animation: pop .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop {
  from { transform: scale(.3); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-ico svg { width: 34px; height: 34px; color: var(--green); }
.success-title { font-size: 22px; font-weight: 800; letter-spacing: -.4px; margin-bottom: 8px; }
.success-sub   { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin-bottom: 24px; max-width: 280px; margin-left: auto; margin-right: auto; }

.pub-preview-card {
  display: flex; align-items: center; gap: 13px;
  background: var(--bg); border: 1px solid var(--bd);
  border-radius: var(--r-md); padding: 13px; text-align: left; margin-bottom: 24px;
}
.pub-preview-card__thumb {
  width: 50px; height: 50px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pub-preview-card__name  { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.pub-preview-card__price { font-size: 13px; color: var(--ink-2); }
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--green); margin-top: 4px;
}
.live-dot {
  width: 6px; height: 6px; background: var(--green); border-radius: 50%;
  animation: blink 1.5s ease infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .2; } }

/* ════════════════════════════════════════
   MY LISTINGS
════════════════════════════════════════ */

.section-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 16px 16px;
}
.section-hdr__title { font-size: 24px; font-weight: 800; letter-spacing: -.6px; }
.section-hdr__sub   { font-size: 13px; color: var(--ink-3); margin-top: 3px; }

.listing-list { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }

.listing-card {
  background: var(--sf); border: 1px solid var(--bd);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm);
}
.listing-card__main {
  display: flex; align-items: center; gap: 13px;
  padding: 13px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.listing-card__thumb {
  width: 56px; height: 56px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.listing-card__info { flex: 1; min-width: 0; }
.listing-card__name  { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.listing-card__specs { font-size: 12px; color: var(--ink-3); margin-bottom: 5px; }
.listing-card__price { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }
.listing-card__actions {
  display: flex; border-top: 1px solid var(--bd);
}
.listing-action {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px; border: none; background: none;
  font-size: 12px; font-weight: 700; color: var(--ink-3);
  transition: background var(--ease), color var(--ease); cursor: pointer;
  font-family: inherit; -webkit-tap-highlight-color: transparent;
}
.listing-action:not(:last-child) { border-right: 1px solid var(--bd); }
.listing-action:hover { background: var(--bg); color: var(--ink); }
.listing-action--danger:hover { background: var(--red-lt); color: var(--red); }
.listing-action svg { width: 14px; height: 14px; }

/* Pending signals on listing */
.listing-card__signals { display: flex; gap: 5px; padding: 0 13px 13px; flex-wrap: wrap; }

/* ════════════════════════════════════════
   SELLER / PROFILE
════════════════════════════════════════ */

.profile-hero {
  padding: 28px 16px 20px;
  display: flex; align-items: center; gap: 16px;
}
.profile-av-lg {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--blue-lt); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; flex-shrink: 0;
  border: 2px solid var(--blue-md);
}
.profile-hero__info { flex: 1; }
.profile-hero__name {
  font-size: 20px; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
}
.profile-hero__since { font-size: 12px; color: var(--ink-4); margin-bottom: 6px; }
.profile-hero__zone  { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 4px; }
.profile-hero__zone svg { width: 12px; height: 12px; }

.profile-stats {
  display: flex; margin: 0 16px 28px; max-width: 480px;
  background: var(--bg); border: 1px solid var(--bd);
  border-radius: var(--r-lg); overflow: hidden;
}
.pstat {
  flex: 1; padding: 16px 8px; text-align: center;
  border-right: 1px solid var(--bd);
}
.pstat:last-child { border-right: none; }
.pstat__n   { font-size: 22px; font-weight: 900; letter-spacing: -.5px; margin-bottom: 2px; }
.pstat__lbl { font-size: 11px; font-weight: 600; color: var(--ink-3); }

/* Rep stars */
.rep-stars { display: flex; align-items: center; gap: 3px; margin-bottom: 10px; }
.rep-star { width: 18px; height: 18px; }
.rep-star--on    { color: #F59E0B; }
.rep-star--empty { color: var(--bd-2); }
.rep-count { font-size: 13px; color: var(--ink-3); margin-left: 4px; }

.review-list { display: flex; flex-direction: column; gap: 10px; }
.review-item {
  background: var(--bg); border-radius: var(--r-md);
  border: 1px solid var(--bd); padding: 13px;
}
.review-item__head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px;
}
.review-item__author { font-size: 13px; font-weight: 700; }
.review-item__date   { font-size: 11px; color: var(--ink-4); }
.review-item__stars  { display: flex; gap: 2px; margin-bottom: 5px; }
.review-item__stars svg { width: 13px; height: 13px; color: #F59E0B; }
.review-item__text   { font-size: 13px; color: var(--ink-2); line-height: 1.55; }

/* Menu list */
.menu-section { margin: 0 16px 20px; }
.menu-section__lbl {
  font-size: 11px; font-weight: 800; color: var(--ink-4);
  text-transform: uppercase; letter-spacing: .7px; margin-bottom: 8px;
}
.menu-list {
  background: var(--sf); border: 1px solid var(--bd);
  border-radius: var(--r-lg); overflow: hidden;
}
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 13px;
  padding: 14px 16px; background: none; border: none;
  border-bottom: 1px solid var(--bd); text-align: left;
  font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: background var(--ease); font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--bg); }
.menu-item__ico { width: 20px; height: 20px; color: var(--ink-3); flex-shrink: 0; }
.menu-item__ico svg { width: 20px; height: 20px; }
.menu-item__lbl  { flex: 1; }
.menu-item__arr  { width: 16px; height: 16px; color: var(--ink-4); }
.menu-item__arr svg { width: 16px; height: 16px; }

.profile-footer {
  text-align: center; padding: 24px 16px 16px;
  font-size: 12px; color: var(--ink-4); line-height: 1.6;
}

/* ════════════════════════════════════════
   MODAL (Contact seller)
════════════════════════════════════════ */

#overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.48); z-index: 100;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
#overlay.on { display: block; }

#modal {
  display: none; position: fixed;
  bottom: 0; left: 0; right: 0;
  width: 100%;
  background: var(--sf); border-radius: 22px 22px 0 0;
  z-index: 101; max-height: 90vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: var(--sh-xl);
}
#modal.on { display: block; animation: slideUp .26s cubic-bezier(.22,.61,.36,1); }
@keyframes slideUp {
  from { transform: translateY(100%); opacity: .8; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-grip   { width: 36px; height: 4px; background: var(--bd); border-radius: 2px; margin: 12px auto 0; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 0; }
.modal-title  { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }
.modal-close  {
  width: 28px; height: 28px; border: none; background: var(--bg); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--ink-3);
  transition: background var(--ease); -webkit-tap-highlight-color: transparent;
}
.modal-close:hover { background: var(--bd); }

#modal-body { padding: 16px 18px 24px; }

/* ════════════════════════════════════════
   SHARED: Buttons & Forms
════════════════════════════════════════ */

.btn {
  width: 100%; height: 52px; border: none; border-radius: var(--r-md);
  font-size: 15px; font-weight: 800; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: -.2px; cursor: pointer;
  transition: background var(--ease), transform var(--spring), box-shadow var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active   { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none !important; }
.btn svg      { width: 16px; height: 16px; flex-shrink: 0; }

.btn--blue    { background: var(--blue);  color: #fff; box-shadow: var(--sh-blue); }
.btn--blue:hover  { background: var(--blue-dk); }
.btn--blue:active { box-shadow: none; }

.btn--green   { background: var(--green); color: #fff; box-shadow: var(--sh-green); }
.btn--green:hover  { background: var(--green-dk); }
.btn--green:active { box-shadow: none; }

.btn--outline {
  background: none; color: var(--ink-2);
  border: 1.5px solid var(--bd); box-shadow: none; height: 48px; font-size: 14px;
}
.btn--outline:hover { background: var(--bg); border-color: var(--bd-2); }

.btn--ghost {
  background: none; color: var(--ink-3); height: 44px; font-size: 13px;
  font-weight: 600; box-shadow: none;
}
.btn--ghost:hover { color: var(--ink); }

.btn--sm { height: 42px; font-size: 13px; width: auto; padding: 0 20px; }

/* Form elements */
.fg { display: flex; flex-direction: column; gap: 6px; }
.fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-label {
  font-size: 11px; font-weight: 800; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .7px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--sf); border: 1.5px solid var(--bd);
  border-radius: var(--r-md); font-size: 15px; color: var(--ink);
  font-family: inherit; outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
  -webkit-appearance: none; appearance: none;
}
.form-input   { height: 50px; padding: 0 14px; }
.form-select  { height: 50px; padding: 0 14px; cursor: pointer; }
.form-textarea { padding: 12px 14px; resize: none; height: 88px; line-height: 1.55; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--ink-4); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24,71,212,.09);
}
.form-input--err { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(220,38,38,.09) !important; }

.input-prefix-wrap { position: relative; }
.input-prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; font-weight: 700; color: var(--ink-2); pointer-events: none; }
.form-input--px { padding-left: 26px; }

.form-hint { font-size: 11px; color: var(--ink-4); line-height: 1.4; }

/* Info callout */
.info-box {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--blue-lt); border: 1px solid var(--blue-md);
  border-radius: var(--r-md); padding: 12px 14px;
  font-size: 12px; color: var(--blue); line-height: 1.5; font-weight: 500;
}
.info-box svg { width: 14px; height: 14px; color: var(--blue); flex-shrink: 0; margin-top: 1px; }
.info-box strong { font-weight: 800; }

/* ════════════════════════════════════════
   FILTER MODAL
════════════════════════════════════════ */

.filter-group { margin-bottom: 20px; }
.filter-group__label {
  font-size: 11px; font-weight: 800; color: var(--ink-4);
  text-transform: uppercase; letter-spacing: .7px; margin-bottom: 8px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip {
  padding: 7px 14px; background: var(--bg); border: 1.5px solid var(--bd);
  border-radius: var(--r-full); font-size: 13px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: all var(--ease); -webkit-tap-highlight-color: transparent;
}
.filter-chip:hover { border-color: var(--bd-2); }
.filter-chip--active { background: var(--ink); border-color: var(--ink); color: #fff; }


/* ════════════════════════════════════════
   FEED — new components
════════════════════════════════════════ */

.feed-top { padding: 16px 16px 0; }

.feed-search-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.search-wrap { flex: 1; }
.search-input {
  flex: 1; border: none; background: none; font-size: 14px; color: var(--ink);
  outline: none; min-width: 0; font-family: inherit;
}
.search-input::placeholder { color: var(--ink-4); }

.filter-count {
  position: absolute; top: -5px; right: -5px;
  width: 16px; height: 16px; background: var(--blue); border-radius: 50%;
  font-size: 9px; font-weight: 800; color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--sf);
}

.trust-strip {
  display: flex; align-items: center; gap: 0;
  padding: 10px 16px; overflow-x: auto; scrollbar-width: none;
  margin-bottom: 4px;
}
.trust-strip::-webkit-scrollbar { display: none; }
.trust-strip__item {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: 11px; font-weight: 600; color: var(--ink-3);
}
.trust-strip__sep {
  width: 1px; height: 12px; background: var(--bd);
  margin: 0 12px; flex-shrink: 0;
}

.results-meta {
  padding: 0 16px 8px;
  font-size: 12px; color: var(--ink-4); font-weight: 500;
}

/* Feed tagline — single trust line */
.feed-tagline {
  padding: 8px 16px 14px;
  font-size: 12px; color: var(--ink-4); font-weight: 500; line-height: 1.5;
}

/* pcard refactored */
.pcard__title-row { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.pcard__verified-dot { display: inline-flex; align-items: center; }
.pcard__time { font-size: 9px; color: var(--ink-4); }
.pcard__currency { font-style: normal; font-size: 10px; font-weight: 500; color: var(--ink-4); margin-left: 2px; }

/* Empty state (new naming) */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 28px; text-align: center;
}
.empty-state__title { font-size: 16px; font-weight: 700; margin: 12px 0 6px; }
.empty-state__sub   { font-size: 13px; color: var(--ink-3); line-height: 1.6; max-width: 260px; }

/* ════════════════════════════════════════
   DETAIL — new components
════════════════════════════════════════ */

.det-layout { display: block; }

/* Hero updated */
.det-hero__phone {
  width: 108px; height: 108px; position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.det-hero__meta {
  position: absolute; bottom: 20px; left: 20px; z-index: 2;
}
.det-hero__brand {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.6);
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 2px;
}
.det-hero__model {
  font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -.5px; line-height: 1.1;
}
.det-hero__storage {
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,.7); margin-top: 3px;
}

.det-cond-row {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 0 10px; flex-wrap: wrap;
}
.det-meta-pill {
  font-size: 12px; color: var(--ink-4); font-weight: 500;
  display: inline-flex; align-items: center; gap: 3px;
}

/* Price */
.det-price__amount { font-size: 36px; font-weight: 900; letter-spacing: -1.5px; color: var(--ink); }
.det-price__currency { font-size: 14px; font-weight: 500; color: var(--ink-3); }

/* Section label alias */
.section-label {
  font-size: 11px; font-weight: 800; color: var(--ink-4);
  text-transform: uppercase; letter-spacing: .7px; margin-bottom: 12px;
}

/* Battery section — approved: big number display */
.battery-verified-display {
  display: flex; align-items: center; gap: 16px; margin-bottom: 14px;
}
.battery-big-number {
  font-size: 56px; font-weight: 900; letter-spacing: -2px; line-height: 1;
  flex-shrink: 0;
}
.battery-big-pct {
  font-size: 28px; font-weight: 700; letter-spacing: -.5px;
}
.battery-verified-label {
  display: flex; flex-direction: column; gap: 5px;
}
.battery-verified-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; color: var(--green);
  background: var(--green-lt); border: 1px solid var(--green-bd);
  border-radius: var(--r-full); padding: 3px 9px;
}
.battery-health-label {
  font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.battery-footer-note {
  font-size: 11px; color: var(--ink-4); line-height: 1.5; margin-top: 8px;
}

/* Battery section — none/pending: compact */
.battery-section--none { opacity: .85; }

/* Battery section new structure (pending/none) */
.battery-section__row {
  display: flex; align-items: flex-start; gap: 10px;
}
.battery-section__text { flex: 1; }
.battery-section__title {
  font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 2px;
}
.battery-section__sub { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.battery-section__pct {
  font-size: 22px; font-weight: 900; letter-spacing: -.5px; flex-shrink: 0;
}

/* Check grid */
.check-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.check-item__body { flex: 1; }
.check-item__label { font-size: 11px; font-weight: 700; color: var(--ink-2); display: block; }
.check-item__desc  { font-size: 10px; color: var(--ink-4); display: block; margin-top: 1px; line-height: 1.3; }

/* Seller card aliases */
.seller-card__av {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue-lt); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
  border: 2px solid var(--blue-md);
}
.seller-verified {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.seller-card__rating-val {
  font-size: 12px; font-weight: 700; color: var(--ink-2); margin-left: 3px;
}
.seller-card__sep { color: var(--ink-4); margin: 0 2px; }

/* Detail body */
.det-body { padding: 0 16px 120px; }

.det-top-block { padding: 16px 0 0; }

/* Description — appears right after price, before specs */
.det-desc {
  font-size: 14px; color: var(--ink-2); line-height: 1.7;
  font-weight: 400; margin: 0 0 0; padding: 12px 0;
}

/* Time meta pill — less prominent */
.det-meta-pill--time { color: var(--ink-4); font-size: 11px; }

/* CTA updated */
.det-cta__inner {
  display: flex; align-items: center; gap: 12px;
}
.det-cta__label { font-size: 10px; font-weight: 700; color: var(--ink-4); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 1px; }
.det-cta__val   { font-size: 18px; font-weight: 900; color: var(--ink); letter-spacing: -.4px; }
.det-cta__val span { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.det-cta__btn   { flex: 1; margin: 0; }
.det-cta__price { flex-shrink: 0; }

/* spec val mono */
.spec-row__val--mono {
  font-family: 'SF Mono', 'Fira Mono', monospace;
  letter-spacing: .03em; font-size: 12px;
}

/* Badge cond aliases */
.badge--cond--new  { background: var(--blue-lt); color: var(--blue); }
.badge--cond--good { background: var(--green-lt); color: var(--green); }
.badge--cond--used { background: var(--bg); color: var(--ink-3); border: 1px solid var(--bd); }

/* ════════════════════════════════════════
   PUBLISH — new structure
════════════════════════════════════════ */

.pub-wrap {
  padding-bottom: 80px;
}
.pub-header {
  padding: 20px 16px 16px;
}
.pub-title { font-size: 24px; font-weight: 800; letter-spacing: -.6px; margin-bottom: 4px; }
.pub-sub   { font-size: 13px; color: var(--ink-3); font-weight: 500; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-label__hint {
  font-weight: 500; color: var(--ink-4); text-transform: none; letter-spacing: 0; font-size: 10px;
}

.price-input-wrap { position: relative; }
.price-prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 16px; font-weight: 700; color: var(--ink-2); pointer-events: none;
}
.form-input--price { padding-left: 26px; }
.form-input--mono  { font-family: 'SF Mono', 'Fira Mono', monospace; letter-spacing: .04em; font-size: 14px; }

/* Photo upload text */
.photo-upload {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.photo-upload span:first-of-type { font-size: 14px; font-weight: 600; color: var(--ink-3); }

.device-selector { padding: 0 16px; }
.battery-guide   { margin: 0 16px 16px; }
.pct-input-wrap  { margin: 0 16px 8px; }
.info-box        { margin: 0 16px; }

.check-toggles-list {
  display: flex; flex-direction: column; gap: 8px;
  padding: 0 16px;
}
.check-toggle__switch {
  width: 40px; height: 24px; border-radius: 12px; flex-shrink: 0;
  background: var(--bd-2); position: relative; transition: background var(--ease);
}
.check-toggle--on .check-toggle__switch  { background: var(--green); }
.check-toggle__thumb {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform var(--ease);
}
.check-toggle--on .check-toggle__thumb { transform: translateX(16px); }

.repair-toggle-wrap { padding: 0 16px; }
.repair-toggle-row  {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0;
}
.toggle-switch { position: relative; display: inline-flex; cursor: pointer; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-switch__track {
  width: 44px; height: 26px; border-radius: 13px; background: var(--bd-2);
  transition: background var(--ease); display: block;
}
.toggle-switch input:checked + .toggle-switch__track { background: var(--blue); }
.toggle-switch__track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform var(--ease);
}
.toggle-switch input:checked + .toggle-switch__track::after { transform: translateX(18px); }

.pub-actions {
  display: flex; gap: 10px; padding: 20px 16px 0;
}
.pub-actions .btn { flex: 1; }
.pub-btn-full { margin: 0; max-width: 100%; }

/* Publish success */
.pub-success {
  padding: 48px 20px 32px; text-align: center;
  animation: fadeUp .25s ease;
}
.pub-success__ico { display: flex; justify-content: center; margin-bottom: 20px; }
.pub-success__title { font-size: 24px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 10px; }
.pub-success__sub {
  font-size: 14px; color: var(--ink-2); line-height: 1.65;
  margin-bottom: 24px; max-width: 300px; margin-left: auto; margin-right: auto;
}
.pub-success__card {
  background: var(--bg); border: 1px solid var(--bd);
  border-radius: var(--r-md); padding: 14px 16px;
  text-align: left; margin-bottom: 24px;
}
.pub-success__item {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px;
}
.pub-success__item-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.pub-success__item-price { font-size: 14px; font-weight: 800; color: var(--ink); }
.pub-success__item-meta  { font-size: 12px; color: var(--ink-4); }

/* ════════════════════════════════════════
   MY LISTINGS — new structure
════════════════════════════════════════ */

.listings-wrap { padding-bottom: 32px; }
.listings-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 16px 16px;
}
.listings-title { font-size: 24px; font-weight: 800; letter-spacing: -.6px; }

.listing-card__title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.listing-card__price { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; margin-bottom: 2px; }
.listing-card__meta  { font-size: 12px; color: var(--ink-3); }

/* ════════════════════════════════════════
   PROFILE / SELLER
════════════════════════════════════════ */

.profile-wrap { padding-bottom: 40px; }
.profile-hero__meta { font-size: 12px; color: var(--ink-4); }

.pstat__val   { font-size: 22px; font-weight: 900; letter-spacing: -.5px; margin-bottom: 2px; }
.pstat__label { font-size: 11px; font-weight: 600; color: var(--ink-3); }

/* Section container — consistent spacing between blocks */
.profile-section {
  padding: 0 16px; margin-bottom: 28px;
}
.profile-section .section-label {
  margin-bottom: 10px;
}

/* Actions menu — list style, no icons */
.profile-menu {
  background: var(--sf); border: 1px solid var(--bd);
  border-radius: var(--r-lg); overflow: hidden;
}
.profile-menu__item {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px; background: none; border: none;
  border-bottom: 1px solid var(--bd); text-align: left;
  cursor: pointer; transition: background var(--ease);
  font-family: inherit; -webkit-tap-highlight-color: transparent;
}
.profile-menu__item:last-child { border-bottom: none; }
.profile-menu__item:hover { background: var(--bg); }
.profile-menu__label {
  flex: 1; font-size: 15px; font-weight: 600; color: var(--ink);
}

/* Footer — minimal, no icon */
.profile-footer {
  text-align: center; padding: 8px 16px 16px;
  font-size: 11px; color: var(--ink-4); font-weight: 500;
}

.review-item__top {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px;
}
.review-item__author { font-size: 13px; font-weight: 700; }
.review-item__date   { font-size: 11px; color: var(--ink-4); margin-left: auto; }
.review-item__text   { font-size: 13px; color: var(--ink-2); line-height: 1.55; }

.seller-grid { padding: 0 16px; }

/* ════════════════════════════════════════
   CONTACT MODAL — content
════════════════════════════════════════ */

/* ════════════════════════════════════════
   TRUST CARD (in Profile)
════════════════════════════════════════ */

.trust-card {
  width: 100%; text-align: left;
  background: var(--blue-lt); border: 1.5px solid var(--blue-md);
  border-radius: var(--r-lg); padding: 16px;
  cursor: pointer; font-family: inherit;
  transition: background var(--ease), border-color var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.trust-card:hover { background: #e5eafc; border-color: var(--blue); }
.trust-card:active { transform: scale(.99); }

.trust-card__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 14px;
}
.trust-card__level {
  font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.3px;
}
.trust-card__detail {
  font-size: 12px; color: var(--ink-3); font-weight: 500; margin-top: 2px;
}
.trust-card__badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; color: var(--blue);
  background: #fff; border: 1px solid var(--blue-md);
  padding: 4px 9px; border-radius: var(--r-full); flex-shrink: 0;
}

/* 5-pip progress track */
.trust-card__track {
  display: flex; gap: 4px; margin-bottom: 10px;
}
.trust-card__pip {
  flex: 1; height: 5px; border-radius: 3px;
}
.trust-card__pip--on  { background: var(--blue); }
.trust-card__pip--off { background: var(--blue-md); }

/* Signal tags */
.trust-card__signals {
  display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px;
}
.trust-card__sig {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; letter-spacing: .1px;
  padding: 3px 8px; border-radius: var(--r-full);
}
.trust-card__sig--on  {
  background: rgba(255,255,255,.8); color: var(--blue);
  border: 1px solid var(--blue-md);
}
.trust-card__sig--off {
  background: rgba(255,255,255,.5); color: var(--ink-4);
  border: 1px solid var(--bd);
}
.trust-card__cta {
  display: flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 700; color: var(--blue);
}

/* ════════════════════════════════════════
   TRUST VIEW
════════════════════════════════════════ */

.trust-wrap { padding-bottom: 48px; }

.trust-header {
  padding: 24px 16px 20px;
  border-bottom: 1px solid var(--bd);
}
.trust-title {
  font-size: 26px; font-weight: 800; letter-spacing: -.7px;
  color: var(--ink); margin-bottom: 6px;
}
.trust-subtitle {
  font-size: 13px; color: var(--ink-3); line-height: 1.55; font-weight: 500;
}

/* Level block */
.trust-level-block {
  margin: 20px 16px;
  background: var(--sf); border: 1px solid var(--bd);
  border-radius: var(--r-lg); padding: 20px;
}
.trust-level-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
}
.trust-level-num {
  font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: var(--ink);
  line-height: 1.1;
}
.trust-level-of { font-size: 14px; font-weight: 500; color: var(--ink-4); }
.trust-level-name {
  font-size: 12px; font-weight: 600; color: var(--ink-3); margin-top: 4px;
}
.trust-level-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; letter-spacing: .1px;
  padding: 5px 10px; border-radius: var(--r-full); flex-shrink: 0;
}
.trust-level-badge--verified {
  background: var(--blue-lt); color: var(--blue);
}
.trust-level-badge--progress {
  background: var(--amber-lt); color: var(--amber);
}

/* 4-segment track */
.trust-track {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; margin-bottom: 8px;
}
.trust-track__cell {
  height: 6px; border-radius: 3px;
  background: var(--bd);
}
.trust-track__cell--done { background: var(--blue); }

.trust-track-labels {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.trust-track-label {
  font-size: 9px; font-weight: 600; color: var(--ink-4);
  text-align: center; letter-spacing: .1px; line-height: 1.3;
}
.trust-track-label--active { color: var(--blue); font-weight: 700; }

/* Section wrapper */
.trust-section {
  margin-bottom: 24px; padding: 0 16px;
}

/* Signals */
.trust-signal-list {
  background: var(--sf); border: 1px solid var(--bd);
  border-radius: var(--r-lg); overflow: hidden;
}
.trust-signal {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--bd);
}
.trust-signal:last-child { border-bottom: none; }

.trust-signal__dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.trust-signal--active .trust-signal__dot  { background: var(--green); }
.trust-signal--pending .trust-signal__dot { background: var(--bd-2); }

.trust-signal__info {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px;
}
.trust-signal__label {
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.trust-signal__detail {
  font-size: 11px; color: var(--ink-4); font-weight: 500; line-height: 1.4;
}

.trust-signal__tag {
  font-size: 10px; font-weight: 700; letter-spacing: .1px;
  padding: 3px 8px; border-radius: var(--r-full); flex-shrink: 0;
}
.trust-signal__tag--active  { background: var(--green-lt); color: var(--green); }
.trust-signal__tag--pending { background: var(--bg); color: var(--ink-4); }

/* Action list */
.trust-action-list {
  display: flex; flex-direction: column; gap: 8px;
}
.trust-action {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  background: var(--sf); border: 1px solid var(--bd);
  border-radius: var(--r-lg); padding: 14px 16px;
  text-align: left; cursor: pointer; font-family: inherit;
  transition: background var(--ease), border-color var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.trust-action:hover { background: var(--bg); border-color: var(--bd-2); }
.trust-action:active { transform: scale(.99); }
.trust-action__info {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px;
}
.trust-action__label {
  font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.3;
}
.trust-action__desc {
  font-size: 11px; color: var(--ink-3); font-weight: 500; line-height: 1.4;
}
.trust-action__cta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; color: var(--blue); flex-shrink: 0;
}

/* Impact list */
.trust-impact-list {
  display: flex; flex-direction: column; gap: 12px;
}
.trust-impact-row {
  display: flex; align-items: flex-start; gap: 10px;
}
.trust-impact-text {
  font-size: 13px; color: var(--ink-2); line-height: 1.55; font-weight: 500;
}

/* ════════════════════════════════════════
   MESSAGING — nav badge
════════════════════════════════════════ */

/* Icon wrap enables the badge overlay */
.nav-icon-wrap, .snav-icon-wrap {
  position: relative; display: inline-flex;
  align-items: center; justify-content: center;
}
.nav-msgs-badge {
  position: absolute; top: -4px; right: -6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--blue); color: #fff;
  font-size: 9px; font-weight: 800; letter-spacing: .1px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--sf);
  pointer-events: none;
}

/* ════════════════════════════════════════
   MESSAGING — list view
════════════════════════════════════════ */

.msgs-wrap { padding-bottom: 48px; }
.msgs-header {
  padding: 24px 16px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--bd);
}
.msgs-title {
  font-size: 26px; font-weight: 800; letter-spacing: -.7px; color: var(--ink);
}
.msgs-unread-pill {
  font-size: 11px; font-weight: 700; color: var(--blue);
  background: var(--blue-lt); border: 1px solid var(--blue-md);
  padding: 3px 9px; border-radius: var(--r-full);
}

.conv-list { display: flex; flex-direction: column; }

.conv-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--bd);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background var(--ease);
}
.conv-row:hover { background: var(--bg); }
.conv-row:active { background: var(--bd); }
.conv-row--unread { background: var(--blue-lt); }
.conv-row--unread:hover { background: #e5eafc; }

.conv-row__thumb {
  width: 46px; height: 46px; border-radius: var(--r-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.conv-row__body { flex: 1; min-width: 0; }
.conv-row__top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2px;
}
.conv-row__name {
  font-size: 14px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conv-row__time { font-size: 11px; color: var(--ink-4); font-weight: 500; flex-shrink: 0; margin-left: 8px; }
.conv-row__listing {
  font-size: 11px; color: var(--ink-4); font-weight: 500; margin-bottom: 3px;
}
.conv-row__last {
  font-size: 13px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conv-row__last--bold { font-weight: 600; color: var(--ink-2); }
.conv-row__pfx { color: var(--ink-4); }

.conv-unread-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--blue); flex-shrink: 0;
}

/* ════════════════════════════════════════
   MESSAGING — conversation view
════════════════════════════════════════ */

.conv-wrap {
  display: flex; flex-direction: column;
  height: calc(100vh - var(--hdr-h) - var(--nav-h));
}

/* Conversation header */
.conv-hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--bd);
  background: var(--sf); flex-shrink: 0;
}
.conv-back {
  width: 34px; height: 34px; border: none; background: none;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--ink); cursor: pointer; flex-shrink: 0;
  transition: background var(--ease); -webkit-tap-highlight-color: transparent;
}
.conv-back:hover { background: var(--bg); }
.conv-hdr__info { flex: 1; min-width: 0; }
.conv-hdr__name { font-size: 15px; font-weight: 700; color: var(--ink); }
.conv-hdr__sub  {
  font-size: 11px; color: var(--blue); display: flex; align-items: center; gap: 3px;
}
.conv-hdr__action {
  width: 36px; height: 36px; border: 1px solid var(--bd);
  background: none; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background var(--ease); -webkit-tap-highlight-color: transparent;
}
.conv-hdr__action:hover { background: var(--bg); }

/* Listing context banner */
.conv-listing-banner {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--bd);
  background: var(--bg); cursor: pointer; font-family: inherit;
  transition: background var(--ease); -webkit-tap-highlight-color: transparent;
  flex-shrink: 0; text-align: left; border-radius: 0; border-left: none; border-right: none; border-top: none;
}
.conv-listing-banner:hover { background: var(--bd); }
.conv-listing-thumb {
  width: 36px; height: 36px; border-radius: var(--r-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.conv-listing-info {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px;
}
.conv-listing-name  { font-size: 12px; font-weight: 700; color: var(--ink); }
.conv-listing-price { font-size: 11px; color: var(--ink-3); font-weight: 600; }

/* Thread */
.conv-thread {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.conv-empty {
  text-align: center; font-size: 13px; color: var(--ink-4);
  padding: 24px 0; font-weight: 500; line-height: 1.5;
}

.msg-row {
  display: flex; flex-direction: column; max-width: 78%;
}
.msg-row--me   { align-self: flex-end; align-items: flex-end; }
.msg-row--them { align-self: flex-start; align-items: flex-start; }

.msg-bubble {
  padding: 10px 13px;
  font-size: 14px; line-height: 1.5; font-weight: 500;
  border-radius: 16px; word-break: break-word;
}
.msg-bubble--me {
  background: var(--blue); color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-bubble--them {
  background: var(--sf); color: var(--ink);
  border: 1px solid var(--bd);
  border-bottom-left-radius: 4px;
}
.msg-ts {
  font-size: 10px; color: var(--ink-4); font-weight: 500;
  margin-top: 3px; padding: 0 3px;
}

/* Input bar */
.conv-input-bar {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--bd);
  background: var(--sf); flex-shrink: 0;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.conv-input {
  flex: 1; resize: none; overflow: hidden;
  border: 1.5px solid var(--bd); border-radius: 20px;
  padding: 9px 14px; font-size: 14px; color: var(--ink);
  background: var(--bg); font-family: inherit; line-height: 1.4;
  outline: none; min-height: 40px; max-height: 120px;
  transition: border-color var(--ease);
}
.conv-input:focus { border-color: var(--blue); background: var(--sf); }
.conv-send-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
  transition: background var(--ease), transform var(--spring);
  -webkit-tap-highlight-color: transparent;
}
.conv-send-btn:hover  { background: var(--blue-dk); }
.conv-send-btn:active { transform: scale(.91); }

/* ════════════════════════════════════════
   FILTER SHEET
════════════════════════════════════════ */

.filter-sheet { display: flex; flex-direction: column; gap: 0; }
.filter-sheet__actions {
  display: flex; gap: 10px; padding-top: 8px; border-top: 1px solid var(--bd); margin-top: 4px;
}
.filter-sheet__actions .btn { flex: 1; }
.active-filter-chip--clear {
  background: none; border-color: var(--bd); color: var(--ink-3);
}
.active-filter-chip--clear:hover { background: var(--bg); }

/* ════════════════════════════════════════
   DESKTOP SHELL  ≥480px
   Anything wider than a phone activates the
   desktop shell: icon-only sidebar (52px),
   bottom nav hidden, CTA static.
   Content gutters stay at mobile defaults —
   the sidebar is narrow enough not to matter.
════════════════════════════════════════ */

@media (min-width: 768px) {

  /* Shell */
  html { background: var(--sf); }
  body { overflow: visible; min-height: 100vh; }
  #app {
    width: 100%;
    background: var(--sf);
    min-height: 100vh;
  }
  #hdr { padding: 0 20px; height: 60px; }
  #hdr-brand { display: flex !important; }
  #hdr-title { display: none !important; }
  #app-body { display: flex; min-height: calc(100vh - 60px); }

  /* Sidebar — icon only, 52px */
  #sidebar {
    display: flex; flex-direction: column; align-items: center;
    width: 52px; flex-shrink: 0;
    border-right: 1px solid var(--bd);
    position: sticky; top: 60px;
    height: calc(100vh - 60px);
    overflow: hidden; padding: 12px 6px;
    background: var(--sf);
  }
  .sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; width: 100%; }
  .sidebar-item {
    display: flex; align-items: center; justify-content: center; width: 100%;
    padding: 10px 0; border-radius: var(--r-md); border: none; background: none;
    color: var(--ink-2); cursor: pointer;
    transition: background var(--ease), color var(--ease);
    font-family: inherit; -webkit-tap-highlight-color: transparent;
  }
  .sidebar-item svg { width: 20px; height: 20px; flex-shrink: 0; }
  .sidebar-item:hover { background: var(--bg); color: var(--ink); }
  .sidebar-item--active { background: var(--blue-lt); color: var(--blue); }
  .sidebar-item--active svg { stroke: var(--blue); }
  .sidebar-label { display: none; }
  .sidebar-publish {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: var(--r-md); border: none;
    background: var(--blue); color: #fff; cursor: pointer;
    margin: 8px auto; font-family: inherit;
    transition: background var(--ease), transform var(--spring);
    -webkit-tap-highlight-color: transparent; box-shadow: var(--sh-blue);
  }
  .sidebar-publish svg { width: 18px; height: 18px; flex-shrink: 0; }
  .sidebar-publish:hover  { background: var(--blue-dk); }
  .sidebar-publish:active { transform: scale(.97); box-shadow: none; }
  .sidebar-footer { display: none; }

  /* Main — clear bottom nav padding */
  #main  { flex: 1; min-width: 0; overflow-y: auto; padding-bottom: 0; height: calc(100vh - 60px); }
  #nav   { display: none; }
  #toast { bottom: 24px; }

  /* Conversation full height without bottom nav */
  .conv-wrap { height: calc(100vh - 60px); }

  /* Detail — CTA becomes inline (no fixed bar) */
  .det-cta {
    position: static; background: none; backdrop-filter: none;
    -webkit-backdrop-filter: none; border-top: 1px solid var(--bd);
    padding: 20px 0 0; margin-top: 24px;
  }
  .det-cta__inner {
    background: var(--bg); border: 1px solid var(--bd);
    border-radius: var(--r-lg); padding: 16px 20px;
  }

  /* Modal: centered dialog */
  #modal {
    top: 50%; bottom: auto;
    left: 50%; right: auto;
    width: auto; max-width: 460px; min-width: 320px; max-height: 85vh;
    border-radius: 20px;
    transform: translate(-50%, -50%);
  }
  #modal.on { animation: desktopModal .22s cubic-bezier(.22,.61,.36,1); }
  @keyframes desktopModal {
    from { transform: translate(-50%, -50%) scale(.95); opacity: 0; }
    to   { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
  }
  .modal-grip { display: none; }
}

/* ════════════════════════════════════════
   DESKTOP FULL  ≥1024px
   Sidebar expands to labeled 220px
   3-col grid · 32px gutters · 2-col detail
════════════════════════════════════════ */

@media (min-width: 1024px) {

  #hdr { padding: 0 28px; }

  /* Sidebar — labeled */
  #sidebar {
    width: 220px; align-items: stretch;
    padding: 20px 12px; overflow-y: auto; overflow-x: hidden;
  }
  .sidebar-nav { align-items: stretch; gap: 3px; }
  .sidebar-item {
    justify-content: flex-start; gap: 11px; padding: 10px 13px;
    font-size: 14px; font-weight: 600;
  }
  .sidebar-item svg { width: 18px; height: 18px; }
  .sidebar-label { display: inline; }
  .sidebar-publish {
    width: 100%; height: auto; border-radius: var(--r-md);
    padding: 11px 14px; margin: 10px 0;
    font-size: 14px; font-weight: 700;
    justify-content: flex-start; gap: 10px;
  }
  .sidebar-publish svg { width: 16px; height: 16px; }
  .sidebar-footer {
    display: flex; align-items: center; gap: 7px;
    padding: 14px 13px; margin-top: 16px; border-top: 1px solid var(--bd);
    font-size: 11px; color: var(--ink-4); line-height: 1.4; font-weight: 500;
  }
  .sidebar-footer svg { flex-shrink: 0; color: var(--blue); opacity: .7; }

  /* Feed — 32px gutters, 3-col grid */
  .feed-top        { padding: 28px 32px 0; }
  .feed-search-row { margin-bottom: 12px; }
  .feed-tagline    { padding: 8px 32px 14px; }
  .results-meta    { padding: 0 32px 10px; }
  .active-filters  { padding: 0 32px 12px; }
  .grid { padding: 0 32px; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .pcard__img { height: 140px; }

  /* Detail — 2-col split */
  .det-layout {
    display: grid; grid-template-columns: 5fr 7fr;
    min-height: calc(100vh - 60px); align-items: start;
  }
  .det-hero { height: calc(100vh - 60px); position: sticky; top: 0; min-height: 480px; }
  .det-hero__phone { width: 140px; height: 140px; }
  .det-body { padding: 0 44px 48px; overflow-y: auto; max-height: calc(100vh - 60px); }
  .det-top-block { padding: 32px 0 0; }
  .battery-big-number { font-size: 72px; }

  /* ── Listings view ── */
  .listings-wrap { padding: 0 32px; }
  .listings-header { padding: 32px 0 20px; max-width: 720px; }
  .listings-header .btn { min-width: auto; width: auto; }
  .listing-list { padding: 0; max-width: 720px; }

  /* ── Publish view ── */
  .pub-wrap { padding-left: 32px; padding-right: 32px; }
  .pub-header { padding: 32px 0 20px; max-width: 580px; }
  .pub-form { padding: 0 0 48px; max-width: 580px; }
  .pub-actions { padding: 20px 0 0; max-width: 580px; }
  .step-indicator { padding: 0; max-width: 580px; }
  .device-selector { padding: 0; max-width: 580px; }
  .battery-guide { margin: 0 0 16px; max-width: 580px; }
  .pct-input-wrap { margin: 0 0 8px; max-width: 580px; }
  .info-box { margin: 0; max-width: 580px; }
  .check-toggles-list { padding: 0; max-width: 580px; }
  .repair-toggle-wrap { padding: 0; max-width: 580px; }
  .pub-success { max-width: 480px; margin: 0 auto; padding: 48px 32px 32px; }
  .pub-btn-full { max-width: 580px; }

  /* ── Profile / Seller ── */
  .profile-wrap { padding: 0 32px; }
  .profile-hero { padding: 36px 0 24px; }
  .profile-stats { margin: 0 0 28px; max-width: 420px; }
  .profile-section { padding: 0; max-width: 560px; }
  .profile-menu { max-width: 560px; }
  .trust-card { max-width: 560px; }
  .review-list { max-width: 600px; }
  .seller-grid { padding: 0 32px; }

  /* ── Messages ── */
  .msgs-wrap { padding: 0 32px; }
  .msgs-header { padding-left: 0; padding-right: 0; max-width: 720px; }
  .conv-list { padding: 0; max-width: 720px; }

  /* ── Trust ── */
  .trust-wrap { padding: 0 32px; }
  .trust-header { padding-left: 0; padding-right: 0; max-width: 640px; }
  .trust-level-block { max-width: 640px; }
  .trust-section { max-width: 640px; }

  /* ── General ── */
  .empty-state { padding: 80px 48px; max-width: 480px; }
  .check-grid { max-width: 560px; }
}

/* ════════════════════════════════════════
   DESKTOP WIDE  ≥1280px
   Sidebar 240px · 4-col grid
════════════════════════════════════════ */

@media (min-width: 1280px) {
  #sidebar { width: 240px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .pub-form, .pub-header, .pub-actions, .step-indicator,
  .device-selector, .battery-guide, .pct-input-wrap,
  .info-box, .check-toggles-list, .repair-toggle-wrap,
  .pub-btn-full { max-width: 640px; }
  .listing-list, .listings-header { max-width: 800px; }
  .conv-list, .msgs-header { max-width: 800px; }
  .profile-section, .profile-menu, .trust-card { max-width: 640px; }
  .profile-stats { max-width: 480px; }
  .trust-header, .trust-level-block, .trust-section { max-width: 720px; }
  .review-list { max-width: 680px; }
  .seller-grid { max-width: 100%; }
}

/* ══════════════════════════════════════
   AUTH
══════════════════════════════════════ */

/* Header actions — needs relative for dropdown anchor */
.hdr-actions { position: relative; }

/* Login / Register buttons */
.btn-ghost-sm {
  font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: var(--r-sm);
  border: 1.5px solid var(--bd); background: transparent;
  color: var(--ink-2); transition: background var(--ease), border-color var(--ease);
  white-space: nowrap;
}
.btn-ghost-sm:hover { background: var(--bg); border-color: var(--bd-2); }

.btn-sm {
  font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: var(--r-sm);
  border: none; white-space: nowrap;
}
.btn-sm.btn--blue { background: var(--blue); color: #fff; transition: background var(--ease); }
.btn-sm.btn--blue:hover { background: var(--blue-dk); }

/* Avatar button */
.auth-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue); border: none;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity var(--ease);
}
.auth-avatar:hover { opacity: .85; }
.auth-avatar__initials {
  font-size: 11px; font-weight: 700; color: #fff; letter-spacing: .3px; line-height: 1;
}

/* User dropdown menu */
.auth-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--sf); border: 1.5px solid var(--bd);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
  min-width: 200px; z-index: 200; padding: 6px 0;
  animation: auth-dropdown-in .14s var(--ease) both;
}
@keyframes auth-dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-dropdown__name {
  font-size: 13px; font-weight: 600; color: var(--ink);
  padding: 8px 14px 2px;
}
.auth-dropdown__email {
  font-size: 12px; color: var(--ink-3);
  padding: 0 14px 8px; word-break: break-all;
}
.auth-dropdown__divider { height: 1px; background: var(--bd); margin: 2px 0; }
.auth-dropdown__item {
  width: 100%; text-align: left; padding: 9px 14px;
  font-size: 13px; font-weight: 500; color: var(--ink);
  background: none; border: none;
  transition: background var(--ease);
}
.auth-dropdown__item:hover { background: var(--bg); }
.auth-dropdown__item--danger { color: var(--red); }

/* Auth overlay + modal */
#auth-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 300;
}
#auth-overlay.on { display: block; }

#auth-modal {
  display: none; position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--sf); border-radius: var(--r-xl) var(--r-xl) 0 0;
  z-index: 301;
  padding-bottom: env(safe-area-inset-bottom, 0);
  max-height: 92vh; overflow-y: auto;
}
#auth-modal.on {
  display: block;
  animation: auth-modal-up .22s var(--ease) both;
}
@keyframes auth-modal-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@media (min-width: 480px) {
  #auth-modal {
    bottom: auto; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 400px; border-radius: var(--r-xl);
  }
  #auth-modal.on {
    animation: auth-modal-center-in .18s var(--ease) both;
  }
  @keyframes auth-modal-center-in {
    from { opacity: 0; transform: translate(-50%, calc(-50% - 10px)); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
  }
}

/* Auth modal inner */
.auth-modal-inner  { padding: 20px 20px 28px; }
.auth-modal-hdr    {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.auth-modal-title  { font-size: 17px; font-weight: 700; }
.auth-field        { margin-bottom: 14px; }
.auth-label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px;
}
.auth-input {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--bd); border-radius: var(--r-sm);
  font-size: 15px; background: var(--bg); color: var(--ink);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.auth-input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24,71,212,.12);
}
.auth-error {
  font-size: 13px; color: var(--red);
  background: var(--red-lt); border: 1px solid var(--red-bd);
  border-radius: var(--r-xs); padding: 8px 12px; margin-bottom: 12px;
}
.auth-submit {
  width: 100%; padding: 12px; font-size: 15px; font-weight: 600;
  border-radius: var(--r-sm); margin-top: 4px;
}
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }
.auth-switch {
  text-align: center; margin-top: 16px;
  font-size: 13px; color: var(--ink-3);
}
.auth-switch-btn {
  background: none; border: none; cursor: pointer;
  color: var(--blue); font-weight: 600; font-size: 13px;
  padding: 0; margin-left: 4px;
}
.auth-switch-btn:hover { text-decoration: underline; }

/* ══════════════════════════════════════
   NEW — Skeleton / Loading States
══════════════════════════════════════ */
.pcard--skeleton { pointer-events: none; }
.pcard--skeleton .pcard__body { padding: 12px; }

.skeleton-pulse {
  background: linear-gradient(90deg, var(--bd) 25%, #e8e7e2 50%, var(--bd) 75%);
  background-size: 200% 100%;
  animation: skPulse 1.4s ease-in-out infinite;
  border-radius: var(--r-xs);
}
.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: var(--bd);
  animation: skPulse 1.4s ease-in-out infinite;
  background-size: 200% 100%;
  background-image: linear-gradient(90deg, var(--bd) 25%, #e8e7e2 50%, var(--bd) 75%);
  margin-bottom: 8px;
}
.skeleton-line--lg { width: 75%; height: 14px; }
.skeleton-line--md { width: 45%; }
.skeleton-line--sm { width: 30%; height: 10px; }

@keyframes skPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--bd);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.det-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 300px;
}


/* ══════════════════════════════════════
   NEW — Photo Upload
══════════════════════════════════════ */
.photo-upload-area {
  border: 2px dashed var(--bd);
  border-radius: var(--r-md);
  padding: 16px;
  text-align: center;
}
.photo-upload-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--bd); border-radius: var(--r-sm);
  padding: 10px 18px; font-size: 13px; color: var(--ink-3);
  cursor: pointer; transition: var(--ease);
}
.photo-upload-btn:hover { border-color: var(--blue); color: var(--blue); }

.photo-upload-grid {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.photo-preview-item {
  position: relative; width: 72px; height: 72px;
  border-radius: var(--r-sm); overflow: hidden;
}
.photo-preview-item img {
  width: 100%; height: 100%; object-fit: cover;
}
.photo-preview-remove {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px;
  background: rgba(0,0,0,.6); color: #fff;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}


/* ══════════════════════════════════════
   NEW — Real Image in Cards
══════════════════════════════════════ */
.pcard__img-real {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}


/* ══════════════════════════════════════
   NEW — Detail Hero Gallery
══════════════════════════════════════ */
.det-hero__gallery {
  position: relative; width: 100%; height: 100%;
}
.det-hero__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .3s ease;
}
.det-hero__photo--active { opacity: 1; }

.det-hero__dots {
  position: absolute; bottom: 12px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 2;
}
.det-hero__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer; transition: var(--ease);
}
.det-hero__dot--active { background: #fff; transform: scale(1.2); }


/* ══════════════════════════════════════
   NEW — Filter Price Row / Zone
══════════════════════════════════════ */
.filter-price-row {
  display: flex; align-items: center; gap: 10px;
}
.filter-price-row .form-input--sm {
  flex: 1;
}
.form-input--sm {
  padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--bd);
  border-radius: var(--r-sm);
  background: var(--sf);
  color: var(--ink);
  width: 100%;
}
.form-input--sm:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24,71,212,.1);
}


/* ══════════════════════════════════════
   NEW — Settings Form
══════════════════════════════════════ */
.settings-form {
  padding: 4px 0;
}
.settings-form .form-group { margin-bottom: 14px; }


/* ══════════════════════════════════════
   NEW — Favorite button in cards
══════════════════════════════════════ */
.pcard__fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 32px; height: 32px;
  background: rgba(0,0,0,.35); backdrop-filter: blur(6px);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--ease);
  padding: 0;
}
.pcard__fav-btn:hover { background: rgba(0,0,0,.5); }
.pcard__fav-btn--active .ico { color: var(--red) !important; }


/* ══════════════════════════════════════
   NEW — Detail hero action buttons
══════════════════════════════════════ */
.det-hero__actions {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  display: flex; gap: 8px;
}
.det-hero__action-btn {
  width: 36px; height: 36px;
  background: rgba(0,0,0,.35); backdrop-filter: blur(6px);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--ease); padding: 0;
}
.det-hero__action-btn:hover { background: rgba(0,0,0,.55); }
.det-hero__action-btn--active { background: rgba(255,255,255,.2); }


/* ══════════════════════════════════════
   NEW — Confirm dialog
══════════════════════════════════════ */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.confirm-overlay--on { animation: fadeIn .15s ease; }
.confirm-box {
  background: var(--sf); border-radius: var(--r-lg);
  padding: 24px; max-width: 360px; width: 100%;
  box-shadow: var(--sh-xl);
}
.confirm-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.confirm-msg { font-size: 14px; color: var(--ink-3); line-height: 1.5; margin-bottom: 20px; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


/* ══════════════════════════════════════
   NEW — Quick replies
══════════════════════════════════════ */
.quick-replies {
  display: flex; gap: 6px; padding: 8px 12px;
  overflow-x: auto; scrollbar-width: none;
  border-top: 1px solid var(--bd);
}
.quick-replies::-webkit-scrollbar { display: none; }
.quick-reply-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  background: var(--blue-lt); color: var(--blue);
  border: 1.5px solid var(--blue-md); border-radius: var(--r-full);
  font-size: 12px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: var(--ease);
}
.quick-reply-btn:hover { background: var(--blue-md); }


/* ══════════════════════════════════════
   NEW — Online indicator
══════════════════════════════════════ */
.online-dot {
  display: inline-block; width: 7px; height: 7px;
  background: var(--green); border-radius: 50%;
  margin-right: 4px; vertical-align: middle;
}
.seller-card__online, .conv-hdr__online, .profile-hero__online {
  font-size: 11px; color: var(--green); font-weight: 600; margin-top: 2px;
}


/* ══════════════════════════════════════
   NEW — Report modal
══════════════════════════════════════ */
.report-reasons {
  display: flex; flex-direction: column; gap: 6px;
}
.report-reason {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1.5px solid var(--bd);
  border-radius: var(--r-sm); cursor: pointer;
  font-size: 13px; transition: var(--ease);
}
.report-reason:has(input:checked) { border-color: var(--blue); background: var(--blue-lt); }
.report-reason input { accent-color: var(--blue); }
.report-actions-row { display: flex; gap: 10px; margin-top: 16px; }
.btn--danger { border-color: var(--red); color: var(--red); }
.btn--danger:hover { background: var(--red-lt); }


/* ══════════════════════════════════════
   NEW — Blocked users list
══════════════════════════════════════ */
.blocked-list { padding: 4px 0; }
.blocked-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--bd);
  font-size: 14px;
}
.blocked-row:last-child { border-bottom: none; }


/* ══════════════════════════════════════
   NEW — Feed load more / infinite scroll
══════════════════════════════════════ */
.feed-load-more {
  display: flex; justify-content: center;
  padding: 20px 0;
}



/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
