/* =========================================================
   RIFIUTI TROMELLO 2026 — STYLES
   Mobile-first, accessibile, alto contrasto.
   ========================================================= */

/* ---------- RESET essenziale ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Base */
  --bg:            #f1f5f9;
  --surface:       #ffffff;
  --surface-2:     #f8fafc;
  --ink:           #0f172a;
  --ink-soft:      #334155;
  --ink-muted:     #64748b;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;

  /* Brand */
  --brand:         #0f3b8a;
  --brand-dark:    #0c2d6d;
  --brand-soft:    #dbeafe;

  /* Feedback */
  --warn:          #b45309;
  --warn-bg:       #fef3c7;
  --danger:        #dc2626;
  --success:       #15803d;

  /* Tipi di rifiuto — colori pieni per chiarezza */
  --organico:       #8b4513;
  --organico-soft:  #f4e4d4;
  --carta:          #1e3a8a;
  --carta-soft:     #dbeafe;
  --plastica:       #ca8a04;
  --plastica-soft:  #fef3c7;
  --vetro:          #15803d;
  --vetro-soft:     #dcfce7;
  --secco:          #7c3aed;
  --secco-soft:     #f3e8ff;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.08);
  --shadow-md: 0 4px 6px rgba(15,23,42,.05), 0 10px 15px rgba(15,23,42,.08);

  /* Tipografia mobile-first */
  --fs-base: 17px;
  --fs-sm:   15px;
  --fs-xs:   13px;
  --fs-lg:   20px;
  --fs-xl:   26px;
  --fs-2xl:  34px;
  --fs-3xl:  44px;

  /* Layout */
  --radius:    14px;
  --radius-lg: 20px;
  --tab-h:     68px;
}

/* ---------- BODY ---------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  /* Spazio per header + tab bar fissi */
  padding-top: env(safe-area-inset-top);
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- HEADER ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
  padding-top: env(safe-area-inset-top);
}
.app-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  max-width: 640px;
  margin: 0 auto;
}
.app-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-title__logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  padding: 4px;
}
.app-title__text { display: flex; flex-direction: column; min-width: 0; }
.app-title__top {
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.2px;
}
.app-title__sub {
  font-size: var(--fs-xs);
  opacity: .85;
  font-weight: 500;
}

.btn-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.14);
  border: none;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}
.btn-icon:hover,
.btn-icon:active { background: rgba(255,255,255,.25); }

/* ---------- MAIN + SCREENS ---------- */
.app-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}
.screen { display: none; }
.screen--active { display: block; animation: fadeIn .18s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.screen-title {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -.4px;
  margin: 8px 0 4px;
}
.screen-intro {
  color: var(--ink-muted);
  margin: 0 0 20px;
  font-size: var(--fs-sm);
}
.section-title {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink-muted);
  font-weight: 700;
  margin: 0 0 12px;
}

/* ==========================================================
   SCHERMATA OGGI
   ========================================================== */

.today-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  border-top: 6px solid var(--brand);
}
.today-card--empty {
  text-align: center;
  color: var(--ink-muted);
  border-top-color: var(--border-strong);
}

.today-card__eyebrow {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--brand);
  font-weight: 800;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.today-card__eyebrow svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Variante "chill" — stasera nessuna esposizione.
   Messaggio rassicurante grande in alto, info prossima esposizione sotto. */
.today-card--chill {
  border-top-color: #818cf8;
  background: linear-gradient(180deg, #eef2ff 0%, var(--surface) 60%);
}
.today-card__chill-main {
  text-align: center;
  padding: 10px 0 22px;
}
.today-card__chill-moon {
  width: 84px; height: 84px;
  margin: 0 auto 14px;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(67, 56, 202, .18));
}
.today-card__chill-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -.6px;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 6px;
}
.today-card__chill-sub {
  font-size: var(--fs-base);
  color: var(--ink-muted);
  font-weight: 500;
}

.today-card__next {
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.today-card__next-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--ink-muted);
  font-weight: 700;
  margin-bottom: 10px;
}
.today-card__next-row {
  display: flex; align-items: center; gap: 12px;
}
.today-card__next-icons { display: flex; gap: 4px; flex-shrink: 0; }
.today-card__next-ic {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: grid; place-items: center;
}
.today-card__next-ic img { width: 26px; height: 26px; }
.today-card__next-ic--organico { background: var(--organico-soft); }
.today-card__next-ic--carta    { background: var(--carta-soft); }
.today-card__next-ic--plastica { background: var(--plastica-soft); }
.today-card__next-ic--vetro    { background: var(--vetro-soft); }
.today-card__next-ic--secco    { background: var(--secco-soft); }

