/* GRAFICA UNICA DELLA PWA (Rambaldo 06/10/2026: «stessa grafica/design della PWA con gli stessi effetti»).
   Gettoni presi da stile.css e guscio.css del motore (grafica unica 03/10/2026): fondo #f2f2f7, carta bianca,
   testo #1c1c1e, muto #6d6d72, rosso di Borgo Malvasia #AA3329 per le azioni, carattere Manrope servito da noi
   (KIT-GRAFICO/caratteri, licenza OFL): nessun terzo vede lo staff. Un colore solo per tutti e tre i marchi,
   come nella PWA: il marchio resta nel logo. --accent-ink e' il rosso quando fa da testo (in scuro schiarisce). */

@font-face { font-family: "Manrope"; src: url("/caratteri/manrope.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  /* Colori dei canali in Presenze (camere_oggi.css, 02/11/2026). */
  --canale-booking: #1E5BB8; --canale-airbnb: #D6453D; --canale-diretta: #2E7D4F; --canale-expedia: #E0A800;
  --bg: #f2f2f7;
  --surface: #FFFFFF;
  --surface-2: #f7f7fa;
  --laterale: #e9e9ee;
  --ink: #1c1c1e;
  --muted: #6d6d72;
  --line: #e2e2e8;
  --filo: rgba(0, 0, 0, .08);
  --accent: #AA3329;
  --accent-hover: #8E2A22;
  --accent-soft: #F6E8E7;
  --accent-bordo: #E6C4BF;
  --accent-ink: #8E2A22;
  --on-accent: #FFFFFF;
  --ok: #2e7d32;      --ok-soft: #dff3df;
  --warn: #7a4d00;    --warn-soft: #fbeed2;
  --danger: #c62828;  --danger-soft: #f8dcd9;
  /* 07/10/2026, ritocchi per lo Scuro: testo sopra il rosso pieno, velo dietro finestre e cassetti, carta e tessera dei loghi
     (queste due restano bianche in ogni tema: la firma e' inchiostro scuro su carta, i loghi sono fatti per fondo chiaro) */
  --on-danger: #FFFFFF;
  --velo: rgb(16 24 40 / .38);
  --carta: #FFFFFF;
  --logo-fondo: #FFFFFF;
  /* i colori dei gruppi del menu, come nella PWA: --c pieno, --ct tinta */
  --g-giorno: #AA3329;    --g-giorno-t: #F6E8E7;
  --g-soldi: #C99A2E;     --g-soldi-t: #F8F1E1;
  --g-strutture: #1F6A99; --g-strutture-t: #E5EEF4;
  --g-persone: #12756A;   --g-persone-t: #E3F0EE;
  --g-altro: #475467;     --g-altro-t: #ECEEF2;
  /* il simbolo sopra il colore pieno del gruppo (voce scelta o sotto il dito): bianco, tranne sull'oro dei Soldi (bianco su oro: 2,6 a 1) */
  --on-g: #FFFFFF;        --g-soldi-on: #1C1C1E;
  /* il Tabellone dello staff, coi colori del tabellone della PWA (28/10/2026): barre blu notte, oggi e pulizia in oro,
     fine settimana e partenze in arancio */
  /* Tabellone staff (29/10/2026): colore di dove hanno prenotato, colazione, ARRIVO/FERMO, parcheggio. Uguali nei temi. */
  --tb-booking: #1F5FBF; --tb-airbnb: #D93A50; --tb-diretta: #2F7D4F; --tb-expedia: #F2B705; --tb-altro: #5B6470;
  --tb-scuro: #1C1C1E; --tb-chiaro: #FFFFFF; --tb-col: #FFD54A; --tb-col-ink: #3A2A00; --tb-fermo-c: #1F6A99; --tb-rosso: #AA3329;
  --tb-notte: #0E1B2C;    --tb-oro: #F5B83D;      --tb-oro-ink: #B07A00;   --tb-fine: #B4541A;

  --font-display: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-sm: 0.875rem;  --text-base: 1rem;   --text-md: 1.125rem;
  --text-lg: 1.35rem;   --text-xl: 1.62rem;  --text-2xl: 1.95rem;

  --s-1: 4px; --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

  --radius: 12px;
  --radius-sm: 8px;
  --tap: 48px;
  --alto-barra: 69px;          /* la barra in basso senza il margine del telefono: 6 + tasto 62 + filo 1 */
  --measure: 60ch;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .04), 0 0 0 1px rgba(16, 24, 40, .05);
  --shadow-2: 0 8px 24px rgba(16, 24, 40, .10), 0 2px 6px rgba(16, 24, 40, .06);
  --ease: cubic-bezier(.2, 0, 0, 1);
  --dur: 160ms;
  --logo-h: 44px;
}

