:root {
  --ink: #141413;
  --paper: #F6F5F1;
  --accent: #FF5A36;
  --accent-text: #D6401E;
  --muted: #6B6A66;
  --line: rgba(20, 20, 19, 0.12);
  --radius: 16px;
  --font-title: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: #E9E7E1;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.app {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

.app-main {
  flex: 1;
  padding: 24px 20px calc(96px + env(safe-area-inset-bottom));
}

.theme-dark.app, body.theme-dark {
  background: var(--ink);
}

body.theme-dark { background: #0B0B0A; }
body.theme-dark .app { background: var(--ink); color: var(--paper); }

h1, h2, .page-title, .claim { font-family: var(--font-title); letter-spacing: -0.04em; }

a { color: var(--accent-text); }

.flash {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 15px;
  line-height: 1.4;
}
.flash-info { background: rgba(255, 90, 54, 0.12); border: 1px solid rgba(255, 90, 54, 0.3); }
.flash-success { background: rgba(30, 120, 60, 0.12); border: 1px solid rgba(30, 120, 60, 0.3); }
.flash-error { background: rgba(214, 64, 30, 0.12); border: 1px solid rgba(214, 64, 30, 0.35); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-block { width: 100%; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: inherit; }
.btn-google { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-apple { background: #000; border-color: #000; color: #fff; }
.brand-ico { flex: 0 0 auto; }
.access-social { display: flex; flex-direction: column; gap: 12px; }
.access-email > summary { list-style: none; margin-top: 4px; }
.access-email > summary::-webkit-details-marker { display: none; }
.access-email-form { margin-top: 12px; }
.access-terms { text-align: center; color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.access-methods { display: flex; flex-direction: column; gap: 10px; }
.access-methods .card-title { font-size: 16px; margin: 0 0 4px; }
.access-method { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; }
.inline-form { margin: 0; }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 14px; }

.feed-empty {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}
.brand-mark { max-width: 78%; height: auto; }
.brand-lockup { display: inline-flex; align-items: center; gap: 12px; }
.brand-word { font-family: var(--font-title); font-size: 34px; font-weight: 500; letter-spacing: -0.04em; }
.brand-bold { font-weight: 800; }
.claim { font-size: 28px; font-weight: 800; margin: 10px 0 0; }
.hint { color: var(--muted); margin: 0 0 10px; }
body.theme-dark .hint { color: #B8B6B0; }

.access { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; }
.access-title { font-size: 26px; margin: 12px 0 0; }
.access-sub { color: var(--muted); margin: 0 0 8px; line-height: 1.5; }
.brand-mark-dark { max-width: 180px; align-self: flex-start; }

.form { display: flex; flex-direction: column; gap: 10px; }
.form label { font-size: 14px; font-weight: 600; margin-top: 6px; }
.form input {
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--font-body);
  background: #fff;
  color: var(--ink);
}
.form input:focus-visible,
.btn:focus-visible,
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.divider { text-align: center; color: var(--muted); position: relative; margin: 6px 0; }
.divider span { background: var(--paper); padding: 0 12px; font-size: 14px; }
body.theme-dark .divider span { background: var(--ink); }
.g { font-weight: 700; }

.legal-links { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; }
.legal-draft { font-weight: 600; color: var(--accent-text); }

.page { display: flex; flex-direction: column; gap: 16px; }
.page-title { font-size: 28px; margin: 0; }
.page-placeholder { min-height: 60vh; justify-content: center; align-items: flex-start; }
.placeholder-line { color: var(--muted); font-size: 17px; line-height: 1.5; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card .label { color: var(--muted); font-size: 13px; margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.card .value { margin: 0; font-size: 17px; font-weight: 600; }

.section-title { font-family: var(--font-title); font-size: 20px; margin: 22px 0 4px; }
.health, .flags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.health li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.flags li { border-bottom: 1px solid var(--line); padding-bottom: 8px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.flag-name { font-weight: 600; }
.flag-value { font-weight: 700; }
.flag-value.on { color: #1E783C; }
.flag-value.off { color: var(--accent-text); }
.flag-src { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }

.users { display: flex; flex-direction: column; gap: 10px; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.user-main { display: flex; flex-direction: column; min-width: 0; }
.user-email { font-weight: 600; overflow-wrap: anywhere; }
.user-meta { font-size: 13px; color: var(--muted); }
.user-form { flex-shrink: 0; }

.code-404 { font-family: var(--font-title); font-size: 64px; font-weight: 800; margin: 0; }

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  background: rgba(246, 245, 241, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px;
  min-height: 48px;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
}
.tab.is-active { color: var(--ink); font-weight: 600; }
.tab-ico { font-size: 22px; line-height: 1; }
.tab-lbl { line-height: 1; }
.tab-sell { transform: translateY(-14px); }
.tab-sell .tab-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(255, 90, 54, 0.4);
}

/* ── Vendi: fotocamera guidata ─────────────────────────────────────── */
.vendi { display: flex; flex-direction: column; gap: 18px; min-height: 70vh; }
.vendi-top { position: relative; display: flex; justify-content: center; align-items: center; min-height: 44px; }
.vendi-exit { position: absolute; right: 0; top: 0; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
body:not(.theme-dark) .vendi-exit { background: rgba(20, 20, 19, 0.06); }
.vendi-step { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
body.theme-dark .vendi-step { color: #B8B6B0; }
.step { display: flex; flex-direction: column; gap: 20px; }
.step-body { display: flex; flex-direction: column; gap: 16px; }
.step-title { font-size: 30px; margin: 0; }
.step-lead { font-size: 17px; line-height: 1.5; margin: 0; }
body.theme-dark .step-lead, body.theme-dark .step-title { color: var(--paper); }
.tips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.tips li { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.tip-ico { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); font-size: 20px; flex-shrink: 0; }
body:not(.theme-dark) .tip-ico { background: rgba(20, 20, 19, 0.06); }
.step-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.step-actions-row { flex-direction: row; }
.step-actions-row .btn { flex: 1; }
.btn-tall { min-height: 52px; font-size: 17px; }
.dark-text { color: var(--ink); }

/* FF-03k — scelta all'ingresso quando c'è una bozza in corso. */
.step-entry { gap: 22px; }
.entry-box { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 12px 0; }
.entry-thumb { width: 160px; height: 160px; border-radius: 16px; overflow: hidden; background: rgba(255, 255, 255, 0.08); display: flex; align-items: center; justify-content: center; }
body:not(.theme-dark) .entry-thumb { background: #EFEDE7; }
.entry-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.entry-text { font-size: 19px; font-weight: 600; text-align: center; margin: 0; }
body.theme-dark .entry-text { color: var(--paper); }

/* FF-03k — le miniature di ogni passo stanno in una sola fila che scorre in
   orizzontale, mai a capo, come nel riepilogo. */
.shot-strip { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding: 2px; scrollbar-width: none; }
.shot-strip::-webkit-scrollbar { display: none; }
.shot-strip .photo-tile { flex: 0 0 auto; }
.photo-tile { position: relative; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, 0.08); display: flex; align-items: center; justify-content: center; min-height: 84px; }
.photo-tile.tile-tappable { cursor: pointer; }
.photo-tile.tile-tappable:active { transform: scale(0.96); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile.mini { width: 84px; height: 84px; }
.photo-tile.is-cover { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile-empty { font-size: 12px; color: #B8B6B0; }
.tile-state { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.55); color: #F6F5F1; font-size: 10px; text-align: center; padding: 2px 0; }
.tile-state.error { background: rgba(214, 64, 30, 0.88); }
.tile-retry { position: absolute; left: 8px; right: 8px; top: 50%; transform: translateY(-50%); border: 0; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 11px; font-weight: 700; padding: 5px 6px; cursor: pointer; }
.detail-counter { font-size: 15px; color: var(--muted); }
body.theme-dark .detail-counter { color: #B8B6B0; }

.cam { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; height: 100vh; height: 100dvh; visibility: visible; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam.no-video video { visibility: hidden; }
.cam-frame { position: absolute; inset: 6% 5% 18% 5%; pointer-events: none; }
.cam-frame .c { position: absolute; width: 46px; height: 46px; border: 5px solid #F6F5F1; }
.cam-frame .tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.cam-frame .tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.cam-frame .bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.cam-frame .br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.cam-hint { position: absolute; top: calc(4% + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; color: #F6F5F1; font-size: 16px; line-height: 1.4; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); margin: 0; padding: 0 72px; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; padding: 0 12px; }
.cam-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px; -webkit-overflow-scrolling: touch; }
.cam-strip:empty { display: none; }
.cam-strip .photo-tile { width: 58px; height: 58px; flex: 0 0 auto; }
.cam-counter { text-align: center; color: #F6F5F1; font-size: 14px; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.cam-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cam-shutter { width: 76px; height: 76px; border-radius: 50%; background: #F6F5F1; border: 6px solid rgba(0, 0, 0, 0.35); cursor: pointer; flex-shrink: 0; }
.cam-shutter:active { transform: scale(0.94); }
.cam-shutter:disabled { opacity: 0.4; }
.cam-gallery, .cam-close, .cam-fallback-btn { color: #F6F5F1; font-size: 15px; background: rgba(255, 255, 255, 0.14); border: 0; border-radius: 999px; padding: 12px 16px; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; text-align: center; }
.cam-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; z-index: 2; font-size: 20px; padding: 10px 16px; }
.cam-gallery input, .cam-fallback-btn input { display: none; }
.cam-fallback-btn { background: var(--accent); color: var(--ink); font-weight: 600; max-width: 62%; line-height: 1.2; }
.cam-done { color: var(--ink); background: var(--accent); border: 0; border-radius: 999px; padding: 12px 18px; min-height: 44px; font-size: 15px; font-weight: 700; cursor: pointer; }
.cam-limit { position: absolute; top: calc(4% + 48px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); margin: 0; width: max-content; max-width: 88%; background: var(--accent); color: var(--ink); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; text-align: center; }
/* Pannello di diagnosi (solo admin, /vendi?diag=1): in basso sopra tutto. */
.cam-diag { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 300; background: rgba(11, 11, 10, 0.82); color: #F6F5F1; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 12px; padding: 8px 10px; font-size: 12px; }
.cam-diag-title { margin: 0 0 4px; font-weight: 700; }
.cam-diag-log { margin: 0; max-height: 32vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.35; }

.review { position: fixed; inset: 0; z-index: 110; background: rgba(11, 11, 10, 0.96); color: #F6F5F1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; }
.review img { max-width: 100%; max-height: 55vh; border-radius: 14px; }
.review-warns { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 420px; }
.review-warn { background: rgba(255, 90, 54, 0.16); border: 1px solid rgba(255, 90, 54, 0.45); color: #F6F5F1; border-radius: 12px; padding: 12px 14px; margin: 0; font-size: 15px; }
.review-actions { display: flex; gap: 10px; width: 100%; max-width: 420px; }
.review-actions .btn { flex: 1; }
.upload-bar { width: 100%; max-width: 420px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.upload-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; background: #141413; color: #F6F5F1; padding: 12px 18px; border-radius: 999px; font-size: 15px; max-width: 90%; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }

.cover-badge { position: absolute; top: 8px; left: 8px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.btn.danger { color: var(--accent-text); }
.label-note { font-size: 14px; color: var(--muted); }

/* ── Riepilogo: una sola fila che scorre in orizzontale (FF-03j) ────── */
.summary-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.summary-counter { font-size: 15px; font-weight: 600; color: var(--muted); }
.summary-scroller { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 4px 2px 8px; scrollbar-width: none; }
.summary-scroller::-webkit-scrollbar { display: none; }
.summary-card { flex: 0 0 70%; width: 70%; scroll-snap-align: center; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; position: relative; }
.summary-card.is-cover { outline: 3px solid var(--accent); outline-offset: -3px; }
.summary-card.dragging { opacity: 0.6; pointer-events: none; }
.summary-media { position: relative; width: 100%; aspect-ratio: 3 / 4; background: #EFEDE7; display: flex; align-items: center; justify-content: center; }
.summary-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.summary-media .tile-state { font-size: 12px; padding: 4px 0; }
.summary-media .tile-retry { font-size: 13px; padding: 8px 10px; }
.label-badge { top: auto; bottom: 8px; left: 8px; right: 8px; text-align: center; font-size: 11px; text-transform: none; }
.summary-dots { display: flex; gap: 6px; justify-content: center; }
.summary-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.summary-dot.is-active { background: var(--accent); }
.summary-actions { margin-top: 4px; }

/* ── Menu di una foto (foglio dal basso) ────────────────────────────── */
.sheet { position: fixed; inset: 0; z-index: 120; }
.sheet-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(11, 11, 10, 0.55); padding: 0; cursor: pointer; }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 18px 18px 0 0; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.sheet-item { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 16px; font-weight: 600; cursor: pointer; }
.sheet-item.danger { color: var(--accent-text); border-color: rgba(255, 90, 54, 0.45); }
.sheet-item.sheet-cancel { border: 0; background: transparent; color: var(--muted); font-weight: 500; }
.sheet-item[hidden] { display: none; }
.sheet-item:disabled { opacity: 0.4; }

/* ── I miei ─────────────────────────────────────────────────────────── */
.page-mine { gap: 12px; }
.listing-list { display: flex; flex-direction: column; gap: 12px; }
.listing-row { display: flex; align-items: stretch; gap: 8px; }
.listing-row .listing-card { flex: 1; min-width: 0; }
.listing-delete { flex: 0 0 auto; align-self: center; min-height: 44px; padding: 0 14px; }
.listing-card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; text-decoration: none; color: inherit; background: #fff; }
.listing-thumb { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: #EFEDE7; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-thumb-empty { font-size: 28px; color: var(--muted); }
.listing-info { display: flex; flex-direction: column; gap: 4px; }
.listing-status { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.listing-status-draft { color: var(--accent-text); }
.listing-status-analyzing, .listing-status-ready { color: #1E783C; }
.listing-meta { font-size: 13px; color: var(--muted); }

.page-boizza { gap: 14px; }
.back-link { margin: 0; font-size: 15px; }
.bozza-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.bozza-photo { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: #EFEDE7; display: flex; align-items: center; justify-content: center; }
.bozza-photo img { width: 100%; height: 100%; object-fit: cover; }
.bozza-photo.is-cover { outline: 3px solid var(--accent); outline-offset: -3px; }
.bozza-photo figcaption { position: absolute; bottom: 8px; left: 8px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.ai-box { border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px; color: var(--muted); background: rgba(255, 90, 54, 0.05); }
.ai-box p { margin: 0; }

/* FF-03i — con la fotocamera aperta il resto non si nasconde: la fotocamera
   è un livello figlio di <body>, opaco e sopra tutto. Il resto si rende
   inerte via attributo inert/aria-hidden da vendi.js. */
body.cam-open { overflow: hidden; }

/* FF-03j — dentro /vendi la barra del sito non c'è: il percorso è a tutto
   schermo e si esce dalla X in alto. Fuori dal percorso la barra resta. */
body.vendi-page .tabbar { display: none; }
body.vendi-page .app-main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* ── Lista d'attesa (FF-03c) ────────────────────────────────────────── */
.waitlist-page .app-main { padding-bottom: 40px; }
.public-footer { padding: 18px 20px calc(24px + env(safe-area-inset-bottom)); text-align: center; font-size: 14px; color: var(--muted); display: flex; gap: 10px; justify-content: center; }
body.theme-dark .public-footer { color: #B8B6B0; }
body.theme-dark .public-footer a { color: #F6F5F1; }

.waitlist-home, .waitlist-confirm { display: flex; flex-direction: column; gap: 18px; padding-top: 12px; text-align: center; }
.waitlist-home .brand-lockup, .waitlist-confirm .brand-lockup { justify-content: center; }
.waitlist-steps { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.waitlist-steps li { display: flex; gap: 14px; align-items: flex-start; }
.waitlist-steps .tip-ico { background: var(--accent); color: var(--ink); font-weight: 800; }
.waitlist-steps strong { display: block; font-size: 16px; }
.waitlist-steps span { color: var(--muted); font-size: 14px; line-height: 1.4; }
body.theme-dark .waitlist-steps span { color: #B8B6B0; }
.waitlist-home .form { text-align: left; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { min-height: 20px; margin: 4px 0 0; font-size: 15px; }
.form-msg-ok { color: #1E783C; }
.form-msg-error { color: var(--accent-text); }
.login-hint { font-size: 15px; color: var(--muted); }
body.theme-dark .login-hint { color: #B8B6B0; }
.position-badge { font-family: var(--font-title); font-size: 30px; color: var(--accent); display: inline-block; }
.invite-box { border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.invite-link { font-size: 14px; word-break: break-all; color: var(--muted); margin: 0; }
body.theme-dark .invite-link { color: #B8B6B0; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.invite-actions .btn { flex: 1 1 auto; }

.page-list { gap: 10px; }
.legal-page { display: flex; flex-direction: column; gap: 10px; max-width: 700px; }
.legal-page h2 { font-family: var(--font-title); font-size: 20px; margin: 20px 0 0; }
.legal-page p, .legal-page li { line-height: 1.6; }
.legal-page .updated { color: var(--muted); font-size: 14px; }

/* ── Admin lista (FF-03c) ───────────────────────────────────────────── */
.admin-counts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; list-style: none; margin: 0; padding: 0; }
.admin-counts li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.admin-counts .n { font-family: var(--font-title); font-size: 24px; font-weight: 800; }
.admin-counts .l { font-size: 13px; color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin-toolbar input[type="search"] { flex: 1 1 200px; }
.pager { display: flex; gap: 10px; align-items: center; font-size: 14px; }

/* ── AI della bozza (FF-04) ─────────────────────────────────────────── */
.bozza-status { font-size: 13px; color: var(--muted); margin: 0; }
.ai-screen { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.ai-lead { font-family: var(--font-title); font-size: 19px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 8px; }
.ai-sub { font-size: 14px; color: var(--muted); margin: 0; }
.ai-spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; display: inline-block; animation: ai-spin 0.8s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-instruction { font-size: 17px; line-height: 1.5; margin: 0; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ai-actions .btn { flex: 1 1 auto; }
.ai-q { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.ai-q legend { font-weight: 700; font-size: 15px; padding: 0 4px; }
.ai-q label { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.ai-q input { width: 20px; height: 20px; }
.ai-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.ai-input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: #fff; }
.ai-price-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ai-price-row .btn { flex: 1 1 auto; }
.btn.is-picked { outline: 3px solid var(--accent); outline-offset: -3px; }
.ai-price-custom { display: flex; align-items: center; gap: 10px; }
.ai-price-custom input { width: 140px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; }
.ai-newest { font-size: 13px; color: var(--muted); }
.ai-fallback { font-size: 14px; color: var(--muted); margin: 0; }

/* ── Admin confronto AI (FF-04) ─────────────────────────────────────── */
.admin-wide .app { max-width: 1200px; }
.confronto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.confronto-col { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.confronto-col h3 { margin: 0; font-size: 16px; font-family: var(--font-title); }
.confronto-col .muted { color: var(--muted); font-size: 13px; }
.confronto-col pre { white-space: pre-wrap; word-break: break-word; font-size: 13px; margin: 0; font-family: var(--font-body); }
.confronto-metrics { width: 100%; border-collapse: collapse; font-size: 14px; }
.confronto-metrics th, .confronto-metrics td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.vote-form { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.bozza-thumb { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; }
.bozza-list { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; }
.bozza-list li { border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; gap: 10px; align-items: center; }

.admin-wide .tabbar { display: none; }
.admin-wide .app-main { padding-bottom: 40px; }

/* ── FF-04b: esempi, controllo a ogni scatto, conferma ──────────────── */
.esempi { display: flex; gap: 12px; margin: 4px 0 8px; }
.esempio { flex: 1; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.esempio svg { width: 100%; height: auto; display: block; border-radius: 12px; }
.esempio figcaption { font-size: 14px; font-weight: 700; }
.esempio-nota { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
body.theme-dark .esempio-nota { color: #B8B6B0; }

/* Indicatore del controllo sulla miniatura */
.tile-check { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.5); }
.tile-check.checking { background: rgba(0, 0, 0, 0.45); }
.tile-check.ok { background: #2E9E5B; }
.tile-check.warn { background: #E08A00; }

/* Etichetta «Sembra: …» in alto nella fotocamera */
.cam-sembra { position: absolute; top: calc(4% + 46px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); background: rgba(11, 11, 10, 0.7); color: #F6F5F1; border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; max-width: 88%; text-align: center; }
@media (min-width: 480px) { .cam-sembra { top: calc(4% + 52px + env(safe-area-inset-top)); } }

/* Scheda dell'avviso forte, sopra la fotocamera */
.cam-check { position: absolute; left: 12px; right: 12px; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 3; background: #FBF7EF; color: var(--ink); border-radius: 16px; padding: 12px; display: flex; gap: 12px; align-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.cam-check img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; }
.cam-check-text { margin: 0; font-size: 15px; line-height: 1.35; flex: 1; }
.cam-check-actions { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.cam-check-actions .btn { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.cam-check-actions .btn-small { opacity: 0.85; }

/* Blocco: nessuna foto adatta */
.block { position: fixed; inset: 0; z-index: 320; background: rgba(11, 11, 10, 0.9); display: flex; align-items: center; justify-content: center; padding: 24px; }
.block-panel { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 22px; max-width: 420px; width: 100%; display: flex; flex-direction: column; gap: 16px; }
.block-text { font-size: 17px; line-height: 1.45; margin: 0; }

.cover-hint { font-size: 14px; color: #B26B00; margin: 6px 0 0; }

/* Conferma e correzione del riconoscimento */
.ai-correct { display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--line); padding-top: 12px; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.ai-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.ai-chip:active { transform: scale(0.97); }
.ai-confirm-cover { width: 100%; max-height: 260px; object-fit: contain; border-radius: 14px; background: #EFEDE8; }

/* ── FF-05: pubblicazione, zona e consegna nella bozza ─────────────────── */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.publish-box { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.zone-line { font-size: 16px; font-weight: 600; margin: 0; }
.zone-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.zone-search { position: relative; }
.zone-results { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.zone-results li { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 15px; background: #fff; }
.zone-results li:last-child { border-bottom: 0; }
.zone-results li:active { background: #EFEDE8; }
.ai-q { border: 0; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ai-q legend { font-family: var(--font-title); font-weight: 700; font-size: 16px; padding: 0; }
.ai-q label { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.ship-box { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ship-row { display: flex; align-items: center; gap: 8px; }
.ship-row input[type="number"] { flex: 1; }
.ship-help { font-size: 13px; color: var(--muted); margin: 0; }
.publish-note { font-size: 14px; color: #B26B00; margin: 0; }

/* ── FF-05: pagina pubblica /a/… ───────────────────────────────────────── */
body.ad-page .app-main { padding: 0 0 calc(40px + env(safe-area-inset-bottom)); }
.ad { max-width: 640px; margin: 0 auto; }
.ad-back { margin: 0; padding: 12px 20px; }
.ad-back a { color: var(--paper); text-decoration: none; font-family: var(--font-title); font-weight: 800; font-size: 20px; }
.ad-sold-banner { background: var(--accent); color: #fff; text-align: center; font-family: var(--font-title); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px; }
.ad-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ad-gallery::-webkit-scrollbar { display: none; }
.ad-photo { flex: 0 0 100%; margin: 0; scroll-snap-align: center; background: #0B0B0A; }
.ad-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; display: block; }
.ad-photo-empty { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; font-size: 64px; color: var(--muted); }
.ad-counter { position: sticky; top: 8px; float: right; margin: -36px 16px 0 0; background: rgba(11, 11, 10, 0.66); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.ad-body { padding: 16px 20px 0; display: flex; flex-direction: column; gap: 6px; }
.ad-price { font-family: var(--font-title); font-size: 34px; font-weight: 800; margin: 0; }
.ad-delivery { color: var(--accent); font-weight: 600; margin: 0; }
.ad-title { font-family: var(--font-title); font-size: 22px; margin: 8px 0 0; }
.ad-zone, .ad-condition { color: var(--muted); margin: 0; }
.ad-description { margin: 12px 0; line-height: 1.5; white-space: normal; }
.ad-seller { margin: 0; font-weight: 600; }
.ad-date { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.ad-actions { display: flex; flex-direction: column; gap: 10px; padding: 8px 20px 20px; }
.ad-owner-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 24px; }

/* ── FF-05: «Pubblicato!» e «Pubblicalo anche su…» ─────────────────────── */
.pub-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pub-hero img { width: 100%; max-width: 320px; border-radius: var(--radius); }
.pub-url { display: flex; gap: 8px; align-items: center; width: 100%; flex-wrap: wrap; }
.pub-url input { flex: 1; min-width: 180px; }
.market-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.market-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.market-card textarea { width: 100%; font: inherit; font-size: 14px; }
.market-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── FF-05: «I miei» a schede ──────────────────────────────────────────── */
.tabs { display: flex; gap: 6px; margin: 10px 0 16px; }
.tabs a { flex: 1; text-align: center; padding: 10px; border-radius: 12px; background: #EFEDE8; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.tabs a.is-active { background: var(--ink); color: var(--paper); }
.listing-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.listing-views { color: var(--muted); font-size: 13px; }
.removed { opacity: 0.55; }
.listing-row-wrap { border-bottom: 1px solid var(--line); padding: 10px 0; }
.add-photo-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ── FF-06: chat, contatti protetti, accordi ───────────────────────────── */
.tab { position: relative; }
.tab-badge { position: absolute; top: 0; right: 18%; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; line-height: 16px; text-align: center; font-weight: 700; }
.ad-reserved-banner { background: #3B6EA5; }

.chat-list { display: flex; flex-direction: column; }
.chat-row { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.chat-row.has-unread .chat-title { font-weight: 700; }
.chat-thumb { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 12px; overflow: hidden; background: #DDD9D0; display: flex; align-items: center; justify-content: center; }
.chat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.chat-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-other, .chat-meta { color: var(--muted); font-size: 13px; }
.chat-last { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.chat-time { color: var(--muted); font-size: 12px; }
.chat-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

.page-chat { display: flex; flex-direction: column; height: calc(100dvh - 64px); max-width: 640px; margin: 0 auto; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 4px 0 8px; }
.chat-back { text-decoration: none; font-size: 28px; line-height: 1; color: var(--ink); }
.chat-who { font-family: var(--font-title); font-weight: 800; font-size: 20px; }
.chat-listing { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.chat-banner { margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: #E7EEF7; font-size: 14px; }
.chat-banner-blocked { background: #F7E7E7; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.chat-msg { display: flex; }
.chat-msg-mine { justify-content: flex-end; }
.chat-bubble { max-width: 80%; margin: 0; padding: 10px 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); white-space: normal; word-break: break-word; }
.chat-msg-mine .chat-bubble { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chat-system { text-align: center; color: var(--muted); font-size: 13px; margin: 4px 0; }
.chat-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.chat-card-title { font-weight: 700; margin: 0; }
.chat-card-guard { background: #FFF3EE; }
.chat-card-contacts { background: #EFF7EF; }
.chat-contact { margin: 0; }
.chat-offer-line { margin: 0; }
.chat-scam { background: #FFE9E3; border: 1px solid #F3B7A6; border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-actions-row { margin: 8px 0; }
.chat-wait { color: var(--muted); margin: 0; font-size: 14px; }
.chat-compose { padding: 8px 0 16px; display: flex; flex-direction: column; gap: 8px; position: sticky; bottom: 0; background: linear-gradient(to top, var(--paper) 70%, transparent); }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; font: inherit; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); resize: none; }
.chat-hint { color: var(--muted); font-size: 12px; margin: 0; }
.chat-overlay { position: fixed; inset: 0; background: rgba(11,11,10,0.5); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.chat-panel { background: var(--paper); width: 100%; max-width: 480px; border-radius: var(--radius) var(--radius) 0 0; padding: 20px; display: flex; flex-direction: column; gap: 12px; max-height: 90dvh; overflow-y: auto; }
.chat-panel h2 { margin: 0; font-family: var(--font-title); }
.chat-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.chat-panel input, .chat-panel select, .chat-panel textarea { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); }
.chat-share { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.chat-check { flex-direction: row !important; align-items: center; gap: 8px !important; }
.chat-price s { color: var(--muted); }
.chat-price { font-weight: 700; }

.chat-menu { position: fixed; top: 8px; right: 12px; z-index: 40; }
.chat-menu-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.admin-chat-log { display: flex; flex-direction: column; gap: 10px; }
.admin-chat-msg { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.admin-chat-msg p { margin: 4px 0 0; white-space: normal; }

/* ── FF-07: feed «Per te» a tutto schermo ──────────────────────────────── */
:root { --perte-tabbar: calc(96px + env(safe-area-inset-bottom)); }
.perte-page .app-main { padding: 0; height: calc(100dvh - var(--perte-tabbar)); min-height: 0; flex: 0 0 auto; overflow: hidden; }
.perte { position: relative; height: 100%; display: flex; flex-direction: column; background: #000; }

.perte-top {
  position: absolute; top: calc(6px + env(safe-area-inset-top)); left: 0; right: 0;
  z-index: 6; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 0 14px;
}
.perte-tabs { display: flex; gap: 16px; }
.perte-tab { color: rgba(255, 255, 255, 0.62); text-decoration: none; font-family: var(--font-title); font-weight: 800; font-size: 18px; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.perte-tab.is-active { color: #fff; }
.perte-filtri {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px;
  border: 0; border-radius: 999px; background: rgba(0, 0, 0, 0.42); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; backdrop-filter: blur(6px);
}

.feed { flex: 1; overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.feed-slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; }

.feed-gallery { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.feed-gallery::-webkit-scrollbar { display: none; }
.feed-photo { flex: 0 0 100%; width: 100%; height: 100%; margin: 0; scroll-snap-align: center; }
.feed-photo img { width: 100%; height: 100%; object-fit: cover; display: block; background: #0B0B0A; }
.feed-gallery-empty { align-items: center; justify-content: center; font-size: 64px; color: var(--muted); }

.feed-counter {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  z-index: 5; background: rgba(11, 11, 10, 0.6); color: #fff; border-radius: 999px;
  padding: 3px 12px; font-size: 13px;
}
.feed-scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0)); pointer-events: none; }

.feed-bottom { position: absolute; left: 0; right: 84px; bottom: 0; z-index: 4; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 3px; color: #fff; }
.feed-badge { align-self: flex-start; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 4px; }
.feed-badge-reserved { background: #3B6EA5; color: #fff; }
.feed-open { display: flex; flex-direction: column; gap: 3px; background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer; }
.feed-price { font-family: var(--font-title); font-size: 30px; font-weight: 800; line-height: 1.05; }
.feed-title { font-size: 17px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-zone { margin: 0; font-size: 14px; color: #E8E6E0; }
.feed-delivery { margin: 0; font-size: 14px; color: #C9C6BE; }

.feed-rail { position: absolute; right: 8px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 5; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.rail-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; color: #fff; text-decoration: none; cursor: pointer; font-family: var(--font-body); }
.rail-ico { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(0, 0, 0, 0.42); font-size: 22px; }
.rail-btn.is-saved .rail-ico { background: var(--accent); color: var(--ink); }
.rail-lbl { font-size: 11px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.rail-btn:disabled { opacity: 0.5; }
.feed-heart { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 96px; color: var(--accent); pointer-events: none; animation: feed-heart 0.7s ease-out; text-shadow: 0 4px 18px rgba(0,0,0,0.4); }
@keyframes feed-heart { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); } }
.reduce-motion .feed-heart { animation: none; opacity: 0; }

.feed-empty-state, .feed-end {
  min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 14px; padding: 24px; color: #fff; background: var(--ink);
}
.feed-end { min-height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.feed-empty-title { font-family: var(--font-title); font-size: 22px; font-weight: 800; margin: 0; }
.feed-empty-line { color: #B8B6B0; margin: 0; }
.feed-empty-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 300px; }
.feed-empty-actions .btn { width: 100%; }

/* Pannello filtri */
.feed-sheet { position: fixed; inset: 0; z-index: 120; }
.feed-sheet .sheet-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(11, 11, 10, 0.55); padding: 0; cursor: pointer; }
.feed-sheet .sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff; color: var(--ink); border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; max-height: 88dvh; overflow-y: auto; }
.sheet-title { margin: 0; font-family: var(--font-title); font-size: 20px; }
.filter-group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.filter-group legend { font-weight: 700; font-size: 15px; padding: 0; }
.filter-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-radio { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 14px; }
.filter-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-check { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 14px; }
.filter-check input, .filter-radio input { width: 18px; height: 18px; }
.filter-price { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.filter-price input { width: 130px; min-height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font: inherit; }
.filter-actions { display: flex; flex-direction: column; gap: 8px; }

/* Scheda «Salvati» */
.saved-panel { flex: 1; overflow-y: auto; background: var(--paper); padding: 62px 12px 12px; }
.saved-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.saved-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.saved-thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #E4E1DA; display: flex; align-items: center; justify-content: center; }
.saved-thumb img { width: 100%; height: 100%; object-fit: cover; }
.saved-thumb-empty { font-size: 40px; color: var(--muted); }
.saved-state { position: absolute; left: 6px; bottom: 6px; background: rgba(11, 11, 10, 0.72); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.saved-card.is-dormant { opacity: 0.55; }
.saved-price { font-weight: 700; }
.saved-title { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── FF-06b: categorie, attributi e oggetti vietati ─────────────────────── */
.ffcat-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.ffcat-value { font-weight: 600; }
.ffcat-attrs { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ffcat-attr { display: flex; flex-direction: column; gap: 4px; }
.ffcat-overlay { position: fixed; inset: 0; z-index: 130; background: rgba(11, 11, 10, 0.55); display: flex; align-items: flex-end; justify-content: center; }
.ffcat-panel { width: 100%; max-width: 480px; background: var(--paper); color: var(--ink); border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; max-height: 88dvh; overflow-y: auto; }
.ffcat-title { margin: 0; font-family: var(--font-title); font-size: 20px; }
.ffcat-list { display: flex; flex-direction: column; gap: 12px; }
.ffcat-group-title { margin: 0 0 4px; font-weight: 700; font-size: 15px; }
.ffcat-item { width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 10px 12px; font-size: 15px; cursor: pointer; margin-bottom: 6px; }
.ffcat-item.is-active { outline: 3px solid var(--accent); outline-offset: -3px; }

.filter-cats { display: flex; flex-direction: column; gap: 10px; }
.filter-cat { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.filter-cat-main { font-weight: 700; }
.filter-subcats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.filter-subcats .filter-check { font-size: 13px; padding: 5px 10px; }
.market-category { margin: 0; font-size: 14px; color: var(--accent-text); }