.today-card__next-info { min-width: 0; }
.today-card__next-day {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -.2px;
  line-height: 1.15;
}
.today-card__next-types {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  font-weight: 600;
  margin-top: 2px;
}
.today-card__next-meta {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.today-card__question {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -.5px;
  margin-bottom: 18px;
}

.today-card__trash {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.today-card__icons { display: flex; gap: 10px; flex-shrink: 0; }
.trash-icon {
  width: 72px; height: 72px;
  border-radius: 16px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.trash-icon img { width: 56px; height: 56px; }
.trash-icon--organico { background: var(--organico-soft); }
.trash-icon--carta    { background: var(--carta-soft); }
.trash-icon--plastica { background: var(--plastica-soft); }
.trash-icon--vetro    { background: var(--vetro-soft); }
.trash-icon--secco    { background: var(--secco-soft); }

.today-card__label {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -.8px;
  line-height: 1.05;
  color: var(--ink);
  word-break: break-word;
}
.today-card__label-extra {
  display: block;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: var(--fs-lg);
  margin-top: 6px;
}

.today-card__when {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--ink-soft);
  padding: 12px 14px;
  background: var(--brand-soft);
  border-radius: 12px;
  margin-bottom: 12px;
}
.today-card__when svg { flex-shrink: 0; color: var(--brand); }
.today-card__when strong { color: var(--brand-dark); font-weight: 800; }

.today-card__date {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  text-align: center;
  margin-top: 4px;
}

.today-card__alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: var(--warn-bg);
  border-left: 4px solid var(--warn);
  border-radius: 8px;
  font-size: var(--fs-sm);
  color: #78350f;
  margin-top: 14px;
  font-weight: 500;
}
.today-card__alert svg { flex-shrink: 0; color: var(--warn); margin-top: 2px; }

/* Alert meteo (dentro la today-card) */
.today-card__meteo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.meteo-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 4px solid;
  font-size: var(--fs-sm);
  line-height: 1.35;
}
.meteo-alert__icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: grid; place-items: center;
}
.meteo-alert__icon svg { width: 26px; height: 26px; }
.meteo-alert__text { flex: 1; min-width: 0; }
.meteo-alert__title {
  font-weight: 700;
  margin-bottom: 6px;
}
.meteo-alert__risk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.2;
}
.meteo-alert__risk svg { width: 14px; height: 14px; flex-shrink: 0; }
.meteo-alert__risk strong { font-weight: 700; }
.meteo-alert__body {
  color: var(--ink-muted);
  font-weight: 500;
}

.meteo-alert--danger {
  background: #fef2f2;
  border-left-color: var(--danger);
  color: #7f1d1d;
}
.meteo-alert--danger .meteo-alert__icon { color: var(--danger); }
.meteo-alert--danger .meteo-alert__body { color: #991b1b; }
.meteo-alert--danger .meteo-alert__risk {
  background: var(--danger); color: #fff;
}

.meteo-alert--warn {
  background: var(--warn-bg);
  border-left-color: var(--warn);
  color: #78350f;
}
.meteo-alert--warn .meteo-alert__icon { color: var(--warn); }
.meteo-alert--warn .meteo-alert__body { color: #92400e; }
.meteo-alert--warn .meteo-alert__risk {
  background: var(--warn); color: #fff;
}

.meteo-alert--info {
  background: var(--brand-soft);
  border-left-color: #3b82f6;
  color: #1e3a8a;
}
.meteo-alert--info .meteo-alert__icon { color: #2563eb; }
.meteo-alert--info .meteo-alert__body { color: #1e40af; }
.meteo-alert--info .meteo-alert__risk {
  background: #2563eb; color: #fff;
}

/* Prossime raccolte */
.next-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.next-list { list-style: none; margin: 0; padding: 0; }
.next-list__item {
  display: grid;
  grid-template-columns: 56px 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-top: 1px solid var(--border);
}
.next-list__item:first-child { border-top: none; }
.next-list__date {
  text-align: center;
  line-height: 1;
}
.next-list__date-num {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--ink);
}
.next-list__date-mo {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}
.next-list__icons {
  display: flex; gap: 4px;
}
.next-list__ic {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
}
.next-list__ic img { width: 32px; height: 32px; }
.next-list__ic--organico { background: var(--organico-soft); }
.next-list__ic--carta    { background: var(--carta-soft); }
.next-list__ic--plastica { background: var(--plastica-soft); }
.next-list__ic--vetro    { background: var(--vetro-soft); }
.next-list__ic--secco    { background: var(--secco-soft); }

.next-list__info { min-width: 0; }
.next-list__title {
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--ink);
  line-height: 1.2;
}
.next-list__sub {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  margin-top: 2px;
}
.next-list__badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn);
  white-space: nowrap;
}