[data-gruppo] { --c: var(--g-altro); --ct: var(--g-altro-t); --co: var(--on-g); }
[data-gruppo="giorno"] { --c: var(--g-giorno); --ct: var(--g-giorno-t); }
[data-gruppo="soldi"] { --c: var(--g-soldi); --ct: var(--g-soldi-t); --co: var(--g-soldi-on); }
[data-gruppo="strutture"] { --c: var(--g-strutture); --ct: var(--g-strutture-t); }
[data-gruppo="persone"] { --c: var(--g-persone); --ct: var(--g-persone-t); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--text-base); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 var(--s-3); text-wrap: balance; }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); }
p  { margin: 0 0 var(--s-4); max-width: var(--measure); text-wrap: pretty; }
.muted { color: var(--muted); font-size: var(--text-sm); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

.wrap { max-width: 560px; margin: 0 auto; padding: var(--s-4) var(--s-4) var(--s-8); }
.wide { max-width: 1100px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* marchio */
.brandbar { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); margin-bottom: var(--s-5); }
.brandbar img { height: var(--logo-h); width: var(--logo-h); object-fit: contain; border-radius: var(--radius-sm); background: var(--logo-fondo); }
.brandbar .who { flex: 1; min-width: 0; }
.brandbar .who strong { display: block; font-family: var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brandbar .who span { font-size: var(--text-sm); color: var(--muted); }
.safe-top { padding-top: max(var(--s-3), env(safe-area-inset-top)); }

/* pwa */
.offline { position: sticky; top: 0; z-index: 50; display: none; gap: var(--s-2); align-items: center; justify-content: center;
  padding: var(--s-2) var(--s-4); background: var(--warn-soft); color: var(--warn); font-size: var(--text-sm); font-weight: 500; }
body[data-offline] .offline { display: flex; }
.install { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-4); margin-bottom: var(--s-5);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.install p { margin: 0; font-size: var(--text-sm); }
@media (display-mode: standalone) { .only-browser { display: none !important; } }

/* pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-5);
  font: inherit; font-weight: 700; border: 1.5px solid transparent; border-radius: var(--radius); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--secondary:hover { border-color: var(--muted); background: var(--surface-2); }
.btn--ghost { background: transparent; color: var(--accent-ink); padding: 0 var(--s-2); }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--danger { background: var(--danger); color: var(--on-danger); }
.btn--block { width: 100%; }
.btn--small { min-height: 36px; padding: 0 var(--s-3); font-size: var(--text-sm); border-radius: 10px; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn { transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 90ms var(--ease); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn[data-loading]::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { display: flex; gap: var(--s-3); align-items: center; padding-top: var(--s-5); margin-top: var(--s-5); border-top: 1px solid var(--line); }
.actions .spacer { flex: 1; }
@media (max-width: 520px) {
  .actions { position: sticky; bottom: 0; background: var(--bg); padding-bottom: max(var(--s-4), env(safe-area-inset-bottom)); }
  .actions .btn--primary { flex: 1; }
  /* con la barra in basso la fila si ferma sopra la barra, non sotto (caso Testa, 26/10/2026) */
  body.con-tabs .actions { bottom: calc(var(--alto-barra) + env(safe-area-inset-bottom)); padding-bottom: var(--s-4); }
}

/* il grande pulsante della timbratura */
.timbra { width: 100%; min-height: 96px; font-size: var(--text-lg); font-family: var(--font-display); font-weight: 600; border-radius: 16px; box-shadow: var(--shadow-2); }
.stato { background: var(--surface); border: 0; box-shadow: var(--shadow-1); border-radius: 16px; padding: var(--s-5); margin-bottom: var(--s-4); }
.stato .grande { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; margin: 0 0 var(--s-1); }
.stato p { margin: 0; }

/* campi */
.field { margin-bottom: var(--s-5); }
.field > label { display: block; font-weight: 500; margin-bottom: var(--s-2); }
.field .hint { display: block; font-size: var(--text-sm); color: var(--muted); margin-bottom: var(--s-2); }
.field input, .field select, .field textarea { width: 100%; min-height: var(--tap); padding: var(--s-3) var(--s-4); font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field[data-invalid] input { border-color: var(--danger); }
.errore { display: block; margin: var(--s-2) 0 var(--s-4); font-size: var(--text-sm); color: var(--danger); }
.row { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }

/* stati */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px var(--s-3); border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.alert { display: flex; gap: var(--s-3); padding: var(--s-4); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin-bottom: var(--s-4); }
.alert strong { display: block; margin-bottom: 2px; }
.alert p { margin: 0; font-size: var(--text-sm); }
.home-schermata:empty { display: none; }
.home-passi { list-style: none; margin: var(--s-3) 0; padding: 0; display: grid; gap: var(--s-2); font-size: var(--text-sm); }
.home-passi li { display: flex; gap: var(--s-3); align-items: center; }
.home-tasti { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-3); }
.alert--ok { background: var(--ok-soft); border-color: transparent; }
.alert--warn { background: var(--warn-soft); border-color: transparent; }
.alert--danger { background: var(--danger-soft); border-color: transparent; }
/* Sotto le regole di sicurezza, nel quiz e nella guida (22/10/2026): «sono esempi, non tutte le norme». */
.non-esaustivo { margin: 0 0 var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--radius); border-inline-start: 4px solid var(--warn);
  background: var(--warn-soft); color: var(--ink); font-size: var(--text-sm); line-height: 1.45; text-wrap: pretty; }
