/* ──────────────────────────────────────────────
   swilu · design-system.css
   Apple-clean tokens + componenti per il nuovo layout mobile.
   Mirror dei tokens definiti in tokens.jsx (SS).
   ────────────────────────────────────────────── */

:root,
[data-theme="light"] {
  --ss-bg:        #F4F5F9;
  --ss-surface:   #FFFFFF;
  --ss-surface2:  #F2F3F7;
  --ss-blue:      #6D5EF7;
  --ss-blue-deep: #4F46E5;
  --ss-blue-soft: #ECEAFE;
  --ss-blue-soft2:#E0DCFD;
  --ss-ink:       #0A0A0F;
  --ss-ink2:      #3C3C43;
  --ss-mute:      #8E8E93;
  --ss-mute2:     #B5B5BC;
  --ss-hair:      rgba(60,60,67,0.10);
  --ss-hair2:     rgba(60,60,67,0.18);
  --ss-danger:    #FF3B30;
  --ss-search-bg: #ECEDF1;
  --ss-pill-dark: #0A0A0F;
}

[data-theme="dark"] {
  --ss-bg:        #0A0A12;
  --ss-surface:   #17172A;
  --ss-surface2:  #20203A;
  --ss-blue:      #8B7DFF;
  --ss-blue-deep: #6D5EF7;
  --ss-blue-soft: rgba(139,125,255,0.18);
  --ss-blue-soft2:rgba(139,125,255,0.24);
  --ss-ink:       #F3F3F8;
  --ss-ink2:      #C8C8D0;
  --ss-mute:      #8E8E9A;
  --ss-mute2:     #5E5E6A;
  --ss-hair:      rgba(255,255,255,0.08);
  --ss-hair2:     rgba(255,255,255,0.14);
  --ss-search-bg: #22223A;
  --ss-pill-dark: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
/* Disabilita il double-tap-to-zoom su iOS Safari (e tap-delay 300ms). Tutto statico. */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Anti-flash di contenuto non autorizzato: il <main> resta invisibile finché la
   sessione non è verificata. L'eventuale #ss-auth-gate è sibling di main → resta
   visibile sopra. Lo script in <head> di ogni pagina protetta aggiunge la class
   `suiswi-auth-pending` se non trova session in localStorage. Il main script
   (account.js, favorites.js, ...) la rimuove dopo aver verificato sessione. */
html.suiswi-auth-pending body > main,
html.suiswi-auth-pending body > nav.ss-tabs { visibility: hidden; }
body, button, a, input, select, textarea, label, .ss-row, .ss-tab, .ss-chip-btn { touch-action: manipulation; }
body {
  font-family: -apple-system, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--ss-bg);
  color: var(--ss-ink);
  max-width: 430px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: 2px solid var(--ss-blue); outline-offset: 2px; border-radius: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
input, select, textarea { font: inherit; color: inherit; }

/* ── Screen container ────────────────────────── */
.ss-screen {
  min-height: 100vh;
  padding: 4px 20px 110px;
  position: relative;
}

/* ── App bar (sticky on all pages) ─────────────── */
.ss-appbar {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px 12px;
  /* Sticky: rimane fisso in alto durante lo scroll */
  position: sticky; top: 0; z-index: 30;
  background: rgba(244,245,249,0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  margin: 0 -20px 14px;        /* compensa il padding lato di .ss-screen */
  border-bottom: 0.5px solid transparent;
  transition: border-color .15s;
}
[data-theme="dark"] .ss-appbar { background: rgba(10,10,18,0.85); }
/* Quando scrolli, mostra una hairline sottile sotto */
.ss-screen { scroll-padding-top: 70px; }
.ss-appbar.is-scrolled { border-bottom-color: var(--ss-hair); }
.ss-brand { display:flex; align-items:center; gap:0; }
/* Logo swilu. — solo wordmark, niente riquadro. Il rombo è il punto finale. */
.ss-brand-mark { display:none !important; }
.ss-brand-name {
  font-size:38px; font-weight:700; letter-spacing:-1.8px;
  line-height:1; color: var(--ss-ink);
  display:inline-flex; align-items:flex-end;
}
/* Il punto/rombo del wordmark "swilu." */
.ss-brand-name::after {
  content: "";
  display: inline-block;
  width: 13px; height: 13px;
  margin-left: 5px; margin-bottom: 4px;
  border-radius: 4px;
  background: linear-gradient(135deg, #6d5ef7, #4f46e5);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ── Language switcher (globo + menu) ─────────────────────────── */
.ss-lang-switch { position:relative; display:inline-block; }
.ss-lang-btn { color: var(--ss-ink); }
.ss-lang-menu {
  position:absolute; top: calc(100% + 6px); right:0;
  background: var(--ss-surface);
  border: 0.5px solid var(--ss-hair);
  border-radius: 14px;
  box-shadow: 0 12px 28px -10px rgba(15,23,42,0.15);
  padding: 6px; min-width: 160px;
  z-index: 50;
  display:flex; flex-direction:column; gap:2px;
}
.ss-lang-menu[hidden] { display:none; }
.ss-lang-menu button {
  background: transparent; border:none; cursor:pointer;
  padding: 9px 12px; border-radius: 8px;
  text-align: left; font-size: 14.5px; color: var(--ss-ink);
  font-weight: 500;
  display:flex; align-items:center; gap:8px;
  transition: background .12s;
}
.ss-lang-menu button:hover { background: var(--ss-surface2); }
.ss-lang-menu button.is-active { background: var(--ss-blue-soft); color: var(--ss-blue); font-weight:600; }

.ss-appbar-actions { display:flex; align-items:center; gap:8px; }

/* Theme toggle pill */
.ss-theme-toggle {
  display:flex; align-items:center; gap:4px;
  background: var(--ss-surface);
  border:0.5px solid var(--ss-hair);
  border-radius:22px; padding:3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.ss-theme-toggle button {
  width:30px; height:30px; border-radius:16px;
  display:flex; align-items:center; justify-content:center;
  color: var(--ss-mute);
  border:none; cursor:pointer; padding:0;
  background:transparent;
  transition: background .15s, color .15s;
}
/* Light theme: bottone attivo = sfondo nero + icona bianca */
.ss-theme-toggle button.on { background:#0A0A0F; color:#fff; }
/* Dark theme: bottone attivo = sfondo bianco + icona nera (leggibile) */
[data-theme="dark"] .ss-theme-toggle button.on { background:#fff; color:#0A0A0F; }

/* Header chip (round icon button) — 44px tap target (Apple HIG) */
.ss-chip-btn {
  width:44px; height:44px; border-radius:22px;
  background: var(--ss-surface);
  display:inline-flex; align-items:center; justify-content:center;
  border:0.5px solid var(--ss-hair);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  position:relative;
  color: var(--ss-ink);
  cursor: pointer;
  transition: background .12s, transform .12s;
}
.ss-chip-btn:active { transform: scale(0.92); }
.ss-chip-btn:focus-visible { outline: 2px solid var(--ss-blue); outline-offset: 2px; }
.ss-chip-btn .ss-badge {
  position:absolute; top:8px; right:9px;
  width:8px; height:8px; border-radius:4px;
  background: var(--ss-blue);
  border:1.5px solid var(--ss-surface);
}

/* ── Search bar ──────────────────────────────── */
.ss-search {
  display:flex; align-items:center; gap:10px;
  background: var(--ss-search-bg);
  border-radius:14px; padding:12px 14px;
  margin:0 0 22px;
}
.ss-search-placeholder { flex:1; color: var(--ss-mute); font-size:16px; }
.ss-search svg { color: var(--ss-mute); flex-shrink:0; }

/* ── Category chips strip ────────────────────── */
.ss-cats {
  display:flex; gap:8px;
  overflow-x:auto;
  margin:0 -20px 24px;
  padding:0 20px 6px;
  scrollbar-width:none;
}
.ss-cats::-webkit-scrollbar { display:none; }
.ss-cat {
  padding:11px 18px; border-radius:22px;
  background: var(--ss-surface);
  color: var(--ss-ink);
  border:0.5px solid var(--ss-hair);
  font-size:15px; font-weight:500;
  white-space:nowrap;
  flex-shrink:0;
}
.ss-cat.on {
  background: var(--ss-pill-dark);
  color: var(--ss-bg);
  border-color: transparent;
  font-weight:600;
}
[data-theme="dark"] .ss-cat.on { color: #0A0A0F; }

/* ── Hero card ───────────────────────────────── */
.ss-hero {
  position:relative; overflow:hidden;
  background: var(--ss-surface);
  border-radius:26px; padding:24px;
  box-shadow: 0 12px 36px -20px rgba(15,23,42,0.18);
  border:0.5px solid var(--ss-hair);
}
.ss-hero-glow {
  position:absolute; top:-40px; right:-30px;
  width:260px; height:220px;
  background: radial-gradient(60% 60% at 50% 50%, rgba(109,94,247,0.18) 0%, rgba(109,94,247,0) 70%);
  pointer-events:none;
}
.ss-hero-body { position:relative; z-index:1; }
.ss-hero-kicker { font-size:13.5px; font-weight:600; color: var(--ss-blue); letter-spacing:0.1px; }

/* Spazio ottimizzato: nascondi il kicker blu sopra il titolo principale
   e la nota descrittiva subito sotto. Pattern usato su browse/favorites/
   category/legal pages/messages, ecc. */
.ss-hero-kicker:has(+ .ss-large-title),
.ss-hero-kicker:has(+ .ss-hero-title) { display: none !important; }
.ss-large-title + .ss-trust-cap,
.ss-large-title + .ss-large-title-sub,
.ss-hero-title + .ss-trust-cap { display: none !important; }
.ss-large-title-sub { display: none !important; }
.ss-hero-title {
  font-size:32px; font-weight:800; letter-spacing:-1.1px; line-height:1.05;
  color: var(--ss-ink); margin-top:8px;
}
.ss-hero-sub {
  font-size:15.5px; color: var(--ss-ink2);
  margin-top:14px; line-height:1.45; max-width:320px;
}
.ss-hero-ctas { display:flex; align-items:center; gap:16px; margin-top:18px; flex-wrap:wrap; }

.ss-btn-primary {
  background: var(--ss-blue); color:#fff;
  border-radius:22px; padding:11px 22px;
  font-size:15.5px; font-weight:600;
  box-shadow: 0 6px 14px rgba(109,94,247,0.30);
  display:inline-flex; align-items:center; gap:8px;
}
.ss-btn-primary:active { transform: scale(0.98); }

.ss-link-primary {
  font-size:15.5px; font-weight:600;
  color: var(--ss-blue);
  display:inline-flex; align-items:center; gap:4px;
}

.ss-hero-mock { position:relative; margin-top:26px; height:130px; }
.ss-hero-mock-card {
  position:absolute; right:0; top:0;
  width:220px; height:130px; border-radius:22px;
  background: linear-gradient(160deg, #1a1a1f 0%, #2a2a30 100%);
  box-shadow: 0 20px 40px -16px rgba(0,0,0,0.45);
}
.ss-hero-pricepill {
  position:absolute; right:14px; top:14px;
  background: rgba(255,255,255,0.95);
  border-radius:18px; padding:6px 14px;
  font-size:14px; font-weight:700; color: #0A0A0F;
  box-shadow: 0 8px 18px rgba(0,0,0,0.10);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ss-hero-aipill {
  position:absolute; left:0; bottom:6px;
  background: rgba(255,255,255,0.96);
  border-radius:16px; padding:10px 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ss-hero-aipill .ss-ai-title { font-size:13.5px; font-weight:700; color: #0A0A0F; }
.ss-hero-aipill .ss-ai-sub { font-size:12px; color: var(--ss-mute); margin-top:2px; }

/* ── Feature pair ────────────────────────────── */
.ss-features { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:14px; }
.ss-feature-card {
  background: var(--ss-surface); border-radius:22px; padding:18px;
  border:0.5px solid var(--ss-hair);
  box-shadow: 0 8px 22px -18px rgba(15,23,42,0.15);
}
.ss-feature-icon {
  width:42px; height:42px; border-radius:12px;
  background: var(--ss-blue-soft);
  display:flex; align-items:center; justify-content:center;
  color: var(--ss-blue);
}
.ss-feature-title { font-size:17px; font-weight:700; color: var(--ss-ink); margin-top:12px; }
.ss-feature-desc { font-size:13.5px; color: var(--ss-ink2); margin-top:4px; line-height:1.35; }

/* ── Trust strip ─────────────────────────────── */
.ss-trust {
  display:flex; align-items:center; justify-content:space-between;
  background: var(--ss-surface); border-radius:18px;
  padding:14px 18px; margin-top:14px;
  border:0.5px solid var(--ss-hair);
}
.ss-trust-cap { font-size:13px; color: var(--ss-mute); font-weight:600; letter-spacing:0.6px; }
.ss-trust-title { font-size:15px; color: var(--ss-ink); font-weight:600; margin-top:2px; }

/* ── Bottom tab bar (più sottile + safe-area iOS) ── */
.ss-tabs {
  position:fixed; left:0; right:0; bottom:0;
  max-width:430px; margin:0 auto;
  padding-top:6px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 10px));   /* safe-area iOS */
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top:0.5px solid var(--ss-hair2);
  z-index:40;
}
[data-theme="dark"] .ss-tabs { background: rgba(15,15,25,0.92); }
.ss-tabs-grid {
  display:grid; grid-template-columns: repeat(5, 1fr);
  align-items:end; padding:0 10px;
}
.ss-tab {
  display:flex; flex-direction:column; align-items:center; gap:2px;     /* ridotto gap */
  padding-top:4px;                                                       /* ridotto da 6 */
  color: var(--ss-mute);
  font-size:10.5px; font-weight:500; letter-spacing:0.1px;               /* font leggermente più piccolo */
}
.ss-tab.on { color: var(--ss-blue); font-weight:600; }
.ss-tab svg { color: currentColor; width: 24px; height: 24px; }          /* icone 24 invece di 26 */
.ss-tab-fab-wrap { display:flex; flex-direction:column; align-items:center; gap:2px; }
.ss-tab-fab {
  width:48px; height:48px; border-radius:24px;                           /* ridotto da 54 a 48 */
  background: var(--ss-blue);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 6px 18px rgba(109,94,247,0.35);
  margin-top:-18px;                                                       /* sporgenza ridotta */
  color: #fff;
}
.ss-tab-fab svg { width: 24px; height: 24px; }
.ss-tab-fab:active { transform: scale(0.95); }
.ss-tab-fab-label { font-size:10.5px; font-weight:600; color: var(--ss-mute); letter-spacing:0.1px; }

/* ── Utility ─────────────────────────────────── */
.ss-icon { display:block; flex-shrink:0; }

.ss-section-cap {
  font-size:12.5px; letter-spacing:1.4px;
  color: var(--ss-mute); font-weight:600;
  padding:24px 6px 10px;
}

.ss-large-title {
  font-size:34px; font-weight:800;
  color: var(--ss-ink); letter-spacing:-1.1px;
  margin:8px 0 14px;
}

.ss-meta-row {
  display:flex; align-items:center; justify-content:space-between;
  margin:4px 2px 12px;
  font-size:14px;
}
.ss-meta-row .ss-meta-count { color: var(--ss-mute); }
/* Nascondi il count quando è "0" o stringa vuota (no risultati = no badge) */
.ss-meta-count:empty,
#category-count:empty,
#browse-count:empty { display:none; }
[data-count-value="0"] { display:none !important; }
.ss-meta-row .ss-meta-sort { display:flex; align-items:center; gap:4px; color: var(--ss-ink2); }
.ss-meta-row .ss-meta-sort strong { font-weight:600; color: var(--ss-ink); }

/* ── Pill / chip variations for filter bar ───── */
.ss-pill {
  display:inline-flex; align-items:center; gap:6px;
  padding:9px 14px;
  border-radius:22px;
  background: var(--ss-surface);
  border:0.5px solid var(--ss-hair);
  color: var(--ss-ink);
  font-size:14.5px; font-weight:500;
  white-space:nowrap;
  flex-shrink:0;
}
.ss-pill.on { background: var(--ss-blue-soft); color: var(--ss-blue); border-color: transparent; font-weight:600; }
.ss-pill-icon {
  width:42px; height:42px; border-radius:22px;
  background: var(--ss-surface); border:0.5px solid var(--ss-hair);
  display:inline-flex; align-items:center; justify-content:center;
  flex-shrink:0;
}

/* ── Card grid (browse / favorites / category) ── */
.ss-grid,
.browse-results-list {
  display:grid; grid-template-columns:1fr 1fr; gap:12px;
  grid-auto-rows: 1fr;       /* tutte le righe alte uguali */
  align-items: stretch;
}
.ss-grid .card,
.browse-results-list .card,
.ss-card {
  background: var(--ss-surface); border-radius:12px; padding:5px;
  border:0.5px solid var(--ss-hair);
  box-shadow: 0 4px 12px -12px rgba(15,23,42,0.16);
  cursor:pointer;
  transition: transform .15s, box-shadow .15s;
  display:flex; flex-direction:column;
  height: 100%;
}
.ss-grid .card:active,
.browse-results-list .card:active { transform: scale(0.98); }

.card .cimg {
  position:relative;
  aspect-ratio: 1 / 1;            /* quadrata standard, prezzo allineato fra le card */
  border-radius:12px;
  overflow:hidden;
  background: var(--ss-surface2);
  border: 0.5px solid var(--ss-hair);
}
.card .cimg img,
.card .cimg video {
  width:100%; height:100%; object-fit:cover;
  display:block;
}
.card .fav {
  position:absolute; top:8px; right:8px;
  width:30px; height:30px; border-radius:15px;
  background: rgba(255,255,255,0.92);
  display:flex; align-items:center; justify-content:center;
  border:0.5px solid var(--ss-hair);
  cursor:pointer;
}
.card .fav svg {
  width:16px; height:16px; fill:none; stroke: var(--ss-ink);
  stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;
}
.card .fav.on svg { fill: var(--ss-danger); stroke: var(--ss-danger); }

.card .vbadge {
  position:absolute; left:8px; bottom:8px;
  background: rgba(0,0,0,0.55); color:#fff;
  font-size:10.5px; font-weight:700; letter-spacing:0.6px;
  padding:3px 8px; border-radius:8px;
}

.card .cbody {
  padding:10px 6px 8px;
  display:flex; flex-direction:column;
  flex:1 1 auto;
  gap: 4px;
}
.card .cname {
  font-size:14px; font-weight:700; color: var(--ss-ink); line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp:2; line-clamp:2;
  -webkit-box-orient:vertical; overflow:hidden;
  min-height: calc(14px * 1.25 * 2);  /* esattamente 2 righe → prezzi sempre allineati */
  margin: 0;
}
.card .cbrand { display:none; }
.card .cprice-row {
  display:flex; align-items:baseline; gap:4px;
  flex-wrap:nowrap;
}
.card .cprice {
  font-size:15px; font-weight:800; color: var(--ss-blue);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}
.card .coffers { font-size:11px; color: var(--ss-mute); }
/* Riga seller + tempo (allineati ai due lati) */
.card .cmeta-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}
.card .cseller {
  font-size: 11.5px; color: var(--ss-ink2); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.card .ccity { display: none; }
.card .cage {
  font-size:11px; color: var(--ss-mute);
  flex-shrink: 0;
  border-top:0.5px solid var(--ss-hair);
}
.card .cage.auction { color: var(--ss-blue); font-weight:600; }
.card .cage.auction { color: var(--ss-blue); font-weight:600; }

/* ── Group card / list rows (profile, settings) ── */
.ss-group-card {
  background: var(--ss-surface); border-radius:18px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 8px 24px -16px rgba(15,23,42,0.10);
  overflow:hidden;
}
.ss-row {
  display:flex; align-items:center; gap:14px;
  padding:14px 16px;
  border-bottom:0.5px solid var(--ss-hair);
  cursor:pointer;
}
.ss-row:last-child { border-bottom:none; }
.ss-row-icon {
  width:36px; height:36px; border-radius:10px;
  background: var(--ss-blue-soft);
  display:flex; align-items:center; justify-content:center;
  color: var(--ss-blue);
  flex-shrink:0;
}
.ss-row-title { flex:1; font-size:17px; color: var(--ss-ink); font-weight:500; }
.ss-row-trail { display:flex; align-items:center; gap:8px; color: var(--ss-mute2); }
.ss-row-badge {
  background: var(--ss-blue); color:#fff;
  border-radius:10px; padding:3px 9px;
  font-size:11.5px; font-weight:800; letter-spacing:0.4px;
}
.ss-row-dot { width:9px; height:9px; border-radius:5px; background: var(--ss-blue); }

/* ── Form fields ─────────────────────────────── */
.ss-field { margin-bottom:14px; }
.ss-field-label {
  display:flex; justify-content:space-between; align-items:baseline;
  margin-bottom:6px;
  font-size:13px; color: var(--ss-ink2); font-weight:500;
}
.ss-field-label .ss-count { font-size:12px; color: var(--ss-mute); }
.ss-field-input {
  background: var(--ss-surface);
  border:1px solid var(--ss-hair2);
  border-radius:12px;
  padding:13px 14px;
  font-size:15.5px;
  color: var(--ss-ink);
  width:100%;
  font: inherit;
  outline:none;
  transition: border-color .15s;
}
.ss-field-input:focus { border-color: var(--ss-blue); }
.ss-field-input.multiline { padding:12px 14px; min-height:90px; resize:vertical; }

/* ── Section card (forms / blocks) ───────────── */
.ss-section-card {
  background: var(--ss-surface);
  border:0.5px solid var(--ss-hair);
  border-radius:18px;
  padding:18px;
  margin-top:14px;
  box-shadow: 0 6px 18px -14px rgba(15,23,42,0.18);
}
.ss-section-title {
  font-size:17px; font-weight:700;
  color: var(--ss-ink);
  margin-bottom:12px;
}

/* ── Sticky CTA at bottom ────────────────────── */
.ss-sticky-cta {
  position:fixed; left:0; right:0; bottom:0; z-index:30;
  max-width:430px; margin:0 auto;
  background: linear-gradient(180deg, rgba(244,245,249,0) 0%, rgba(244,245,249,0.95) 30%, var(--ss-bg) 60%);
  padding:20px 20px 0;
}
[data-theme="dark"] .ss-sticky-cta {
  background: linear-gradient(180deg, rgba(10,10,18,0) 0%, rgba(10,10,18,0.95) 30%, var(--ss-bg) 60%);
}
.ss-cta-button {
  background: var(--ss-blue); color:#fff;
  border-radius:18px;
  padding:17px 22px;
  display:flex; align-items:center; justify-content:center; gap:10px;
  font-size:16.5px; font-weight:700;
  box-shadow: 0 14px 30px -10px rgba(109,94,247,0.45);
  width:100%;
}
.ss-cta-button:active { transform: scale(0.985); }

/* ── Generic back/close button row ───────────── */
.ss-page-head {
  display:flex; align-items:flex-start; justify-content:space-between;
  padding:6px 0;
}
.ss-page-head-back {
  width:40px; height:40px; border-radius:20px;
  background: var(--ss-surface); border:0.5px solid var(--ss-hair);
  display:flex; align-items:center; justify-content:center;
  color: var(--ss-ink);
}
.ss-page-head-close {
  width:36px; height:36px; border-radius:18px;
  background: var(--ss-search-bg);
  display:flex; align-items:center; justify-content:center;
  color: var(--ss-ink);
}

/* ── Stepper row (sell flow) ─────────────────── */
.ss-stepper {
  display:flex; align-items:center; gap:14px;
  background: var(--ss-surface);
  border:0.5px solid var(--ss-hair);
  border-radius:16px;
  padding:14px 18px; margin-top:22px;
  box-shadow: 0 6px 18px -14px rgba(15,23,42,0.18);
}
.ss-stepper-num { font-size:15px; font-weight:700; color: var(--ss-ink); }
.ss-stepper-label { font-size:15px; color: var(--ss-ink2); margin-right:6px; }
.ss-stepper-bar { flex:1; height:5px; background: var(--ss-search-bg); border-radius:4px; overflow:hidden; }
.ss-stepper-fill { height:100%; background: var(--ss-blue); border-radius:4px; }

/* ── Selection cards (type-of-sale) ──────────── */
.ss-option {
  display:flex; align-items:center; gap:14px;
  background: var(--ss-surface);
  border:1px solid var(--ss-hair2);
  border-radius:16px; padding:14px;
  cursor:pointer;
  transition: border-color .15s, background .15s;
}
.ss-option + .ss-option { margin-top:10px; }
.ss-option.on {
  background: linear-gradient(180deg, var(--ss-blue-soft) 0%, var(--ss-surface) 100%);
  border:1.5px solid var(--ss-blue);
}
.ss-option-icon {
  width:56px; height:56px; border-radius:14px;
  background: var(--ss-surface2);
  display:flex; align-items:center; justify-content:center;
  color: #5e5e66;
  flex-shrink:0;
}
.ss-option.on .ss-option-icon { background: var(--ss-blue-soft); color: var(--ss-blue); }
.ss-option-body { flex:1; }
.ss-option-title { font-size:16.5px; font-weight:700; color: var(--ss-ink); }
.ss-option-desc { font-size:14px; color: var(--ss-ink2); margin-top:2px; }
.ss-option-check {
  width:22px; height:22px; border-radius:11px;
  border:1.5px solid var(--ss-hair2); background: var(--ss-surface);
  display:flex; align-items:center; justify-content:center;
  color: #fff;
  flex-shrink:0;
}
.ss-option.on .ss-option-check { background: var(--ss-blue); border-color: var(--ss-blue); }

/* ── Dropzone (photos) ──────────────────────── */
.ss-dropzone {
  border:1.5px dashed var(--ss-blue);
  border-radius:16px;
  padding:22px 16px;
  display:flex; align-items:center; justify-content:center; gap:14px;
  background: rgba(109,94,247,0.03);
  cursor:pointer;
}
.ss-dropzone-icon {
  width:46px; height:46px; border-radius:12px;
  background: var(--ss-blue-soft);
  display:flex; align-items:center; justify-content:center;
  color: var(--ss-blue);
}
.ss-dropzone-title { font-size:16px; font-weight:700; color: var(--ss-ink); }
.ss-dropzone-sub { font-size:13.5px; color: var(--ss-mute); margin-top:2px; }

.ss-thumbs { display:grid; grid-template-columns: repeat(4, 1fr); gap:8px; margin-top:12px; }
.ss-thumb {
  position:relative; aspect-ratio:1/1; border-radius:12px;
  background: var(--ss-surface2);
  overflow:hidden;
}
.ss-thumb img, .ss-thumb video { width:100%; height:100%; object-fit:cover; }
.ss-thumb-add {
  aspect-ratio:1/1; border-radius:12px;
  background: var(--ss-surface2);
  border:1px dashed var(--ss-hair2);
  display:flex; align-items:center; justify-content:center;
  color: var(--ss-blue);
  cursor:pointer;
}
.ss-thumb-remove {
  position:absolute; top:4px; right:4px;
  width:20px; height:20px; border-radius:10px;
  background: var(--ss-surface);
  border:0.5px solid var(--ss-hair);
  display:flex; align-items:center; justify-content:center;
  color: var(--ss-ink);
  cursor:pointer;
}

/* ── Bottom sheet (Modifica annuncio) ────────── */
.ss-sheet-backdrop {
  position:fixed; inset:0; z-index:90;
  background: rgba(0,0,0,0.18);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.ss-sheet {
  position:fixed; left:50%; transform:translateX(-50%);
  bottom:0; width:100%; max-width:430px;
  top:170px;
  background: var(--ss-surface);
  border-top-left-radius:28px; border-top-right-radius:28px;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.18);
  z-index:91;
  overflow:hidden;
  display:flex; flex-direction:column;
}
.ss-sheet-handle {
  display:flex; justify-content:center;
  padding:10px 0 4px;
}
.ss-sheet-handle::after {
  content:""; width:42px; height:5px; border-radius:3px;
  background: rgba(0,0,0,0.18);
}
.ss-sheet-body {
  flex:1; overflow-y:auto;
  padding:12px 22px 140px;
}
.ss-sheet-head { display:flex; align-items:flex-start; justify-content:space-between; }
.ss-sheet-kicker { font-size:12.5px; font-weight:700; color: var(--ss-blue); letter-spacing:1.6px; }
.ss-sheet-title { font-size:28px; font-weight:800; color: var(--ss-ink); letter-spacing:-0.8px; margin-top:4px; }

/* ── Avatar (profilo) ────────────────────────── */
.ss-avatar {
  width:86px; height:86px; border-radius:43px;
  background: var(--ss-blue-soft);
  border:3px solid var(--ss-surface);
  box-shadow: 0 6px 20px -8px rgba(15,23,42,0.18);
  display:flex; align-items:center; justify-content:center;
  font-size:30px; font-weight:800; color: var(--ss-blue);
  letter-spacing:-0.5px;
  position:relative;
  overflow:hidden;
}
.ss-avatar img { width:100%; height:100%; object-fit:cover; }
.ss-avatar-badge {
  position:absolute; bottom:0; right:2px;
  width:26px; height:26px; border-radius:13px;
  background: #1a1a1f;
  display:flex; align-items:center; justify-content:center;
  border:2px solid var(--ss-surface);
  color:#fff;
}

/* ── Stats grid (profilo) ────────────────────── */
.ss-stats { display:grid; grid-template-columns:1fr 1fr 1fr; }
.ss-stat {
  display:flex; flex-direction:column; align-items:center; gap:4px;
  padding:4px 0;
  border-left:0.5px solid var(--ss-hair);
}
.ss-stat:first-child { border-left:none; }
.ss-stat-value { font-size:24px; font-weight:800; color: var(--ss-ink); letter-spacing:-0.5px; margin-top:4px; }
.ss-stat-label { font-size:13px; color: var(--ss-ink2); }

/* ── Empty state ─────────────────────────────── */
.ss-empty {
  text-align:center; padding:60px 24px;
  color: var(--ss-mute);
}
.ss-empty h2 { font-size:18px; font-weight:700; color: var(--ss-ink); margin-bottom:8px; }
.ss-empty p { font-size:14.5px; line-height:1.45; }

/* ─────────────────────────────────────────────────────────────────
   COMPONENTI AGGIUNTIVI per JSX screens v2
   (Saldo, Impostazioni, Miei annunci, Profilo esteso, Modifica v2,
    Messaggi, Chat, Cerca categorie)
   ───────────────────────────────────────────────────────────────── */

/* ── Switch (toggle iOS) ───────────────────── */
.ss-switch {
  width: 50px; height: 30px; border-radius: 15px;
  background: #D9D9DE;
  padding: 3px; position: relative;
  transition: background 0.2s;
  cursor: pointer;
  border: none; flex-shrink: 0;
}
.ss-switch::after {
  content: "";
  display: block;
  width: 24px; height: 24px; border-radius: 12px; background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.18);
  transition: transform 0.2s;
}
.ss-switch.is-on { background: var(--ss-blue); }
.ss-switch.is-on::after { transform: translateX(20px); }
[data-theme="dark"] .ss-switch { background: #3a3a44; }

/* ── Pill soft (label + value valore breve come "Italiano" "CHF") ─ */
.ss-pill-soft {
  background: var(--ss-blue-soft);
  color: var(--ss-blue);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 13px; font-weight: 700;
}

/* ── Segmented control (tema sun/moon, condizione 4 opzioni) ───── */
.ss-segmented {
  background: var(--ss-search-bg);
  border-radius: 12px;
  padding: 3px;
  display: flex; gap: 2px;
}
.ss-segmented button {
  flex: 1;
  border: none; background: transparent;
  padding: 8px 8px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  color: var(--ss-ink2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  min-height: 28px;
  transition: background .12s, color .12s;
}
.ss-segmented button.is-on {
  background: var(--ss-surface);
  color: var(--ss-ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* ── Hero balance card (wallet) ────────────────── */
.ss-hero-balance {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--ss-blue) 0%, var(--ss-blue-deep) 100%);
  border-radius: 22px;
  padding: 20px 22px 22px;
  color: #fff;
  box-shadow: 0 16px 30px -14px rgba(109,94,247,0.55);
  margin-top: 4px;
}
.ss-hero-balance::after {
  content: ""; position: absolute;
  top: -40px; right: -30px; width: 180px; height: 180px;
  background: radial-gradient(60% 60% at 50% 50%, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.ss-hero-balance-eyebrow {
  font-size: 13px; color: rgba(255,255,255,0.78);
  font-weight: 600; letter-spacing: 0.4px;
  position: relative;
}
.ss-hero-balance-amount {
  font-size: 40px; font-weight: 800; letter-spacing: -1.2px;
  margin-top: 8px; position: relative;
}
.ss-hero-balance-sub {
  font-size: 13.5px; color: rgba(255,255,255,0.85);
  margin-top: 2px; position: relative;
}
.ss-hero-actions {
  display: flex; gap: 8px; margin-top: 18px;
  position: relative;
}
.ss-action-btn {
  flex: 1;
  background: rgba(255,255,255,0.18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 10px 6px;
  border: 0.5px solid rgba(255,255,255,0.30);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: #fff;
  cursor: pointer;
}
.ss-action-btn-label {
  font-size: 12px; font-weight: 700;
}

/* ── Info row (label + value, profilo info) ────── */
.ss-info-row,
.account-mobile-detail-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--ss-hair);
  min-height: 52px;
}
.ss-info-row:last-child,
.account-mobile-detail-row:last-child { border-bottom: none; }
/* account.js genera: <div class="account-mobile-detail-row"><span>label</span><strong>value</strong></div> */
.account-mobile-detail-row > span {
  flex: 1; font-size: 14.5px; color: var(--ss-ink2); font-weight: 500;
}
.account-mobile-detail-row > strong {
  font-size: 15px; font-weight: 700; color: var(--ss-ink);
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}
.ss-info-row-icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--ss-blue-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--ss-blue);
  flex-shrink: 0;
}
.ss-info-row-label { flex: 1; font-size: 14px; color: var(--ss-ink2); }
.ss-info-row-value {
  font-size: 15px; font-weight: 700; color: var(--ss-ink);
  text-align: right;
}

/* ── Cerca: category list with colored icon ────── */
.ss-cerca-cat {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--ss-hair);
  color: var(--ss-ink);
  text-decoration: none;
  cursor: pointer;
}
.ss-cerca-cat:last-child { border-bottom: none; }
.ss-cerca-cat-icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ss-cerca-cat-icon.tint-fashion       { background: #FFE2E5; color: #E5305C; }
.ss-cerca-cat-icon.tint-technology    { background: #E5EBFF; color: var(--ss-blue); }
.ss-cerca-cat-icon.tint-home          { background: #FFEAD0; color: #E08A1F; }
.ss-cerca-cat-icon.tint-vehicles      { background: #DDF0FF; color: #1B86E5; }
.ss-cerca-cat-icon.tint-collectibles  { background: #EAE5FF; color: #7659E6; }
.ss-cerca-cat-icon.tint-sports        { background: #E0F6E5; color: #2C9B47; }
.ss-cerca-cat-icon.tint-books         { background: #FFF1C7; color: #C19400; }
.ss-cerca-cat-icon.tint-kids          { background: #FFE5F4; color: #D8489D; }
.ss-cerca-cat-icon.tint-pets          { background: #FFE4D6; color: #D86A2C; }
.ss-cerca-cat-icon.tint-services      { background: #E5F3F3; color: #1F8A8A; }
.ss-cerca-cat-label {
  flex: 1; font-size: 16px; color: var(--ss-ink); font-weight: 600;
}

/* ── Message conversation row (Messaggi) ───────── */
.ss-msg-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--ss-hair);
  cursor: pointer;
}
.ss-msg-row:last-child { border-bottom: none; }
.ss-msg-avatar {
  width: 48px; height: 48px; border-radius: 24px;
  background: var(--ss-blue-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: var(--ss-blue);
  letter-spacing: -0.2px;
  flex-shrink: 0;
  overflow: hidden;
}
.ss-msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ss-msg-body { flex: 1; min-width: 0; }
.ss-msg-line1 { display: flex; justify-content: space-between; align-items: baseline; }
.ss-msg-name {
  font-size: 16px; font-weight: 700; color: var(--ss-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-msg-time {
  font-size: 12.5px; color: var(--ss-mute);
  margin-left: 8px; flex-shrink: 0;
}
.ss-msg-time.is-unread { color: var(--ss-blue); font-weight: 700; }
.ss-msg-product {
  font-size: 12.5px; color: var(--ss-mute);
  margin-top: 2px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-msg-last {
  font-size: 14px; color: var(--ss-ink2);
  margin-top: 3px; font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.ss-msg-last.is-unread { color: var(--ss-ink); font-weight: 600; }
.ss-msg-last-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ss-msg-unread-badge {
  background: var(--ss-blue); color: #fff;
  font-size: 11.5px; font-weight: 800;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Chat thread: header + bubbles + composer ──── */
.ss-chat-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--ss-hair2);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
}
[data-theme="dark"] .ss-chat-header { background: rgba(15,15,25,0.92); }
.ss-chat-back {
  width: 36px; height: 36px; border-radius: 18px;
  background: var(--ss-search-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--ss-ink);
  border: none; cursor: pointer; flex-shrink: 0;
}
.ss-chat-peer {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
}
.ss-chat-peer-avatar {
  width: 40px; height: 40px; border-radius: 20px;
  background: var(--ss-blue-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--ss-blue);
  flex-shrink: 0;
}
.ss-chat-peer-name { font-size: 16px; font-weight: 700; color: var(--ss-ink); }
.ss-chat-peer-status {
  font-size: 12px; color: #2C9B47;
  display: flex; align-items: center; gap: 5px;
  margin-top: 1px;
}
.ss-chat-peer-status::before {
  content: ""; width: 7px; height: 7px; border-radius: 4px;
  background: #2C9B47;
}

.ss-chat-product {
  display: flex; align-items: center; gap: 12px;
  background: var(--ss-bg);
  border-radius: 14px; padding: 10px; margin: 14px 16px;
  border: 0.5px solid var(--ss-hair);
}
.ss-chat-product-img {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--ss-blue-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.ss-chat-product-img img { width: 100%; height: 100%; object-fit: cover; }
.ss-chat-product-info { flex: 1; min-width: 0; }
.ss-chat-product-kicker {
  font-size: 11px; font-weight: 700; color: var(--ss-mute);
  letter-spacing: 0.6px;
}
.ss-chat-product-title {
  font-size: 14.5px; font-weight: 700; color: var(--ss-ink);
  margin-top: 2px;
}
.ss-chat-product-price {
  font-size: 13px; color: var(--ss-blue); font-weight: 700;
  margin-top: 1px;
}

.ss-chat-day {
  text-align: center; font-size: 12px;
  color: var(--ss-mute);
  margin: 6px 0 14px;
}
.ss-bubble-row { display: flex; margin-bottom: 4px; padding: 0 16px; }
.ss-bubble-row.is-right { justify-content: flex-end; }
.ss-bubble {
  max-width: 76%;
  padding: 10px 14px;
  font-size: 15.5px; line-height: 1.35;
  color: var(--ss-ink);
  background: var(--ss-surface2);
  border-radius: 20px;
  border-bottom-left-radius: 6px;
  word-wrap: break-word;
}
.ss-bubble-row.is-right .ss-bubble {
  color: #fff;
  background: var(--ss-blue);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 4px rgba(109,94,247,0.18);
}
.ss-bubble-time {
  font-size: 11px; color: var(--ss-mute);
  padding: 2px 16px 12px;
}
.ss-bubble-time.is-right { text-align: right; padding-right: 22px; }
.ss-bubble-time.is-left { text-align: left; padding-left: 22px; }

.ss-chat-composer {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: 430px; margin: 0 auto;
  background: rgba(255,255,255,0.95);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--ss-hair2);
  padding: 10px 14px 30px;
  display: flex; align-items: center; gap: 8px;
  z-index: 30;
}
[data-theme="dark"] .ss-chat-composer { background: rgba(15,15,25,0.95); }
.ss-chat-composer-attach {
  width: 36px; height: 36px; border-radius: 18px;
  background: var(--ss-blue-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--ss-blue);
  border: none; cursor: pointer; flex-shrink: 0;
}
.ss-chat-composer-input-wrap {
  flex: 1;
  background: var(--ss-search-bg);
  border-radius: 20px;
  padding: 10px 16px;
  display: flex; align-items: center; gap: 8px;
}
.ss-chat-composer-input {
  flex: 1; background: transparent; border: none; outline: none;
  font: inherit; font-size: 15px; color: var(--ss-ink);
}
.ss-chat-composer-input::placeholder { color: var(--ss-mute); }
.ss-chat-composer-send {
  width: 36px; height: 36px; border-radius: 18px;
  background: var(--ss-blue);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  border: none; cursor: pointer;
  box-shadow: 0 4px 10px rgba(109,94,247,0.35);
  flex-shrink: 0;
}

/* ── Miei annunci: card verticale compatta (2 per riga) ─────── */
#account-mobile-listings-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.ss-listing-row {
  background: var(--ss-surface);
  border-radius: 14px;
  border: 0.5px solid var(--ss-hair);
  box-shadow: 0 6px 18px -16px rgba(15,23,42,0.16);
  display: flex; flex-direction: column;     /* verticale */
  overflow: hidden;
  cursor: pointer;
}
.ss-listing-row-img {
  width: 100%;                                /* full width della card */
  aspect-ratio: 4 / 5;                        /* portrait compact */
  background: var(--ss-surface2);
  position: relative; flex-shrink: 0;
}
.ss-listing-row-img img,
.ss-listing-row-img video {
  width: 100%; height: 100%; object-fit: cover;
}
.ss-listing-row-body {
  padding: 8px 10px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.ss-listing-row-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 4px;
}
.ss-listing-row-title {
  font-size: 12.5px; font-weight: 700; color: var(--ss-ink);
  line-height: 1.25; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(12.5px * 1.25 * 2);
}
.ss-status-badge {
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 10px; font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
  /* Posizionato dentro la card immagine (top-right) */
  position: absolute; top: 6px; right: 6px;
  z-index: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.ss-status-badge.status-active   { background: rgba(44,155,71,0.12); color: #2C9B47; }
.ss-status-badge.status-sold     { background: var(--ss-blue-soft);   color: var(--ss-blue); }
.ss-status-badge.status-draft    { background: #FFEAD0;               color: #C77400; }
.ss-status-badge.status-archived { background: var(--ss-search-bg);   color: var(--ss-ink2); }
.ss-status-badge.status-blocked  { background: rgba(255,59,48,0.12);  color: var(--ss-danger); }
.ss-listing-row-sub {
  font-size: 11px; color: var(--ss-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-listing-row-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 2px;
}
.ss-listing-row-price {
  font-size: 14px; font-weight: 800; color: var(--ss-blue);
}
.ss-listing-row-views {
  font-size: 11px; color: var(--ss-mute);
  display: flex; align-items: center; gap: 3px;
}
.ss-listing-row-actions {
  display: flex; gap: 4px; margin-top: 6px;
}
.ss-listing-row-actions button {
  flex: 1; border-radius: 8px;
  padding: 6px 4px;
  font-size: 11.5px; font-weight: 700;
  border: none; cursor: pointer;
  font-family: inherit;
}
.ss-listing-row-actions .ss-action-edit   { background: var(--ss-blue-soft); color: var(--ss-blue); }
.ss-listing-row-actions .ss-action-stats  { background: var(--ss-search-bg); color: var(--ss-ink2); }
.ss-listing-row-actions .ss-action-more {
  flex: 0 0 26px;
  background: var(--ss-search-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--ss-ink2);
  padding: 6px 0;
}

/* ── Tab strip con counter (Miei annunci) ─────── */
.ss-tab-strip {
  display: flex; gap: 8px;
  padding: 8px 0 16px;
  overflow-x: auto;
  margin: 0 -20px;
  padding-left: 20px; padding-right: 20px;
  scrollbar-width: none;
}
.ss-tab-strip::-webkit-scrollbar { display: none; }
.ss-tab-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 22px;
  background: var(--ss-surface);
  color: var(--ss-ink);
  border: 0.5px solid var(--ss-hair);
  font-size: 14px; font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
  cursor: pointer;
  font-family: inherit;
}
.ss-tab-chip.is-on {
  background: var(--ss-pill-dark);
  color: var(--ss-bg);
  border-color: transparent;
}
[data-theme="dark"] .ss-tab-chip.is-on { color: #0A0A0F; }
.ss-tab-chip-count {
  background: var(--ss-search-bg);
  color: var(--ss-mute);
  border-radius: 10px; padding: 1px 7px;
  font-size: 11.5px; font-weight: 700;
}
.ss-tab-chip.is-on .ss-tab-chip-count {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
[data-theme="dark"] .ss-tab-chip.is-on .ss-tab-chip-count {
  background: rgba(0,0,0,0.18); color: #0A0A0F;
}

/* ── Profile extended hero (con verifica) ────────── */
.ss-profile-hero {
  background: var(--ss-surface);
  border-radius: 22px;
  padding: 20px;
  border: 0.5px solid var(--ss-hair);
  box-shadow: 0 8px 26px -16px rgba(15,23,42,0.18);
  position: relative; overflow: hidden;
}
.ss-profile-hero::before {
  content: ""; position: absolute;
  top: -40px; right: -40px; width: 200px; height: 200px;
  background: radial-gradient(60% 60% at 50% 50%, rgba(109,94,247,0.12) 0%, rgba(109,94,247,0) 70%);
  pointer-events: none;
}
.ss-profile-hero-row {
  display: flex; align-items: center; gap: 14px;
  position: relative;
}
.ss-profile-hero-avatar-wrap { position: relative; }
.ss-profile-hero-avatar {
  width: 78px; height: 78px; border-radius: 39px;
  background: var(--ss-blue-soft);
  border: 3px solid var(--ss-surface);
  box-shadow: 0 6px 20px -8px rgba(15,23,42,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; color: var(--ss-blue);
  letter-spacing: -0.5px;
  overflow: hidden;
}
.ss-profile-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ss-profile-verified-dot {
  position: absolute; bottom: -2px; right: -2px;
  width: 24px; height: 24px; border-radius: 12px;
  background: #2C9B47;
  border: 2.5px solid var(--ss-surface);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.ss-profile-hero-info { flex: 1; min-width: 0; }
.ss-profile-hero-name {
  font-size: 22px; font-weight: 800; color: var(--ss-ink);
  letter-spacing: -0.4px;
}
.ss-profile-hero-fullname {
  font-size: 14px; color: var(--ss-ink2); margin-top: 1px;
}
.ss-profile-verified-chip {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 6px;
  background: var(--ss-blue-soft); color: var(--ss-blue);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 12px; font-weight: 700;
}
.ss-profile-hero-bio {
  font-size: 14.5px; color: var(--ss-ink);
  margin-top: 14px; line-height: 1.4;
  position: relative;
}
.ss-profile-hero-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  margin-top: 16px; gap: 0;
  position: relative;
}
.ss-profile-hero-stat {
  text-align: center; padding: 8px 0;
  border-left: 0.5px solid var(--ss-hair);
}
.ss-profile-hero-stat:first-child { border-left: none; }
.ss-profile-hero-stat-value {
  font-size: 20px; font-weight: 800; color: var(--ss-ink);
  letter-spacing: -0.4px;
}
.ss-profile-hero-stat-label {
  font-size: 12px; color: var(--ss-mute); margin-top: 2px;
}

/* ── Photo grid v2 (Modifica annuncio: 1 grande + 3 piccole) ────── */
.ss-photo-grid-v2 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 10px;
}
.ss-photo-cover {
  grid-column: span 2; grid-row: span 2;
  border-radius: 16px; overflow: hidden; position: relative;
  background: var(--ss-surface2);
  border: 1.5px solid var(--ss-blue);
}
.ss-photo-cover img, .ss-photo-cover video { width: 100%; height: 100%; object-fit: cover; }
.ss-photo-cover-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--ss-blue); color: #fff;
  border-radius: 10px; padding: 3px 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
}
.ss-photo-cover-delete {
  position: absolute; bottom: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 13px;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  color: #fff; border: none; cursor: pointer;
}
.ss-photo-small {
  aspect-ratio: 1 / 1; border-radius: 12px;
  background: var(--ss-surface2);
  position: relative; overflow: hidden;
  border: 0.5px solid var(--ss-hair);
}
.ss-photo-small img, .ss-photo-small video { width: 100%; height: 100%; object-fit: cover; }
.ss-photo-small-remove {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 9px;
  background: var(--ss-surface);
  border: 0.5px solid var(--ss-hair);
  display: flex; align-items: center; justify-content: center;
  color: var(--ss-ink); cursor: pointer;
}
.ss-photo-add {
  aspect-ratio: 1 / 1; border-radius: 12px;
  background: var(--ss-surface2);
  border: 1.5px dashed var(--ss-blue);
  display: flex; align-items: center; justify-content: center;
  color: var(--ss-blue);
  cursor: pointer;
}

/* ── Settings rows label + value ────────────────── */
.ss-settings-label { font-size: 12.5px; font-weight: 700; color: var(--ss-mute); letter-spacing: 1.4px; padding: 24px 6px 10px; }

/* ── Danger CTA (delete annuncio, logout, ecc) ─── */
.ss-cta-danger {
  background: rgba(255,59,48,0.06);
  border: 0.5px solid rgba(255,59,48,0.20);
  border-radius: 14px;
  padding: 13px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--ss-danger);
  font-size: 15px; font-weight: 700;
  cursor: pointer; width: 100%;
}
.ss-cta-secondary {
  background: var(--ss-surface);
  border: 0.5px solid var(--ss-hair);
  border-radius: 16px;
  padding: 14px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--ss-ink);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
}

/* ── Sticky bottom bar (modal v2) ───────────────── */
.ss-sheet-cta-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 22px 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.96) 30%, var(--ss-surface) 60%);
  display: flex; gap: 10px;
}
[data-theme="dark"] .ss-sheet-cta-bar {
  background: linear-gradient(180deg, rgba(23,23,42,0) 0%, rgba(23,23,42,0.96) 30%, var(--ss-surface) 60%);
}
.ss-sheet-cta-cancel {
  flex: 0 0 auto;
  background: var(--ss-search-bg);
  color: var(--ss-ink);
  border-radius: 16px;
  padding: 15px 20px;
  font-size: 15px; font-weight: 700;
  border: none; cursor: pointer;
}
.ss-sheet-cta-save {
  flex: 1;
  background: var(--ss-blue); color: #fff;
  border-radius: 16px;
  padding: 15px;
  font-size: 15.5px; font-weight: 700;
  border: none; cursor: pointer;
  box-shadow: 0 12px 24px -10px rgba(109,94,247,0.45);
}

/* ── Auth gate (mostrato da auth-shim.js) ─────── */
#ss-auth-gate {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--ss-bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  /* niente fade-in: appare istantaneamente per evitare il flash */
  overflow-y: auto;
}
.ss-auth-card {
  background: var(--ss-surface);
  border-radius: 28px;
  padding: 32px 26px;
  max-width: 380px; width: 100%;
  text-align: center;
  border: 0.5px solid var(--ss-hair);
  box-shadow: 0 20px 60px -20px rgba(15,23,42,0.18);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: ss-auth-pop .35s cubic-bezier(.25,.46,.45,.94);
}
@keyframes ss-auth-pop { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.ss-auth-mark {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--ss-blue-soft); color: var(--ss-blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.ss-auth-kicker { font-size: 13.5px; font-weight: 600; color: var(--ss-blue); letter-spacing: 0.1px; }
.ss-auth-title { font-size: 26px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.1; color: var(--ss-ink); }
.ss-auth-sub { font-size: 15px; color: var(--ss-ink2); line-height: 1.45; max-width: 300px; }
.ss-auth-buttons { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 10px; }
.ss-auth-btn-register {
  background: var(--ss-blue); color: #fff;
  border-radius: 18px; padding: 14px 22px;
  font-size: 15.5px; font-weight: 700;
  box-shadow: 0 8px 20px -6px rgba(109,94,247,0.4);
  display: flex; align-items: center; justify-content: center;
}
.ss-auth-btn-login {
  background: var(--ss-surface2); color: var(--ss-ink);
  border-radius: 18px; padding: 14px 22px;
  font-size: 15.5px; font-weight: 700;
  border: 0.5px solid var(--ss-hair);
  display: flex; align-items: center; justify-content: center;
}
.ss-auth-back {
  font-size: 13.5px; color: var(--ss-mute); font-weight: 500;
  margin-top: 6px;
}
.ss-auth-back:hover { color: var(--ss-ink); }

/* ── Auth modal (login/register/recovery) ──────── */
#ss-auth-modal,
#ss-pwd-reset-modal {
  position: fixed; inset: 0; z-index: 9100;
  background: rgba(0,0,0,0.45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: ss-auth-fadein .2s ease-out;
}
.ss-auth-modal-card {
  background: var(--ss-surface);
  border-radius: 24px;
  padding: 28px 24px 22px;
  max-width: 380px; width: 100%;
  position: relative;
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  border: 0.5px solid var(--ss-hair);
  box-shadow: 0 20px 60px -10px rgba(0,0,0,0.3);
  animation: ss-auth-pop .25s cubic-bezier(.25,.46,.45,.94);
  max-height: 90vh; overflow-y: auto;
}
.ss-auth-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 16px;
  background: var(--ss-search-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--ss-ink);
  border: none; cursor: pointer;
}
.ss-auth-modal-mark {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--ss-blue-soft); color: var(--ss-blue);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
}
.ss-auth-modal-title {
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--ss-ink); text-align: center;
  margin-bottom: 18px;
}
.ss-auth-form { display: flex; flex-direction: column; }
.ss-auth-form .ss-field-label {
  font-size: 13px; color: var(--ss-ink2); font-weight: 500;
  margin-bottom: 6px;
}
.ss-auth-btn-magic {
  background: transparent; color: var(--ss-blue);
  border: none; padding: 12px;
  font-size: 14.5px; font-weight: 600;
  margin-top: 10px;
  cursor: pointer;
}
.ss-auth-btn-magic:hover { text-decoration: underline; }
.ss-auth-status {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  text-align: center;
}
.ss-auth-status[data-kind="error"] {
  background: rgba(255,59,48,0.12); color: var(--ss-danger);
}
.ss-auth-status[data-kind="success"] {
  background: var(--ss-blue-soft); color: var(--ss-blue);
}
.ss-auth-switch {
  background: transparent; border: none;
  font-size: 14px; color: var(--ss-mute); font-weight: 500;
  padding: 12px; margin-top: 8px; cursor: pointer;
  text-align: center;
}
.ss-auth-switch:hover { color: var(--ss-ink); }
.ss-auth-hint {
  display: block;
  font-size: 12px; color: var(--ss-mute);
  margin-top: 4px;
}
.ss-auth-terms {
  font-size: 12.5px; color: var(--ss-mute);
  text-align: center; line-height: 1.4;
  margin-top: 12px; padding: 0 4px;
}

/* ── Photo manager (sell: riordino + delete) ───── */
.ss-photo-manager {
  display:grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap:10px; margin-top:12px;
}
.ss-photo-manager:empty { display:none; }
.ss-photo-thumb {
  position:relative; aspect-ratio:1/1; border-radius:12px; overflow:hidden;
  background: var(--ss-surface2);
  border:0.5px solid var(--ss-hair);
}
.ss-photo-thumb img,
.ss-photo-thumb video { width:100%; height:100%; object-fit:cover; display:block; }
.ss-photo-thumb-primary {
  position:absolute; top:6px; left:6px;
  background: var(--ss-blue); color:#fff;
  font-size:10px; font-weight:700; letter-spacing:0.4px;
  padding:3px 7px; border-radius:6px;
}
.ss-photo-thumb-actions {
  position:absolute; left:0; right:0; bottom:0;
  display:flex; justify-content:space-between;
  padding:6px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.55) 100%);
}
.ss-photo-thumb-actions button {
  width:26px; height:26px; border-radius:13px;
  background: rgba(255,255,255,0.95); color: var(--ss-ink);
  border:none; cursor:pointer; padding:0;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.ss-photo-thumb-actions button:disabled { opacity:0.4; cursor:default; }
.ss-photo-thumb-actions button:hover:not(:disabled) { background:#fff; transform: scale(1.08); }
.ss-photo-thumb-actions .ss-photo-delete { background: var(--ss-danger); color:#fff; }
.ss-photo-thumb-actions .ss-photo-delete:hover { background:#d6342a; }

/* ── Toast (sell.js / account.js / listing.js usano .visible) ─── */
.toast,
#toast,
#account-toast,
#listing-toast {
  position: fixed; left:50%; bottom:120px; transform: translateX(-50%) translateY(8px);
  background: var(--ss-ink); color: var(--ss-bg);
  padding: 11px 18px; border-radius: 14px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  z-index:80; opacity:0; pointer-events:none;
  transition: opacity .2s ease, transform .2s ease;
  max-width: 90vw;
}
.toast.visible,
#toast.visible,
#account-toast.visible,
#listing-toast.visible {
  opacity:1;
  transform: translateX(-50%) translateY(0);
}

/* ── AI generate button: loading "thinking" dots ──────────────── */
.ai-generate-button.is-loading { opacity: 0.7; pointer-events: none; }
.ai-typing-dots {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 6px; vertical-align: middle;
}
.ai-typing-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  animation: ai-bounce 1.2s infinite ease-in-out;
}
.ai-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.30s; }
@keyframes ai-bounce {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}

/* ── Filter bottom sheet (browse) ───────────── */
.ss-filter-sheet-overlay {
  position:fixed; inset:0; z-index:9000;
  background: rgba(0,0,0,0.4);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display:flex; align-items:flex-end; justify-content:center;
  animation: ss-auth-fadein .2s ease;
}
.ss-filter-sheet {
  width: 100%; max-width: 430px;
  background: var(--ss-surface);
  border-top-left-radius: 28px; border-top-right-radius: 28px;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.2);
  display:flex; flex-direction:column; max-height: 80vh;
  animation: ss-auth-pop .25s cubic-bezier(.25,.46,.45,.94);
}
.ss-filter-sheet-handle {
  width:42px; height:5px; border-radius:3px;
  background: rgba(0,0,0,0.18);
  margin: 12px auto 4px;
}
.ss-filter-sheet-head {
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 22px 6px;
}
.ss-filter-sheet-head h2 { font-size: 22px; font-weight: 800; color: var(--ss-ink); letter-spacing:-0.4px; }
.ss-filter-sheet-close {
  width:36px; height:36px; border-radius:18px;
  background: var(--ss-search-bg); border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color: var(--ss-ink);
}
.ss-filter-sheet-body {
  flex:1; overflow-y:auto;
  padding: 12px 22px 22px;
  display: flex; flex-direction: column; gap: 18px;
}
.ss-filter-group-label {
  font-size: 13px; font-weight: 600; color: var(--ss-ink2);
  margin-bottom: 8px; letter-spacing:0.1px;
}
.ss-filter-sheet-foot {
  display:grid; grid-template-columns: 1fr 2fr; gap:10px;
  padding: 14px 22px 24px;
  border-top: 0.5px solid var(--ss-hair);
}
.ss-filter-sheet-clear {
  background: var(--ss-surface2); color: var(--ss-ink);
  border:none; border-radius: 14px; padding: 14px;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.ss-filter-sheet-apply {
  background: var(--ss-blue); color: #fff;
  border:none; border-radius: 14px; padding: 14px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 14px rgba(109,94,247,0.30);
}

/* ── Browse / Cerca: chip filtri renderizzati da browse.js ────── */
.browse-filter-pill {
  padding:11px 18px; border-radius:22px;
  background: var(--ss-surface);
  color: var(--ss-ink);
  border:0.5px solid var(--ss-hair);
  font-size:14.5px; font-weight:500;
  white-space:nowrap; flex-shrink:0;
  cursor:pointer;
  font: inherit;
  transition: background .15s, color .15s, border-color .15s;
}
.browse-filter-pill:hover { background: var(--ss-blue-soft); color: var(--ss-blue); border-color: transparent; }
.browse-filter-pill.is-active,
.browse-filter-pill[aria-pressed="true"] {
  background: var(--ss-pill-dark);
  color: var(--ss-bg);
  border-color: transparent;
  font-weight:600;
}
[data-theme="dark"] .browse-filter-pill.is-active,
[data-theme="dark"] .browse-filter-pill[aria-pressed="true"] { color:#0A0A0F; }

/* ── Browse search explorer overlay ──────────── */
.browse-search-categories-head {
  font-size:12.5px; letter-spacing:1.4px;
  color: var(--ss-mute); font-weight:600;
  padding:14px 4px 10px;
}
.browse-search-category-item {
  display:flex; align-items:center; gap:14px;
  padding:14px 12px;
  border-bottom:0.5px solid var(--ss-hair);
  text-decoration:none;
  color: var(--ss-ink);
  transition: background .12s;
}
.browse-search-category-item:last-child { border-bottom:none; }
.browse-search-category-item:hover { background: var(--ss-surface2); }
.browse-search-category-icon {
  width:42px; height:42px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background: var(--ss-blue-soft);
  color: var(--ss-blue);
  font-size:20px; line-height:1;
  flex-shrink:0;
}
.browse-search-category-icon.is-fashion { background: rgba(255, 59, 96, 0.12); color:#FF3B60; }
.browse-search-category-icon.is-technology { background: var(--ss-blue-soft); color: var(--ss-blue); }
.browse-search-category-icon.is-home { background: rgba(255, 149, 0, 0.12); color:#FF9500; }
.browse-search-category-icon.is-sports { background: rgba(52, 199, 89, 0.12); color:#34C759; }
.browse-search-category-icon.is-collectibles-kids,
.browse-search-category-icon.is-collectibles { background: rgba(175, 82, 222, 0.12); color:#AF52DE; }
.browse-search-category-icon.is-vehicles { background: rgba(0, 122, 255, 0.12); color:#007AFF; }
.browse-search-category-icon.is-auctions { background: rgba(255, 204, 0, 0.18); color:#B8860B; }
.browse-search-category-copy { flex:1; display:flex; flex-direction:column; gap:2px; min-width:0; }
.browse-search-category-copy strong { font-size:15.5px; font-weight:600; color: var(--ss-ink); }
.browse-search-category-copy small { font-size:13px; color: var(--ss-mute); font-weight:400; }
.browse-search-category-arrow {
  font-size:22px; color: var(--ss-mute2);
  line-height:1; flex-shrink:0;
}

/* Article (sometimes JS emits empty/error articles) */
.browse-row-card, .browse-row-empty {
  background: var(--ss-surface); border-radius:18px;
  border:0.5px solid var(--ss-hair);
  padding:24px; text-align:center;
  color: var(--ss-mute);
  grid-column: 1 / -1;
}

/* ── Privacy / cookie popup ──────────────────── */
#ns-privacy-popup {
  position:fixed; inset:0; z-index:9999;
  background: rgba(0,0,0,0.4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display:flex; align-items:flex-end; justify-content:center; padding:16px;
  animation: ns-fadein .25s ease; overflow-y:auto;
}
@keyframes ns-fadein { from{opacity:0} to{opacity:1} }
.ns-privacy-card {
  background: var(--ss-surface); border-radius:24px; padding:22px;
  max-width:430px; width:100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.09);
  display:flex; flex-direction:column; gap:10px; text-align:left;
  animation: ns-slideup .3s cubic-bezier(.25,.46,.45,.94);
  max-height:90vh; overflow-y:auto;
}
@keyframes ns-slideup { from{opacity:0;transform:translateY(40px)} to{opacity:1;transform:translateY(0)} }
.ns-privacy-icon { font-size:32px; text-align:center; margin-bottom:-4px; }
.ns-privacy-card h3 { font-size:18px; font-weight:800; letter-spacing:-0.3px; color: var(--ss-ink); margin:0; text-align:center; }
.ns-privacy-card > p { font-size:13px; color: var(--ss-ink2); line-height:1.5; margin:0; }
.ns-privacy-card a { color: var(--ss-blue); text-decoration:underline; font-weight:600; }
.ns-privacy-list { font-size:12.5px; color: var(--ss-ink2); line-height:1.5; margin:0; padding-left:18px; display:flex; flex-direction:column; gap:3px; }
.ns-privacy-list li { font-size:12.5px; }
.ns-privacy-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.ns-privacy-btn {
  flex:1 1 calc(33% - 6px); min-width:90px; padding:11px 12px; border-radius:100px;
  font-size:13px; font-weight:700; cursor:pointer; border:none;
  transition: transform .15s, opacity .15s;
  display:inline-flex; align-items:center; justify-content:center; gap:5px; white-space:nowrap;
}
.ns-privacy-btn:active { transform: scale(0.97); }
.ns-privacy-reject { background: var(--ss-surface2); color: var(--ss-ink); border:1.5px solid var(--ss-hair); }
.ns-privacy-settings { background: var(--ss-surface2); color: var(--ss-ink); border:1.5px solid var(--ss-hair); }
.ns-privacy-accept { background: var(--ss-blue); color:#fff; box-shadow: 0 6px 14px rgba(109,94,247,0.30); }
.ns-privacy-chev { display:inline-block; font-size:11px; line-height:1; transition: transform .2s; }
.ns-privacy-chev.is-open { transform: rotate(180deg); }
.ns-privacy-settings-panel {
  margin-top:8px; padding:14px; border-radius:14px;
  background: var(--ss-surface2); border:1px solid var(--ss-hair);
  display:flex; flex-direction:column; gap:10px;
}
.ns-privacy-settings-panel[hidden] { display:none; }
.ns-privacy-settings-label { font-size:12.5px; font-weight:700; color: var(--ss-ink); margin:0; }
.ns-privacy-checkboxes { display:flex; flex-direction:column; gap:6px; }
.ns-privacy-check { display:flex; align-items:center; gap:8px; font-size:13px; color: var(--ss-ink); cursor:pointer; font-weight:500; }
.ns-privacy-check input[type="checkbox"] {
  width:18px; height:18px; accent-color: var(--ss-blue); cursor:pointer; flex-shrink:0;
}
.ns-privacy-check input[type="checkbox"]:disabled { opacity:.5; cursor:not-allowed; }
.ns-privacy-save { margin-top:4px; background: var(--ss-blue) !important; color:#fff; flex:1 1 100%; box-shadow: 0 6px 14px rgba(109,94,247,0.30); }

/* ════════════════════════════════════════════════════
   DESKTOP MODE (≥ 900px)
   La UI è progettata mobile-first (max-width 430px sul body).
   Su tablet/desktop allarghiamo il contenitore principale,
   riduciamo le card a più colonne, allarghiamo l'appbar e
   le tab bar in basso.
   ════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  body {
    max-width: 1180px;
    padding: 0 24px;
  }
  /* Lista categorie nel search explorer: griglia multi-colonna su desktop */
  #browse-search-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
  }
  #browse-search-categories .browse-search-categories-head {
    grid-column: 1 / -1;
  }
  #browse-search-categories .browse-search-category-item {
    border-radius: 14px;
    border: 0.5px solid var(--ss-hair);
  }
  .ss-screen {
    padding: 8px 40px 64px;
  }
  /* Appbar: stretch over whole content, larger horizontal padding */
  .ss-appbar {
    padding: 18px 40px 14px;
    margin: 0 -40px 18px;
  }
  /* Hero / large titles a bit bigger */
  .ss-large-title { font-size: 44px; }
  .ss-hero-title { font-size: 40px; }

  /* Bottom tabs: pill flottante centrata, più ampia su desktop. */
  .ss-tabs {
    max-width: 880px;
    border-radius: 28px;
    border: 0.5px solid var(--ss-hair);
    left: 50%; right: auto;
    transform: translateX(-50%);
    bottom: 16px;
    padding: 8px 24px 10px;
    box-shadow: 0 18px 40px -16px rgba(15,23,42,0.22);
  }
  .ss-tabs-grid { padding: 0; gap: 24px; }
  .ss-tab { padding: 6px 14px; font-size: 12px; }
  .ss-tab svg { width: 26px; height: 26px; }

  /* Grids: più colonne su schermi larghi */
  #category-listings-grid,
  #category-overview-grid,
  #favorites-grid,
  .browse-results-list {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
  }
  .account-mobile-app .account-mobile-view { max-width: 720px; margin: 0 auto; }

  /* Profile menu rows: enlarge font slightly on desktop */
  .ss-row-title { font-size: 16px; }

  /* Search bar: a bit roomier */
  .ss-search { padding: 14px 18px; }

  /* Sticky CTA buttons (es. "Compra ora"): center and limit width */
  .ss-sticky-cta { max-width: 540px; left: 50%; transform: translateX(-50%); }

  /* Chat composer (messaggi): allinea al contenitore desktop */
  .ss-chat-composer { max-width: 720px; }

  /* Sell modal / dialog sheets: più larghe */
  #profile-edit-dialog > form,
  #listing-edit-modal > form,
  #pwd-change-dialog > div { max-width: 560px !important; }
}

@media (min-width: 1200px) {
  body { max-width: 1320px; }
  #category-listings-grid,
  #favorites-grid,
  .browse-results-list {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}