/* ==========================================================
   SCHERMATA CALENDARIO
   ========================================================== */
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0 16px;
  gap: 8px;
}
.cal-header .btn-icon {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.cal-header__title {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--ink);
  text-transform: capitalize;
  flex: 1;
  text-align: center;
  letter-spacing: -.2px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  background: var(--surface);
  padding: 10px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.cal-grid__head {
  text-align: center;
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 0 8px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between;
  padding: 5px 3px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
  font: inherit;
  color: var(--ink);
  min-height: 44px;
}
.cal-day--other { opacity: .25; cursor: default; background: transparent; }
.cal-day--today {
  border-color: var(--brand);
  background: var(--brand-soft);
  font-weight: 800;
}
.cal-day--selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand-dark);
}
.cal-day--selected .cal-day__num { color: #fff; }
.cal-day--selected .cal-day__strip i { filter: brightness(1.1); }
.cal-day--weekend .cal-day__num { color: var(--ink-muted); }
.cal-day--festivo .cal-day__num { color: var(--danger); font-weight: 800; }
.cal-day--festivo::after {
  content: "";
  position: absolute;
  top: 3px; right: 3px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--danger);
}
.cal-day__num { font-size: var(--fs-sm); font-weight: 700; }
.cal-day__strip {
  display: flex;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
}
.cal-day__strip i { flex: 1; }

/* Dettaglio giorno */
.cal-detail { margin-top: 16px; }
.cal-detail:empty { display: none; }
.cal-detail__card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--brand);
}
.cal-detail__date {
  font-size: var(--fs-base);
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: capitalize;
}
.cal-detail__items { display: flex; flex-direction: column; gap: 10px; }
.cal-detail__item {
  display: flex; align-items: center; gap: 12px;
}
.cal-detail__item-ic {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.cal-detail__item-ic img { width: 36px; height: 36px; }
.cal-detail__item-label {
  font-weight: 700;
  font-size: var(--fs-base);
}
.cal-detail__item-sub {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}
.cal-detail__note {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--warn-bg);
  color: #78350f;
  border-radius: 8px;
  font-size: var(--fs-sm);
  font-weight: 500;
}
.cal-detail__empty {
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}

/* Legenda */
.cal-legend {
  margin-top: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 14px;
}
.cal-legend__item {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}
.dot {
  width: 14px; height: 14px; border-radius: 50%;
  flex-shrink: 0;
}
.dot--organico { background: var(--organico); }
.dot--carta    { background: var(--carta); }
.dot--plastica { background: var(--plastica); }
.dot--vetro    { background: var(--vetro); }
.dot--secco    { background: var(--secco); }
.dot--festivo  { background: var(--danger); }

/* ==========================================================
   SCHERMATA COSA BUTTO? — Dizionario A-Z
   ========================================================== */

/* --- Palette destinazioni (estesa) --- */
:root {
  --multi:        #475569;
  --multi-soft:   #e2e8f0;
  --abiti:        #be185d;
  --abiti-soft:   #fce7f3;
  --verde:        #166534;
  --verde-soft:   #dcfce7;
  --pile:         #b45309;
  --pile-soft:    #fef3c7;
  --farmaci:      #be123c;
  --farmaci-soft: #ffe4e6;
  --ko:           #7f1d1d;
  --ko-soft:      #fee2e2;
}

/* --- Barra di ricerca --- */
.dict-search {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.dict-search__ic {
  width: 20px; height: 20px;
  color: var(--ink-muted);
  flex-shrink: 0;
}
.dict-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--fs-base);
  background: transparent;
  color: var(--ink);
  min-width: 0;
  padding: 6px 0;
}
.dict-search input::-webkit-search-cancel-button { display: none; }
.dict-search__clear {
  background: transparent;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 4px;
  display: grid; place-items: center;
}
.dict-search__clear svg { width: 18px; height: 18px; }