.non-esaustivo[hidden] { display: none; }

/* passaggi */
.steps { display: flex; gap: var(--s-2); list-style: none; padding: 0; margin: 0 0 var(--s-5); counter-reset: passo; }
.steps li { flex: 1; font-size: var(--text-sm); color: var(--muted); border-top: 3px solid var(--line); padding-top: var(--s-2); }
.steps li[aria-current="step"] { color: var(--ink); border-color: var(--accent); font-weight: 700; }
.steps li.fatto { border-color: var(--accent); }

/* liste di camere e checklist */
.lista { list-style: none; margin: 0 0 var(--s-4); padding: 0; background: var(--surface); border: 0; box-shadow: var(--shadow-1); border-radius: 14px; }
.lista li + li { border-top: 1px solid var(--line); }
.lista li:first-child { border-radius: 14px 14px 0 0; } .lista li:last-child { border-radius: 0 0 14px 14px; }
.lista label { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); min-height: var(--tap); cursor: pointer; }
.lista input[type="checkbox"] { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.lista .testo { flex: 1; min-width: 0; }
.lista .testo small { display: block; color: var(--muted); }
.gruppo { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0; margin: var(--s-5) 0 var(--s-2); }
.nota-voce { width: 100%; margin-top: var(--s-2); padding: var(--s-2) var(--s-3); font: inherit; font-size: var(--text-sm); border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* schede e navigazione */
.card { background: var(--surface); border: 0; box-shadow: var(--shadow-1); border-radius: 14px; padding: var(--s-4); margin-bottom: var(--s-4); }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
.tabs button { flex: 1; min-height: 56px; background: none; border: 0; font: inherit; font-size: var(--text-sm); color: var(--muted); cursor: pointer; }
.tabs button[aria-current="page"] { color: var(--ink); font-weight: 800; }
body.con-tabs { padding-bottom: 80px; }

/* tabella che diventa schede */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 0; box-shadow: var(--shadow-1); border-radius: 14px; overflow: hidden; }
.table th, .table td { padding: var(--s-3) var(--s-4); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
/* Tabelle larghe del registro (27/10/2026): scorrono dentro la scheda invece di uscirne; titoli staccati dalla tabella sopra. */
.tabella-scorre { max-width: 100%; overflow-x: auto; border-radius: 14px; -webkit-overflow-scrolling: touch; }
.tabella-scorre .table td code { white-space: nowrap; }
.registro-persona h3 { margin-top: var(--s-6); }
@media (max-width: 700px) {
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { background: var(--surface); border: 0; box-shadow: var(--shadow-1); border-radius: 14px; margin-bottom: var(--s-3); padding: var(--s-2); }
  .table { border: 0; background: none; }
  .table td { display: flex; justify-content: space-between; gap: var(--s-4); border: 0; padding: var(--s-2) var(--s-3); }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: var(--text-sm); }
}

.empty { text-align: center; padding: var(--s-7) var(--s-4); background: var(--surface); border: 1.5px dashed var(--line); border-radius: 14px; }
.empty p { margin: 0 auto var(--s-4); color: var(--muted); max-width: 42ch; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); height: 14px; margin-bottom: var(--s-2); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.totale { display: flex; justify-content: space-between; align-items: baseline; padding: var(--s-4); background: var(--accent-soft); border-radius: var(--radius); margin-bottom: var(--s-4); }
.totale strong { font-family: var(--font-display); font-size: var(--text-xl); }
.segmenti { display: flex; gap: var(--s-2); margin-bottom: var(--s-4); }
.segmenti button { flex: 1; }
.segmenti button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-bordo); color: var(--accent-ink); }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--bg); padding: var(--s-3) var(--s-4); border-radius: var(--radius); box-shadow: var(--shadow-2); font-weight: 700;
  max-width: calc(100% - 32px); font-size: var(--text-sm); }
