/* ============================================================
   Harder - Rete PR.
   Palette e regole d'uso da harder-aura-brand-spec.md
   Interfaccia dark-first: non esiste una variante chiara.
   ============================================================ */
:root {
  color-scheme: dark;

  /* brand */
  --brand-orange:       #F25B28;
  --brand-orange-hover: #FF7A4D;
  --brand-orange-deep:  #A5401F;   /* solo bordi e superfici, mai testo */
  --brand-yellow:       #FDDD28;

  /* superfici
     Lo spec di brand dà #180F10 come fondo, ma su schermo il bruno si legge
     come sporco: qui il fondo è nero pieno e la scala sopra tiene solo un
     accenno di caldo, quel tanto che basta perché l'arancione non stoni. */
  --bg:               #000000;
  --surface:          #121112;
  --surface-elevated: #1C1A1B;
  --border:           #2C2829;
  --border-strong:    #3D3839;

  /* testo */
  --text:          #F5EDE9;
  --text-muted:    #A99A97;
  --text-on-brand: #180F10;        /* sull'arancione e sul giallo: mai bianco */

  /* stati */
  --success: #3FBF7F;
  --warning: #E8A33D;
  --danger:  #E2453C;
  --info:    #5B9BD5;

  /* raggi */
  --radius-sm:   6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-pill: 999px;

  --ombra: 0 10px 40px rgba(0, 0, 0, .55);
  --testata-h: 58px;
  --schede-h:  46px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* ---------------- logo ---------------- */
.logo { display: block; height: 36px; width: auto; }
.logo--grande { height: auto; width: min(300px, 100%); margin: 0 auto; }

/* ---------------- login ---------------- */
.login {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: 24px; background: var(--bg);
}
.login__box {
  width: min(380px, 100%); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px 26px; box-shadow: var(--ombra); text-align: center;
}
.login__sottotitolo {
  color: var(--text-muted); margin: 18px 0 24px; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase;
}
.login .campo { text-align: left; }

/* ---------------- testata ---------------- */
.app { display: flex; flex-direction: column; height: 100%; }

.testata {
  height: var(--testata-h); flex: 0 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 0 14px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.testata__marchio { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.testata__conteggio {
  color: var(--text-muted); font-size: 12px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.testata__cerca { position: relative; flex: 1 1 auto; min-width: 0; max-width: 460px; }
.testata__cerca input {
  width: 100%; height: 36px; padding: 0 12px 0 34px;
  background: var(--surface-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-pill); color: var(--text); font-size: 14px; outline: none;
}
.testata__cerca input:focus { border-color: var(--brand-orange); }
.testata__cerca .icona {
  position: absolute; left: 11px; top: 10px; width: 16px; height: 16px;
  fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round;
}
.testata__azioni { display: flex; gap: 8px; flex: 0 0 auto; }

/* ---------------- schede ---------------- */
.schede {
  height: var(--schede-h); flex: 0 0 auto; display: flex; gap: 4px;
  padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.scheda {
  appearance: none; background: none; border: none; color: var(--text-muted);
  font: inherit; font-weight: 600; font-size: 14px; padding: 0 14px; cursor: pointer;
  border-bottom: 2px solid transparent; transition: color .15s;
}
.scheda:hover { color: var(--text); }
.scheda--attiva { color: var(--brand-orange); border-bottom-color: var(--brand-orange); }

/* ---------------- viste ---------------- */
.contenuto { flex: 1 1 auto; min-height: 0; position: relative; }
.vista { position: absolute; inset: 0; display: none; flex-direction: column; }
.vista--attiva { display: flex; }

.barra-strumenti {
  flex: 0 0 auto; display: flex; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

/* ---------------- albero ---------------- */
.albero { flex: 1 1 auto; overflow: auto; padding: 10px 8px 60px; }

.nodo { position: relative; }
.nodo__figli { margin-left: 22px; padding-left: 14px; border-left: 1px solid var(--border); }
.nodo__figli.chiuso { display: none; }

.riga {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius);
  cursor: pointer; transition: background .12s;
}
.riga:hover { background: var(--surface); }
.riga--scelta {
  background: var(--surface-elevated);
  box-shadow: inset 0 0 0 1px var(--brand-orange-deep);
}

.freccia {
  flex: 0 0 auto; width: 20px; height: 20px; border: none; background: none;
  color: var(--text-muted); cursor: pointer; font-size: 11px; line-height: 1;
  display: grid; place-items: center; transition: transform .15s;
}
.freccia--chiusa { transform: rotate(-90deg); }
.freccia--vuota { visibility: hidden; }

.pallino {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 12px;
  color: var(--text-on-brand); letter-spacing: .02em;
}

/* Coppie: due cerchietti affiancati e i due nomi cliccabili separatamente. */
.pallini { display: flex; gap: 3px; flex: 0 0 auto; }
.riga--coppia .pallino { width: 24px; height: 24px; font-size: 10px; }

.riga__membro { cursor: pointer; border-radius: 3px; }
.riga__membro:hover { text-decoration: underline; }
.riga__membro--scelto { color: var(--brand-orange); }
.riga__piu { color: var(--text-muted); font-weight: 400; }

.pannello__coppia { color: var(--text-muted); font-size: 12.5px; margin: 5px 0 0; }
.pannello__coppia a { color: var(--brand-orange); text-decoration: none; }
.pannello__coppia a:hover { text-decoration: underline; }
.nota-coppia {
  color: var(--text-muted); font-size: 12px; line-height: 1.45;
  margin-top: 10px; padding: 8px 10px;
  background: var(--surface-elevated); border-radius: var(--radius-sm);
}
.campo__aiuto { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

.riga__testi { flex: 1 1 auto; min-width: 0; }
.riga__nome { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.riga__meta {
  color: var(--text-muted); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.riga__nome mark, .riga__meta mark, .tabella mark {
  background: rgba(242, 91, 40, .3); color: inherit; border-radius: 3px; padding: 0 2px;
}

.gettone {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: var(--radius-pill); background: var(--surface-elevated);
  border: 1px solid var(--border); color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------------- mappa ---------------- */
.mappa-guscio { flex: 1 1 auto; position: relative; }
#mappa { position: absolute; inset: 0; background: var(--surface); }
.leaflet-container { font: inherit; background: var(--bg); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--surface-elevated); color: var(--text);
  border: 1px solid var(--border-strong); box-shadow: var(--ombra);
}
.leaflet-popup-content-wrapper { border-radius: var(--radius); }
.leaflet-popup-content { margin: 12px 14px; font-size: 14px; }
.leaflet-popup-close-button { color: var(--text-muted) !important; }
.leaflet-control-zoom a {
  background: var(--surface) !important; color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-control-attribution {
  background: rgba(0, 0, 0, .8) !important; color: var(--text-muted) !important;
}
.leaflet-control-attribution a { color: var(--text-muted) !important; }

.segnaposto {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg); display: grid; place-items: center;
  border: 2px solid rgba(0, 0, 0, .4); box-shadow: 0 3px 10px rgba(0, 0, 0, .6);
}
.segnaposto span {
  transform: rotate(45deg); font-weight: 800; font-size: 11px; color: var(--text-on-brand);
}
.segnaposto--scelto { outline: 3px solid var(--text); outline-offset: 1px; }

/*
 * Lucchetto dei segnaposti. Piccolo e in disparte quando e' chiuso: serve di
 * rado. Quando e' aperto diventa arancione e accende un bordo tutto intorno
 * alla mappa, perche' una modalita' che modifica i dati non deve poter restare
 * accesa di nascosto.
 */
.btn-mappa {
  position: absolute; top: 10px; right: 10px; z-index: 1000;
  width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center;
  background: rgba(28, 26, 27, .95); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: color .15s, background .15s, border-color .15s;
}
.btn-mappa:hover { color: var(--text); border-color: var(--border-strong); }
.btn-mappa[aria-pressed="true"] {
  background: var(--brand-orange); border-color: var(--brand-orange);
  color: var(--text-on-brand);
}
.btn-mappa svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.btn-mappa .lucchetto--aperto { display: none; }
.btn-mappa[aria-pressed="true"] .lucchetto--chiuso { display: none; }
.btn-mappa[aria-pressed="true"] .lucchetto--aperto { display: block; }

.mappa-guscio--sposta #mappa { box-shadow: inset 0 0 0 2px var(--brand-orange); }

.sr-solo {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.mappa-legenda {
  position: absolute; left: 10px; bottom: 22px; z-index: 400;
  background: rgba(28, 26, 27, .95); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px; max-width: 62vw;
}
/* Linguetta: da chiusa e' tutto quello che resta della legenda. */
.legenda__testa {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 5px 7px; background: none; border: 0; border-radius: var(--radius-sm);
  color: var(--text); font: inherit; font-size: 12px; font-weight: 600;
  white-space: nowrap; cursor: pointer;
}
.legenda__testa:hover { background: var(--surface); }
.legenda__etichetta { overflow: hidden; text-overflow: ellipsis; }
.legenda__freccia { margin-left: auto; color: var(--text-muted); font-size: 10px; transition: transform .15s; }
.legenda__testa[aria-expanded="true"] .legenda__freccia { transform: rotate(180deg); }
.legenda__corpo { max-height: min(40vh, 300px); overflow: auto; margin-top: 4px; }
.mappa-legenda--chiusa .legenda__corpo { display: none; }
.mappa-legenda--chiusa { border-color: var(--border-strong); }
.legenda__voce {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; white-space: nowrap;
}
.legenda__voce:hover { background: var(--surface); }
.legenda__voce--scelta { background: var(--surface); color: var(--brand-orange-hover); font-weight: 600; }
.legenda__punto { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.legenda__titolo {
  font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); padding: 2px 6px 6px;
}

/* ---------------- elenco ---------------- */
.tabella-guscio { flex: 1 1 auto; overflow: auto; }
.tabella {
  width: 100%; border-collapse: collapse; font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.tabella th {
  position: sticky; top: 0; z-index: 2; text-align: left;
  background: var(--surface); padding: 11px 14px; font-size: 12px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted);
  border-bottom: 1px solid var(--border); cursor: pointer; white-space: nowrap;
}
.tabella th:hover { color: var(--text); }
.tabella td { padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tabella tbody tr { cursor: pointer; }
.tabella tbody tr:hover { background: var(--surface); }
.tabella a { color: var(--brand-orange); text-decoration: none; }
.tabella a:hover { color: var(--brand-orange-hover); text-decoration: underline; }

/*
 * Elenco a schede. Sette colonne su un telefono obbligano a scorrere di lato:
 * leggi il nome, trascini, e nel trascinare hai perso la riga. Sotto i 900px la
 * tabella sparisce e ogni PR diventa una scheda che ci sta tutta in larghezza.
 */
.schede-elenco, .ordina-schede { display: none; }

/*
 * Righe, non riquadri: su un telefono il metro e' quanti nomi entrano nello
 * schermo. Niente margini fra una e l'altra, solo un filo di separazione.
 */
.scheda-pr {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-bottom: 1px solid var(--border);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.scheda-pr:active { background: var(--surface); }
.scheda-pr--scelta { background: var(--surface); box-shadow: inset 3px 0 0 var(--brand-orange); }
.scheda-pr__punto { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.scheda-pr__testi { flex: 1 1 auto; min-width: 0; }
.scheda-pr__riga-nome { display: flex; align-items: center; gap: 7px; }
.scheda-pr__nome {
  font-size: 14.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.scheda-pr__meta {
  font-size: 12px; color: var(--text-muted); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Bersagli tondi da 36px: si toccano col pollice senza rubare una riga. */
.scheda-pr__azioni { display: flex; gap: 4px; flex: 0 0 auto; }
.scheda-pr__icona {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  color: var(--brand-orange); border: 1px solid var(--border-strong); text-decoration: none;
}
.scheda-pr__icona:active { background: var(--surface-elevated); }
.scheda-pr__icona svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

.pasticca {
  flex: 0 0 auto; min-height: 38px; padding: 0 15px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pasticca--attiva { background: var(--brand-orange); border-color: var(--brand-orange); color: var(--text-on-brand); font-weight: 600; }

/* ---------------- pannello dettaglio ---------------- */
.pannello {
  position: fixed; z-index: 900; background: var(--surface);
  border-left: 1px solid var(--border); box-shadow: var(--ombra);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .22s ease;
  right: 0; top: 0; bottom: 0; width: min(400px, 100%);
  transform: translateX(100%);
}
.pannello--aperto { transform: none; }
.pannello__testata {
  flex: 0 0 auto; padding: 18px 18px 14px; border-bottom: 1px solid var(--border);
  display: flex; gap: 12px; align-items: flex-start;
}
.pannello__corpo { flex: 1 1 auto; overflow: auto; padding: 16px 18px 30px; }
.pannello__nome { font-size: 19px; font-weight: 700; margin: 0; }
.pannello__ruolo { color: var(--text-muted); font-size: 12.5px; margin: 3px 0 0; }

.dato { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.dato__et { flex: 0 0 92px; color: var(--text-muted); font-size: 12.5px; padding-top: 1px; }
.dato__val { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.dato__val a { color: var(--brand-orange); text-decoration: none; }
.dato__val a:hover { color: var(--brand-orange-hover); text-decoration: underline; }
.dato__vuoto { color: var(--brand-orange-deep); }

.sezione-titolo {
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); margin: 22px 0 8px;
}
.sotto-elenco { display: flex; flex-direction: column; gap: 2px; }
.sotto-voce {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: var(--radius); cursor: pointer; background: var(--surface-elevated);
}
.sotto-voce:hover { background: var(--border); }
.azioni-rapide { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.pannello__pie { display: flex; gap: 8px; padding-top: 18px; }

/* ---------------- modale ---------------- */
.modale {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: rgba(0, 0, 0, .68); padding: 16px;
}
.modale__box {
  width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column;
  background: var(--surface-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--ombra);
}
.modale__testata {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.modale__testata h2 { margin: 0; font-size: 17px; }
.modale__corpo { padding: 18px; overflow: auto; }
.modale__pie {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 18px; border-top: 1px solid var(--border);
}

.griglia-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.campo--largo { grid-column: 1 / -1; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo__etichetta { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.campo input, .campo select, .campo textarea {
  width: 100%; padding: 10px 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; font-size: 15px; outline: none; resize: vertical;
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
  border-color: var(--brand-orange);
}

/* ---------------- bottoni ---------------- */
.btn {
  appearance: none; font: inherit; font-weight: 600; font-size: 14px;
  padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-elevated); color: var(--text);
  transition: background .12s, border-color .12s, color .12s; white-space: nowrap;
}
.btn:hover { background: var(--border); }
.btn:disabled { opacity: .5; cursor: default; }

/* Arancione = azione. Testo nero: bianco su arancione non passa il contrasto. */
.btn--primario {
  background: var(--brand-orange); border-color: var(--brand-orange);
  color: var(--text-on-brand);
}
.btn--primario:hover { background: var(--brand-orange-hover); border-color: var(--brand-orange-hover); }

.btn--fantasma { background: none; border-color: transparent; color: var(--text-muted); }
.btn--fantasma:hover { background: var(--surface-elevated); color: var(--text); }
.btn--pieno { width: 100%; margin-top: 8px; padding: 11px; }
.btn--mini { font-size: 12.5px; padding: 6px 11px; }
.btn--pericolo {
  color: var(--danger); border-color: rgba(226, 69, 60, .38);
  background: rgba(226, 69, 60, .09);
}
.btn--pericolo:hover { background: rgba(226, 69, 60, .18); }

/* ---------------- varie ---------------- */
.errore {
  color: var(--danger); font-size: 13px; margin: 12px 0 0;
  background: rgba(226, 69, 60, .1); border: 1px solid rgba(226, 69, 60, .3);
  border-radius: var(--radius-sm); padding: 9px 11px;
}
.velo { position: fixed; inset: 0; z-index: 890; background: rgba(0, 0, 0, .5); }
.menu {
  position: fixed; z-index: 1100; right: 12px; top: calc(var(--testata-h) + 4px);
  background: var(--surface-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--ombra); overflow: hidden; min-width: 220px;
}
.menu button {
  display: block; width: 100%; text-align: left; padding: 11px 15px;
  background: none; border: none; color: var(--text); font: inherit; font-size: 14px;
  cursor: pointer;
}
.menu button:hover { background: var(--surface); color: var(--brand-orange); }
.avviso {
  position: fixed; z-index: 1200; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--surface-elevated); border: 1px solid var(--border-strong);
  color: var(--text); padding: 11px 18px; border-radius: var(--radius-pill);
  box-shadow: var(--ombra); font-size: 14px; max-width: 90vw; text-align: center;
}
.avviso--errore { border-color: rgba(226, 69, 60, .5); color: var(--danger); }
.vuoto { padding: 46px 22px; text-align: center; color: var(--text-muted); }
.vuoto strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }

/* ---------------- desktop ---------------- */
@media (min-width: 900px) {
  .albero { padding: 14px 18px 60px; }
  .app--pannello .contenuto { margin-right: 400px; }
  .app--pannello .velo { display: none !important; }
}

@media (max-width: 899px) {
  .pannello {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%;
    height: 82vh; border-left: none; border-top: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0; transform: translateY(100%);
  }
  .pannello--aperto { transform: none; }
  .testata__conteggio { display: none; }
  .logo { height: 30px; }
  .griglia-form { grid-template-columns: 1fr; }
  .mappa-legenda { max-width: 46vw; font-size: 11px; }

  /*
   * Con la scheda di un PR aperta la mappa non si comanda: sta sotto il
   * pannello. I suoi bottoni — zoom e lucchetto — resterebbero a galleggiare
   * sulla striscia di mappa che si vede ancora, quindi si tolgono di mezzo e
   * tornano appena chiudi la scheda.
   */
  .leaflet-control-zoom, .btn-mappa {
    transition: opacity .18s, visibility .18s, color .15s, background .15s, border-color .15s;
  }
  .app--pannello .leaflet-control-zoom,
  .app--pannello .btn-mappa { opacity: 0; visibility: hidden; }

  .tabella { display: none; }
  .schede-elenco {
    display: block; padding: 0;
    /* L'ultima scheda non deve finire sotto la barra di sistema dell'iPhone. */
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .ordina-schede {
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
    position: sticky; top: 0; z-index: 2;
    padding: 10px 12px; background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .ordina-schede::-webkit-scrollbar { display: none; }

  /*
   * Safari su iPhone ingrandisce la pagina quando tocchi un campo con il testo
   * sotto i 16px, e poi resta ingrandita. Qui i campi arrivano a 16px: non e'
   * un vezzo tipografico, e' l'unico modo per non far saltare la pagina a ogni
   * ricerca e a ogni modifica.
   */
  .testata__cerca input, .campo input, .campo select, .campo textarea { font-size: 16px; }

  /* Bordi tondi e barra di sistema: il contenuto sta dentro l'area sicura. */
  .pannello__corpo { padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)); }
  .mappa-legenda { bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
  .avviso { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
}