/* --- Indice alfabetico --- */
.dict-index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.dict-index__letter {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  font-size: var(--fs-sm);
  text-decoration: none;
}
.dict-index__letter:active { transform: scale(0.95); }

/* --- Dizionario --- */
.dict-body { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }

.dict-section {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  scroll-margin-top: 8px;
}
.dict-section__letter {
  margin: 0;
  padding: 12px 16px;
  font-size: var(--fs-xl);
  font-weight: 900;
  color: var(--brand);
  background: var(--brand-soft);
  letter-spacing: -.5px;
}

.dict-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dict-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  line-height: 1.35;
}
.dict-item:first-child { border-top: none; }
.dict-item__name {
  flex: 1;
  color: var(--ink);
  font-weight: 500;
}
.dict-item__dests {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* --- Badge destinazione --- */
.dest-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.3;
}
.dest-badge--secco     { background: var(--secco-soft);     color: var(--secco); }
.dest-badge--organico  { background: var(--organico-soft);  color: var(--organico); }
.dest-badge--carta     { background: var(--carta-soft);     color: var(--carta); }
.dest-badge--plastica  { background: var(--plastica-soft);  color: var(--plastica); }
.dest-badge--vetro     { background: var(--vetro-soft);     color: var(--vetro); }
.dest-badge--multi     { background: var(--multi-soft);     color: var(--multi); }
.dest-badge--abiti     { background: var(--abiti-soft);     color: var(--abiti); }
.dest-badge--verde     { background: var(--verde-soft);     color: var(--verde); }
.dest-badge--pile      { background: var(--pile-soft);      color: var(--pile); }
.dest-badge--farmaci   { background: var(--farmaci-soft);   color: var(--farmaci); }
.dest-badge--ko        { background: var(--ko-soft);        color: var(--ko); }