.codice { font-family: var(--font-mono); font-size: var(--text-2xl); letter-spacing: .15em; text-align: center; padding: var(--s-4); background: var(--accent-soft); border-radius: var(--radius); margin: var(--s-3) 0; }

/* pannello del capo (il guscio con la colonna a gruppi sta in guscio_capo.css) */
.griglia { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.testo-rapporto { white-space: pre-wrap; font-size: var(--text-sm); line-height: 1.6; }
.filtri { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; margin-bottom: var(--s-4); }
.filtri .field { margin: 0; }
dialog { border: 0; border-radius: 18px; padding: var(--s-5); max-width: 480px; width: calc(100% - 32px); box-shadow: var(--shadow-2); background: var(--surface); color: var(--ink); }
dialog::backdrop { background: var(--velo); }
/* la finestra si apre come nella PWA (mov-finestra e mov-velo del kit) */
dialog[open] { animation: mov-apri 260ms cubic-bezier(.2, 0, 0, 1) both; }
dialog[open]::backdrop { animation: mov-compari 260ms linear both; }

/* ritocchi visti sul telefono */
.segmenti .btn { flex: 1 1 0; min-width: 0; padding: 0 var(--s-2); white-space: normal; line-height: 1.2; text-align: center; }
.lista:empty { display: none; }
.timbra { margin-bottom: var(--s-4); }
.wrap h2:not(:first-child) { margin-top: var(--s-6); }
.table td::before { font-family: var(--font-body); }
.table td small { display: block; }
@media (max-width: 700px) { .table td { text-align: right; } .table td small { text-align: right; } }
.manuale { display: grid; grid-template-columns: 1fr auto; gap: var(--s-2); margin-bottom: var(--s-4); }
.manuale input, .manuale select { min-height: var(--tap); padding: 0 var(--s-3); font: inherit; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.manuale input { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .btn { padding: 0 var(--s-4); }
  .actions { flex-wrap: wrap; }
  .actions .btn--ghost { padding: 0 var(--s-1); }
}

/* App dello staff (02/10/2026): il menu delle sezioni dei moduli. */
.griglia-sezioni { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s-3); }
.tessera { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 112px; padding: var(--s-4) var(--s-2); background: var(--surface); border: 0; box-shadow: var(--shadow-1);
  border-radius: var(--radius); font: inherit; font-weight: 600; color: var(--ink); text-align: center; cursor: pointer; }
.tessera img { width: 40px; height: 40px; }
.tessera .badge { position: absolute; top: var(--s-2); right: var(--s-2); }
.tessera:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* App dello staff, nuova versione (Rambaldo 02/10/2026, disegno «app-staff-modello2»).
   Lo staff deve capire al primo colpo: frasi corte, un tasto gigante per schermata,
   icona sempre con il testo accanto. Animazioni dal kit (movimento.css). */
.testata { position: relative; display: grid; justify-items: center; gap: 6px; padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line); margin-bottom: var(--s-5); }
.testata img { width: 84px; height: 84px; object-fit: contain; border-radius: 18px; background: var(--logo-fondo); box-shadow: var(--shadow-1); }
/* Accesso (08/10/2026): il logo della struttura grande al centro; quello piccolo in testata si toglie. */
body:has(.logo-accesso) .testata img { display: none; }
.logo-accesso { display: block; width: min(52vw, 180px); height: auto; aspect-ratio: 1; object-fit: contain; margin: var(--s-4) auto var(--s-3);
  border-radius: 32px; background: var(--logo-fondo); box-shadow: var(--shadow-2, var(--shadow-1)); }
.ciao-accesso { text-align: center; }
.testata .ditta { font-size: var(--text-sm); font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.apri-menu { position: absolute; left: 0; top: max(var(--s-3), env(safe-area-inset-top)); display: grid; justify-items: center; gap: 3px;
  min-width: var(--tap); min-height: var(--tap); padding: var(--s-1) var(--s-2); font: inherit; font-size: 12px; font-weight: 700;
  color: var(--ink); background: none; border: 0; border-radius: var(--radius); cursor: pointer; }
.apri-menu .righe { width: 26px; display: grid; gap: 4px; }
.apri-menu .righe i { display: block; height: 3px; border-radius: 2px; background: currentColor; }
.apri-menu .pallino { position: absolute; right: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
[dir="rtl"] .apri-menu { left: auto; right: 0; }

/* le icone: la forma dal file SVG, il colore dal testo (così seguono il marchio) */
.ico { display: inline-block; flex: none; width: 1.5em; height: 1.5em; background-color: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.sasso { border-radius: 50%; display: grid; place-items: center; background: var(--ct, var(--accent-soft)); color: var(--c, var(--accent)); flex: none;
  transition: background-color var(--dur) linear, color var(--dur) linear; }
.sasso .ico { width: 60%; height: 60%; }

/* barra in basso: icona e testo sempre insieme */
.tabs.barra { background: var(--laterale); border-top-color: var(--filo); padding-top: 6px; }
.tabs.barra button { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 62px; padding: 3px 2px;
  font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--muted); transition: transform 90ms var(--ease); }
.tabs.barra button:active { transform: scale(.97); }
/* la barra del telefono della PWA: icona in una pastiglia, quella scelta piena di rosso */
.barra .sasso { width: 46px; height: 30px; border-radius: 999px; background: transparent; color: var(--muted); }
.barra button[aria-current="page"] .sasso { background: var(--accent); color: var(--on-accent); }
body.con-tabs { padding-bottom: 96px; }

/* Timbra */
.frase { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; line-height: 1.25; margin: 0 0 var(--s-3); text-wrap: balance; }
.timbra-gigante { width: 100%; min-height: 84px; margin-bottom: var(--s-4); gap: var(--s-3); font-size: 1.4rem; font-weight: 700;
  white-space: normal; border-radius: 22px; box-shadow: var(--shadow-2); }
.timbra-gigante .ico { width: 34px; height: 34px; }
.timbra-gigante.enorme { min-height: 180px; flex-direction: column; font-size: 1.75rem; border-radius: 28px; }
.timbra-gigante.enorme .ico { width: 56px; height: 56px; }
.tasto-giallo { width: 100%; min-height: 56px; margin-bottom: var(--s-4); gap: var(--s-2); font-size: 1.06rem; font-weight: 700; white-space: normal;
  background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); border-radius: 16px; }
.annuncio { display: grid; gap: 4px; margin-bottom: var(--s-4); padding: 12px 14px; border-radius: 16px; background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.annuncio .tipo { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 800; color: var(--accent-ink); }
.annuncio .tipo .ico { width: 18px; height: 18px; }
.annuncio strong { font-size: 1.06rem; }
.annuncio p { margin: 0; }
.annuncio .riga-tasti { display: flex; justify-content: flex-end; margin-top: 4px; }
.entrata-fatta { display: flex; align-items: center; gap: 12px; margin-bottom: var(--s-4); padding: 12px 14px; border-radius: 16px; background: var(--ok-soft); color: var(--ok); }
.entrata-fatta .spunta { width: 40px; height: 40px; border-radius: 50%; background: var(--ok); color: var(--surface); display: grid; place-items: center;
  font-size: 22px; font-weight: 800; flex: none; }
.entrata-fatta strong { display: block; font-size: 1.12rem; }
.entrata-fatta span { font-size: var(--text-sm); }

/* Bacheca: il menu laterale che entra da sinistra (da destra nelle lingue scritte da destra) */
.velo-menu { position: fixed; inset: 0; z-index: 70; background: var(--velo); }
.menu-lato { position: fixed; top: 0; bottom: 0; left: 0; z-index: 71; width: min(84%, 360px); overflow-y: auto; display: grid; align-content: start; gap: 2px;
  padding: max(var(--s-5), env(safe-area-inset-top)) var(--s-3) max(var(--s-5), env(safe-area-inset-bottom));
  background: var(--laterale); box-shadow: 8px 0 30px rgb(0 0 0 / .2); }
.menu-lato.mov-lato { animation-name: mov-da-sinistra; }
.menu-lato.mov-lato.mov-esce { animation-name: mov-a-sinistra; }
[dir="rtl"] .menu-lato { left: auto; right: 0; }
[dir="rtl"] .menu-lato.mov-lato { animation-name: mov-da-lato; }
[dir="rtl"] .menu-lato.mov-lato.mov-esce { animation-name: mov-a-lato; }
@keyframes mov-da-sinistra { from { transform: translateX(-100%); } }
@keyframes mov-a-sinistra { to { transform: translateX(-100%); } }
.menu-testa { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin: 0 0 var(--s-2) 6px; }
.menu-testa h2 { margin: 0; font-size: 1.4rem; }
.chiudi-menu { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 var(--s-3); font: inherit; font-weight: 700;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.chiudi-menu .ico { width: 18px; height: 18px; }
.voce { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 56px; padding: var(--s-2) 6px; font: inherit; font-size: 1.06rem;
  font-weight: 700; color: var(--ink); text-align: start; background: none; border: 0; border-radius: 14px; cursor: pointer; }
.voce:hover { background: color-mix(in srgb, var(--c, var(--accent)) 9%, transparent); }
.voce:hover .sasso { background: var(--c, var(--accent)); color: var(--co, var(--on-accent)); }
.voce .sasso { width: 40px; height: 40px; }
.voce .conta { margin-inline-start: auto; font-size: 12px; font-family: var(--font-mono); background: #D92D20; color: #fff; border-radius: 999px; padding: 1px 8px; }
.voce.rossa { color: var(--danger); }
.voce.rossa .sasso { background: var(--danger); color: var(--on-danger); }
.voce.prossima { color: var(--muted); cursor: default; }
.voce.prossima:hover { background: none; }
.voce.prossima .sasso { background: var(--surface-2); color: var(--muted); }
.voce .tag { margin-inline-start: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
/* I gruppi del menu (08/10/2026): la freccia gira, le voci dentro rientrano un poco. */
.voce .freccia { margin-inline-start: auto; width: 10px; height: 10px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s var(--ease-out, ease); flex: none; margin-inline-end: 8px; }
.voce .conta + .freccia { margin-inline-start: 10px; }
.voce.gruppo[aria-expanded="true"] .freccia { transform: rotate(225deg); }
.figli { display: grid; gap: 2px; padding-inline-start: 22px; margin-block: 2px 6px; border-inline-start: 2px solid var(--line); margin-inline-start: 26px; }
.voce.figlio { min-height: 52px; font-size: 1rem; font-weight: 600; }
.voce.figlio .sasso { width: 34px; height: 34px; }
.elenco-voci { display: grid; gap: 4px; padding: var(--s-2); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-1); }
@media (prefers-reduced-motion: reduce) { .voce .freccia { transition: none; } }

/* Segnala: tocca la camera */
.scelte { display: grid; gap: 10px; margin-bottom: var(--s-4); }
.scelta { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 14px; font: inherit; color: var(--ink); text-align: start;
  background: var(--surface); border: 2px solid var(--line); border-radius: 18px; cursor: pointer; }
.scelta .numero { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 800; flex: none; }
.scelta b { display: block; font-size: 1.2rem; }
.scelta span span { font-size: var(--text-sm); color: var(--muted); }
.file-nascosto { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-nascosto:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.tasto-foto { min-height: 64px; white-space: normal; font-weight: 700; }

/* Account di prova (F2c): il bollino accanto al nome, sempre ben visibile (colore pieno: non si confonde con un'etichetta di stato). */
.bollino-prova { display: inline-block; vertical-align: middle; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: #6a1b9a; color: #fff;
  font: 700 10.5px/1.6 var(--font-mono, ui-monospace, monospace); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
html[data-tema="scuro"] .bollino-prova { background: #ce93d8; color: #2a0a33; }

/* I lavori dei manutentori (sezioni/manutenzione.js, 23/10/2026). */
.scheda-lavoro { display: grid; gap: .35rem; width: 100%; text-align: left; }
.scheda-lavoro p { margin: 0; }
.giorni-liberi { display: flex; flex-wrap: wrap; gap: .5rem; }
.giorni-liberi button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-bordo); color: var(--accent-ink); }

/* I codici delle strutture (public/sezioni/codici.js): voce piccola, valore grande e leggibile. */
.codici-valori { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: baseline; margin: 12px 0 4px; }
.codici-valori dt { color: var(--muted, #666); }
.codici-valori dd { margin: 0; font: 700 1.5rem/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; }

/* «Nuovo elenco» (sezioni/nuovo_elenco.js, 24/10/2026): le scelte grandi di casa, posto e urgenza; la riga in giallo. */
.scelte-elenco { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.scelte-elenco button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-bordo); color: var(--accent-ink); }
.card--dubbio { border: 2px solid var(--warn, #d68910); }

/* Attesa della posizione al tocco (27/10/2026, app.js posizioneAlTocco): velo con la ruota e i secondi. */
.attesa-posizione { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px; padding: 24px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 1.15rem;
  text-align: center; }
.attesa-posizione__ruota { width: 48px; height: 48px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .3);
  border-top-color: #fff; animation: attesa-gira 0.9s linear infinite; }
@keyframes attesa-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .attesa-posizione__ruota { animation-duration: 3s; } }

/* «Guarda come…» (solo titolari, public/app.js bandaGuarda): banda fissa in alto, sopra a tutto */
.banda-guarda { position: fixed; top: 0; left: 0; right: 0; z-index: 70; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: #AA3329; color: #fff; font: 500 14px/1.3 var(--font-body); }
.banda-guarda-esci { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.7); background: transparent; color: #fff; font: 600 14px/1 var(--font-body); }
html.con-banda-guarda body { padding-top: calc(52px + env(safe-area-inset-top)); }
.banda-guarda-tasti { display: flex; gap: 8px; }
/* «Telefono» nella vista «Guarda come…»: l'app vera in un iframe grande come un iPhone (390x844), sotto la banda. */
.guarda-telefono { position: fixed; inset: 0; z-index: 69; display: flex; align-items: center; justify-content: center;
  padding: calc(60px + env(safe-area-inset-top)) 16px 16px; background: #2b2b2b; }
.guarda-telefono-schermo { width: 390px; height: 844px; max-height: 100%; border: 0; border-radius: 40px; background: #fff;
  box-shadow: 0 0 0 10px #111, 0 20px 60px rgba(0,0,0,.5); }

/* Face ID ogni ora (public/faceid_ora.js, Giuseppe 29/10/2026): popup sopra la schermata, che resta sotto com'era. */
.faceid-ora-velo { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: var(--s-4); background: var(--velo); }
.faceid-ora { width: 100%; max-width: 400px; display: grid; gap: var(--s-3); padding: var(--s-5) var(--s-4) var(--s-4); background: var(--surface); color: var(--ink); border-radius: 20px; box-shadow: var(--shadow-2); }
.faceid-ora h2 { margin: 0; font-size: var(--text-lg); }