/* --- Risultati ricerca --- */
.dict-results {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.dict-results__head {
  padding: 10px 16px;
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.dict-list--results .dict-item:first-child { border-top: none; }

.dict-empty {
  padding: 24px 16px;
  text-align: center;
}
.dict-empty__title {
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}
.dict-empty__body {
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}

/* --- Card Centro Multiraccolta + Farmaci --- */
.info-card--accent {
  border-left: 5px solid var(--brand);
}
.info-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.info-card__title svg { flex-shrink: 0; color: var(--brand); }

/* Versione collapsible (uso <details>) */
.info-card--collapsible {
  padding: 0;
  overflow: hidden;
}
.info-card--collapsible > summary {
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -.2px;
}
.info-card--collapsible > summary::-webkit-details-marker { display: none; }
.info-card--collapsible > summary > span { flex: 1; }
.info-card__chev {
  color: var(--ink-muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.info-card--collapsible[open] .info-card__chev { transform: rotate(180deg); }
.info-card--collapsible > div {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* --- Pulsante "torna su" flottante --- */
.btn-to-top {
  position: fixed;
  right: 16px;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  cursor: pointer;
  animation: fadeInUp .2s ease;
}
.btn-to-top[hidden] { display: none; }
.btn-to-top svg { width: 24px; height: 24px; }
.btn-to-top:active { transform: scale(0.95); }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.multi-orari {
  margin-top: 14px;
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 14px;
}
.multi-orari__title {
  font-size: var(--fs-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.multi-orari__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.multi-orari__table th {
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  padding: 4px 0;
  white-space: nowrap;
}
.multi-orari__table td {
  text-align: right;
  color: var(--ink-soft);
  padding: 4px 0;
}

.multi-conf {
  margin: 10px 0 4px 0;
  padding: 0 0 0 20px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.6;
  columns: 2;
  column-gap: 18px;
}
.multi-conf li { break-inside: avoid; margin-bottom: 2px; }

@media (max-width: 480px) {
  .multi-conf { columns: 1; }
}

/* --- Blocchi interni della card "Isola ecologica, pile e farmaci" --- */
.speciali-block {
  padding: 16px 0;
  border-top: 2px solid var(--border);
}
.speciali-block:first-child {
  padding-top: 0;
  border-top: none;
}
.speciali-block__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.speciali-block__head svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.speciali-block--isola   .speciali-block__head svg { color: var(--brand); }
.speciali-block--farmaci .speciali-block__head svg { color: var(--farmaci); }
.speciali-block--pile    .speciali-block__head svg { color: var(--pile); }

.speciali-block__title {
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -.2px;
  margin: 0;
}
.speciali-block__sub {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  margin-bottom: 6px;
  font-style: italic;
}

.fp-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.fp-list li { margin-bottom: 4px; }

/* --- Regolamento isola ecologica (dentro Multiraccolta) --- */
.rego { margin-top: 4px; }
.rego-block { margin-top: 12px; }
.rego-block:first-child { margin-top: 0; }
.rego-block__title {
  font-weight: 800;
  color: var(--ink);
  font-size: var(--fs-sm);
  margin-bottom: 4px;
}
.rego-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.rego-list li { margin-bottom: 3px; }

/* --- Servizi a domicilio --- */
.servizio {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.servizio:first-child { padding-top: 0; border-top: none; }
.servizio__title {
  font-weight: 800;
  color: var(--ink);
  font-size: var(--fs-base);
  margin-bottom: 2px;
}
.servizio__sub {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 6px;
}
.servizio__desc {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.4;
  margin-bottom: 10px;
}
.servizio__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.servizio__nota {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--warn-bg);
  border-radius: 8px;
  font-size: var(--fs-xs);
  color: var(--warn);
  font-weight: 600;
}

/* --- Contact link (tel/email/url) --- */
.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: background .15s;
}
.contact-link:active { background: var(--border); }
.contact-link--tel   { background: var(--brand-soft); color: var(--brand); }
.contact-link--email { background: var(--secco-soft); color: var(--secco); }
.contact-link--url   { background: var(--vetro-soft); color: var(--vetro); }
.contact-link--text  { cursor: default; }

.contact-link svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
}
.contact-link__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.contact-link__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  opacity: .75;
  line-height: 1.2;
}
.contact-link__val {
  font-size: var(--fs-sm);
  font-weight: 700;
  word-break: break-word;
  line-height: 1.3;
}

/* --- Contatti (scheda Info) --- */
.contatti-block { margin-top: 14px; }
.contatti-block:first-child { margin-top: 0; }
.contatti-block__title {
  font-weight: 800;
  color: var(--ink);
  font-size: var(--fs-base);
  margin-bottom: 2px;
}
.contatti-block__sub {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 8px;
}
.contatti-block__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ==========================================================
   SCHERMATA INFO
   ========================================================== */
.info-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.info-card__title {
  font-size: var(--fs-lg);
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -.2px;
}
.info-card__body {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-base);
  line-height: 1.55;
}
.info-details {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.info-details summary {
  cursor: pointer;
  font-weight: 700;
  padding: 6px 0;
  color: var(--brand);
  font-size: var(--fs-sm);
}
.info-details ol {
  margin: 8px 0 4px 22px;
  padding: 0;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.info-details li { margin-bottom: 4px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 12px;
  padding: 14px 22px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-base);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  min-height: 48px;
  transition: background .15s;
}
.btn-primary:hover,
.btn-primary:active { background: var(--brand-dark); }

.app-footer {
  text-align: center;
  color: var(--ink-muted);
  font-size: var(--fs-xs);
  padding: 20px 0 10px;
  line-height: 1.5;
}

/* ==========================================================
   TAB BAR (bottom nav)
   ========================================================== */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 30;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 12px rgba(15,23,42,.06);
}
.tab {
  flex: 1;
  min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 10px 2px;
  min-height: var(--tab-h);
  transition: color .15s;
}
.tab__icon { width: 24px; height: 24px; flex-shrink: 0; }
.tab__label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tab--active { color: var(--brand); }
.tab--active .tab__icon { stroke-width: 2.5; }

/* ==========================================================
   TOAST
   ========================================================== */
.toast {
  position: fixed;
  bottom: calc(var(--tab-h) + 20px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: var(--fs-sm);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: calc(100% - 40px);
  text-align: center;
  z-index: 50;
}
.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================
   RESPONSIVE (tablet / desktop)
   ========================================================== */
@media (min-width: 640px) {
  :root {
    --fs-base: 18px;
    --fs-xl:   28px;
    --fs-2xl:  38px;
  }
  .today-card { padding: 28px 24px; }
}
