/* ============================================================================
   SISTEMA DI DESIGN — token
   ----------------------------------------------------------------------------
   App generica di guida a piedi con audioguida: il sistema non deve contenere
   nulla che appartenga a una singola città. La sua fonte è il mestiere della
   segnaletica di orientamento — cartelli, mappe di trasporto, segnavia,
   cippi chilometrici, timbri di tappa. Cioè: massima leggibilità all'aperto,
   e ornamento solo quando porta informazione.

   Regole del sistema, da rispettare quando si aggiunge codice:
     · ACCENT è l'azione. Un solo bottone primario per schermata.
     · CHROME è la cornice: barre, testate, velature sulle immagini.
     · INFO è la struttura e il dato: link, etichette, valori.
     · REWARD è solo ciò che si conquista: passaporto, sigilli, valutazioni.
     · Niente texture, niente motivi dietro al testo. Mai.
     · I contenuti stanno in campi delimitati da una linea sottile prima che
       da un'ombra.
   ========================================================================== */

:root {
  /* --- Cornice: scura, così i contenuti chiari restano leggibili al sole --- */
  --pt-chrome:      #123E5E;
  --pt-chrome-deep: #0B2030;

  /* --- Azione --------------------------------------------------------------- */
  --pt-accent:      #C0452A;
  --pt-accent-dark: #93321E;
  --pt-accent-200:  #F1C4B8;
  --pt-accent-tint: #FAE9E4;

  /* --- Informazione e struttura -------------------------------------------- */
  --pt-info:      #1C6091;
  --pt-info-2:    #8FB4CE;
  --pt-info-200:  #CFDFEA;
  --pt-info-tint: #E8EFF5;

  /* --- Ricompensa: solo dove c'è qualcosa da conquistare ------------------- */
  --pt-reward:      #C08A2A;
  --pt-reward-dark: #8A6412;
  --pt-reward-tint: #F7EBD2;

  /* --- Stati ---------------------------------------------------------------- */
  --pt-ok:      #1F6B4F;
  --pt-ok-tint: #E4F0EA;
  --pt-danger:  #A32E20;

  /* --- Superfici ----------------------------------------------------------- */
  --pt-surface:   #EFF1EE;
  --pt-surface-2: #E7EAE7;
  --pt-card:      #FFFFFF;

  /* --- Testo --------------------------------------------------------------- */
  --pt-text:    #16232E;
  --pt-text-80: #263544;
  --pt-text-75: #35424C;
  --pt-text-70: #45535E;
  --pt-text-65: #536169;
  --pt-text-60: #5C6A75;
  --pt-text-55: #6B7883;
  --pt-text-45: #7D8A93;
  --pt-text-40: #8B979F;
  --pt-text-35: #A6B0B6;

  /* --- Linee --------------------------------------------------------------- */
  --pt-line:       #DDE3E6;
  --pt-line-2:     #C9D0D4;
  --pt-hairline:   rgba(18, 62, 94, 0.13);
  --pt-hairline-2: rgba(18, 62, 94, 0.22);

  /* --- Ombre: due, corte e basse ------------------------------------------ */
  --pt-shadow-1: 0 1px 2px rgba(18, 62, 94, 0.05), 0 2px 6px rgba(18, 62, 94, 0.05);
  --pt-shadow-2: 0 2px 6px rgba(18, 62, 94, 0.07), 0 12px 28px rgba(18, 62, 94, 0.09);
  --pt-shadow-nav: 0 8px 28px rgba(11, 32, 48, 0.30);

  /* --- Raggi --------------------------------------------------------------- */
  --pt-r-sm:   10px;
  --pt-r:      16px;
  --pt-r-lg:   22px;
  --pt-r-pill: 999px;
  --pt-card-radius: var(--pt-r);

  /* --- Tipografia ---------------------------------------------------------- */
  /* Una sola famiglia, Archivo, in due larghezze: è il modo in cui lavorano i
     sistemi di segnaletica. Il carattere largo fa il titolo, quello normale
     l'interfaccia. Un solo file variabile da scaricare: conta, in una PWA che
     deve funzionare anche offline. */
  --pt-font-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pt-font-display: var(--pt-font-body);
  --pt-wide: 116%;

  --pt-t-eyebrow: 700 11px/1.3 var(--pt-font-body);
  --pt-t-body:    400 15px/1.55 var(--pt-font-body);

  /* --- Larghezza della colonna di lettura su schermi grandi --------------- */
  --pt-col: 760px;

  /* --- Movimento: due tempi ----------------------------------------------- */
  --pt-ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --pt-fast: 150ms;
  --pt-med:  260ms;

  /* --- Ponte verso Bootstrap --------------------------------------------- */
  --bs-primary: #C0452A;
  --bs-primary-rgb: 192, 69, 42;
  --bs-secondary: #1C6091;
  --bs-secondary-rgb: 28, 96, 145;
  --bs-body-font-family: var(--pt-font-body);
  --bs-body-color: #16232E;
  --bs-body-bg: #EFF1EE;
  --bs-border-color: #DDE3E6;
  --bs-link-color: #1C6091;
  --bs-link-color-rgb: 28, 96, 145;
  --bs-link-hover-color: #123E5E;
  --bs-emphasis-color: #16232E;
  --bs-secondary-color: rgba(22, 35, 46, 0.62);
}

/* ============================================================================
   BASE STRUTTURALE
   Layout e comportamenti dei componenti: invariati nella sostanza. I valori
   di colore sono ricondotti ai token, cosi' una modifica di palette si
   propaga da sola a tutta l'app.
   ========================================================================== */

body {
  background-color: var(--pt-surface);
  padding-bottom: 76px; /* spazio per la bottom nav fissa */
}

/* Header con badge lingua */
.pt-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--pt-card);
  border-bottom: 1px solid rgba(18, 62, 94, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}

.pt-topbar h1 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--bs-primary);
}

.pt-lang-badge {
  display: flex;
  gap: 4px;
  background: var(--pt-accent-200);
  border-radius: 999px;
  padding: 3px;
}

.pt-lang-badge a {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--pt-accent-dark);
}

.pt-lang-badge a.active {
  background: var(--bs-primary);
  color: var(--pt-card);
}

/* Chip categoria */
.pt-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(18, 62, 94, 0.13);
  color: var(--pt-text-70);
  text-decoration: none;
  white-space: nowrap;
  background: var(--pt-card);
}

.pt-chip.active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: var(--pt-card);
}

.pt-chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.pt-chip-row::-webkit-scrollbar {
  display: none;
}

/* Card POI in lista */
.pt-poi-card {
  display: flex;
  gap: 12px;
  background: var(--pt-card);
  border-radius: var(--pt-card-radius);
  padding: 10px;
  margin: 0 16px 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(18, 62, 94, 0.07);
}

.pt-poi-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  flex-shrink: 0;
  background-color: var(--bs-secondary);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pt-card);
  font-size: 22px;
}

.pt-poi-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--pt-text);
}

.pt-poi-card p {
  font-size: 12px;
  color: var(--pt-text-60);
  margin: 0;
}

.pt-badge-cat {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pt-info-tint);
  color: var(--pt-info);
  margin-top: 4px;
}

/* Dettaglio POI */
.pt-hero {
  width: 100%;
  height: 190px;
  background-color: var(--bs-secondary);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pt-card);
  font-size: 48px;
}

.pt-listen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 12px 16px;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: var(--bs-primary);
  color: var(--pt-card);
  font-weight: 600;
  font-size: 14px;
}

.pt-listen-btn:active {
  opacity: 0.85;
}

.pt-listen-btn.speaking {
  background: var(--bs-secondary);
}

/* Bottom navigation */
.pt-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  background: var(--pt-card);
  border-top: 1px solid rgba(18, 62, 94, 0.09);
  padding: 6px 4px max(6px, env(safe-area-inset-bottom));
  z-index: 20;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}

.pt-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 500;
  color: var(--pt-text-45);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 12px;
  flex: 1;
  max-width: 76px;
  transition: background-color 0.15s ease;
}

.pt-bottom-nav a i {
  font-size: 21px;
}

.pt-bottom-nav a.active {
  color: var(--bs-primary);
  background: var(--pt-accent-tint);
}

/* Itinerari */
.pt-itin-card {
  background: var(--pt-card);
  border-radius: var(--pt-card-radius);
  padding: 14px;
  margin: 0 16px 12px;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 0 1px 3px rgba(18, 62, 94, 0.07);
}

.pt-itin-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--pt-text);
}

.pt-itin-card p {
  font-size: 12px;
  color: var(--pt-text-60);
  margin: 0 0 6px;
}

.pt-tappa {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(18, 62, 94, 0.07);
  text-decoration: none;
  color: inherit;
}

.pt-tappa-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bs-primary);
  color: var(--pt-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

#pt-map {
  width: 100%;
  height: calc(100vh - 130px);
}

/* Ricerca */
.pt-search {
  padding: 4px 16px 8px;
}

.pt-search input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(18, 62, 94, 0.13);
  padding: 9px 16px;
  font-size: 14px;
  background: var(--pt-card);
}

.pt-search input:focus {
  outline: none;
  border-color: var(--bs-primary);
}

/* Riga azioni: preferiti / vicino a te */
.pt-action-row {
  display: flex;
  gap: 8px;
  padding: 4px 16px 8px;
}

.pt-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(18, 62, 94, 0.13);
  background: var(--pt-card);
  color: var(--pt-text-70);
}

.pt-action-btn.active {
  background: var(--bs-secondary);
  border-color: var(--bs-secondary);
  color: var(--pt-card);
}

.pt-action-btn.loading {
  opacity: 0.6;
}

/* Stella preferiti sulla card: area di tocco 40x40 (standard mobile),
   anche se l'icona visibile resta piccola, per evitare tap "persi"
   che finiscono sul link della card sottostante.
   SVG inline invece di icona a font: nessuna dipendenza da CDN esterni
   che potrebbero non caricarsi, e stato contorno/pieno invece del solo
   colore, per una differenza impossibile da non notare.
   !important sul colore: alcuni contesti (es. h3 dentro .pt-poi-card)
   hanno regole di colore più specifiche che altrimenti vincerebbero
   la cascata CSS sullo stato "non preferito". */
.pt-fav-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: -3px 4px -3px -5px;
  vertical-align: middle;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s ease, background-color 0.15s ease;
}

.pt-fav-star path {
  fill: none;
  stroke: var(--pt-line-2) !important;
  stroke-width: 2px;
  transition: fill 0.15s ease, stroke 0.15s ease;
}

.pt-fav-star:active {
  transform: scale(1.2);
  background-color: rgba(192, 69, 42, 0.12);
}

.pt-fav-star.is-fav path {
  fill: var(--bs-primary) !important;
  stroke: var(--bs-primary) !important;
}

.pt-poi-card {
  align-items: flex-start;
}

.pt-distance-badge {
  display: inline-block;
  font-size: 11px;
  color: var(--bs-secondary);
  margin-top: 4px;
  margin-left: 6px;
}

/* Eventi */
.pt-evento-card {
  display: flex;
  gap: 12px;
  background: var(--pt-card);
  border-radius: var(--pt-card-radius);
  padding: 12px;
  margin: 0 16px 12px;
  box-shadow: 0 1px 3px rgba(18, 62, 94, 0.07);
}

.pt-evento-date {
  min-width: 48px;
  text-align: center;
  background: var(--pt-reward-tint);
  color: var(--pt-reward-dark);
  border-radius: 10px;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.pt-evento-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
}

.pt-evento-card p {
  font-size: 12px;
  color: var(--pt-text-60);
  margin: 0;
}

/* Statistiche percorso itinerario */
.pt-route-stats {
  display: flex;
  gap: 10px;
  margin: 4px 16px 12px;
}

.pt-stat-card {
  flex: 1;
  background: var(--pt-card);
  border-radius: var(--pt-card-radius);
  padding: 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(18, 62, 94, 0.07);
}

.pt-stat-card i {
  font-size: 20px;
  color: var(--bs-secondary);
}

.pt-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--pt-text);
  margin: 4px 0 0;
  line-height: 1;
}

.pt-stat-label {
  font-size: 10px;
  color: var(--pt-text-45);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.pt-route-stats.loading .pt-stat-value {
  color: var(--pt-line-2);
}

.pt-open-route-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(18, 62, 94, 0.13);
  background: var(--pt-card);
  color: var(--pt-text);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

/* Card CTA "crea il tuo tour" */
.pt-cta-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--pt-accent), var(--pt-accent-dark));
  border-radius: var(--pt-card-radius);
  padding: 14px;
  margin: 0 16px 16px;
  text-decoration: none;
  color: var(--pt-card);
  box-shadow: 0 3px 10px rgba(192, 69, 42, 0.25);
}

.pt-cta-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.pt-cta-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--pt-card);
}

.pt-cta-card p {
  font-size: 11px;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

/* Builder del tour personalizzato */
.pt-cat-toggle {
  border: none;
  cursor: pointer;
}

.pt-cat-toggle.active {
  background: var(--bs-secondary);
  border-color: var(--bs-secondary);
  color: var(--pt-card);
}

.pt-builder-section {
  padding: 8px 16px 4px;
}

.pt-builder-section h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pt-text-45);
  margin: 12px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-builder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--pt-card);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  box-shadow: 0 1px 2px rgba(18, 62, 94, 0.06);
  cursor: pointer;
}

.pt-builder-item input {
  display: none;
}

.pt-builder-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--pt-line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
}

.pt-builder-item.checked .pt-builder-checkbox {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: var(--pt-card);
}

.pt-builder-item-text {
  display: flex;
  flex-direction: column;
}

.pt-builder-item-text strong {
  font-size: 13px;
  color: var(--pt-text);
}

.pt-builder-item-text small {
  font-size: 11px;
  color: var(--pt-text-45);
}

.pt-builder-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--pt-card);
  border-top: 1px solid rgba(18, 62, 94, 0.09);
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  z-index: 25;
  box-shadow: 0 -2px 10px rgba(18, 62, 94, 0.07);
}

.pt-builder-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pt-min-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--pt-accent-dark);
  background: var(--pt-accent-tint);
  border-radius: 8px;
  padding: 6px 10px;
  margin: 0 0 8px;
}

.pt-builder-bar span {
  font-size: 12px;
  color: var(--pt-text-60);
  font-weight: 500;
}

.pt-builder-bar button {
  background: var(--bs-primary);
  color: var(--pt-card);
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-builder-bar button:disabled {
  background: var(--pt-line);
  color: var(--pt-text-45);
}

/* Selettori punto di partenza / arrivo */
.pt-endpoints {
  display: flex;
  gap: 10px;
  margin: 0 16px 12px;
}

.pt-endpoint-field {
  flex: 1;
  background: var(--pt-card);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 1px 2px rgba(18, 62, 94, 0.06);
}

.pt-endpoint-field label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--pt-text-45);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.pt-endpoint-field select {
  width: 100%;
  border: none;
  font-size: 13px;
  color: var(--pt-text);
  background: transparent;
  padding: 2px 0;
}

.pt-endpoint-field select:focus {
  outline: none;
}

/* Toggle ottimizzazione percorso nel builder */
.pt-optimize-toggle {
  margin: 0 16px 4px;
  border: 1.5px solid transparent;
}

.pt-optimize-toggle.checked {
  border-color: var(--bs-secondary);
  background: var(--pt-info-tint);
}

.pt-optimize-toggle .pt-builder-checkbox {
  border-radius: 50%;
}

.pt-optimize-toggle.checked .pt-builder-checkbox {
  background: var(--bs-secondary);
  border-color: var(--bs-secondary);
}

.pt-future-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--pt-text-40);
  font-style: italic;
  margin: 0 16px 8px;
}

/* Badge tipo ordinamento nel risultato del tour personalizzato */
.pt-order-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--pt-info-tint);
  color: var(--pt-info);
  margin: 0 16px 8px;
}

.pt-savings-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--pt-info);
  font-weight: 600;
  margin: 0 16px 10px;
}

.pt-savings-note-neutral {
  color: var(--pt-text-55);
  font-weight: 400;
}

/* Toast di conferma (preferiti aggiunti/rimossi, avvisi) */
#pt-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%) translateY(20px);
  background: var(--pt-text);
  color: var(--pt-card);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(11, 32, 48, 0.26);
  max-width: 85%;
  text-align: center;
}

#pt-toast.pt-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#pt-toast.pt-toast-warning {
  background: var(--pt-accent-dark);
}

/* Barra "Avvia percorso" + progresso tappe visitate */
.pt-tracking-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 16px 10px;
}

.pt-tracking-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 10px;
  border: none;
  background: var(--bs-primary);
  color: var(--pt-card);
  white-space: nowrap;
}

.pt-tracking-btn.active {
  background: var(--bs-secondary);
}

.pt-tracking-btn.active .pt-tracking-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pt-card);
  animation: pt-pulse 1.4s infinite;
}

.pt-tracking-progress {
  font-size: 12px;
  color: var(--pt-text-60);
  font-weight: 500;
  text-align: right;
}

@keyframes pt-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}

/* Marker "tu sei qui" sulla mappa */
.pt-user-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a73e8;
  border: 3px solid var(--pt-card);
  box-shadow: 0 0 0 2px #1a73e8, 0 2px 6px rgba(11, 32, 48, 0.42);
}

.pt-user-dot::after {
  content: "";
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 50%;
  background: rgba(26, 115, 232, 0.25);
  animation: pt-pulse 1.8s infinite;
}

/* Pulsante "segna come visitata" su ogni tappa */
.pt-tappa {
  position: relative;
  padding-right: 52px;
}

.pt-tappa-check {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--pt-line);
  background: var(--pt-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pt-line-2);
  flex-shrink: 0;
}

.pt-tappa-check:active {
  transform: translateY(-50%) scale(1.1);
}

.pt-tappa-check.visitata {
  background: var(--bs-secondary);
  border-color: var(--bs-secondary);
  color: var(--pt-card);
}

.pt-tappa.visitata .pt-tappa-nome {
  color: var(--pt-text-40);
  text-decoration: line-through;
}

.pt-tappa.visitata .pt-tappa-num {
  background: var(--bs-secondary);
  opacity: 0.6;
}

/* Marker numerati sulla mappa: stato visitato */
.pt-marker-visitata {
  opacity: 0.55;
}

/* Durata totale itinerario: cammino + tempo di visita stimato */
.pt-duration-breakdown {
  text-align: center;
  font-size: 11px;
  color: var(--pt-text-45);
  margin: -6px 16px 10px;
}

/* Bottone "Condividi la tua posizione" */
.pt-locate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 0 16px 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(28, 96, 145, 0.3);
  background: var(--pt-info-tint);
  color: var(--bs-secondary);
  font-weight: 600;
  font-size: 13px;
}

.pt-locate-btn.active {
  background: var(--bs-secondary);
  color: var(--pt-card);
  border-color: var(--bs-secondary);
}

.pt-locate-btn.loading {
  opacity: 0.6;
}

.pt-locate-status {
  text-align: center;
  font-size: 11px;
  color: var(--pt-accent-dark);
  margin: -4px 16px 10px;
}

/* Contatore tappe visitate */
.pt-visited-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--pt-info);
  font-weight: 600;
  margin: 0 16px 8px;
}

.pt-visited-counter .pt-progress-track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--pt-info-tint);
  overflow: hidden;
}

.pt-visited-counter .pt-progress-fill {
  height: 100%;
  background: var(--bs-secondary);
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* Riga tappa: ora ospita anche il toggle "visitata" */
.pt-tappa {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(18, 62, 94, 0.07);
  text-decoration: none;
  color: inherit;
}

.pt-tappa-info {
  flex: 1;
  min-width: 0;
}

.pt-tappa.pt-tappa-visited .pt-tappa-num {
  background: var(--bs-secondary);
}

.pt-tappa.pt-tappa-visited .pt-tappa-info > div:first-child {
  color: var(--pt-text-45);
  text-decoration: line-through;
}

.pt-tappa.pt-tappa-nearby {
  background: var(--pt-accent-tint);
  margin: 0 -16px;
  padding: 10px 16px;
  border-radius: 8px;
}

.pt-visited-toggle {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--pt-line);
  background: var(--pt-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pt-line-2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pt-visited-toggle svg {
  width: 18px;
  height: 18px;
}

.pt-visited-toggle path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pt-visited-toggle.is-visited {
  background: var(--bs-secondary);
  border-color: var(--bs-secondary);
  color: var(--pt-card);
}

/* Marker "la tua posizione" sulla mappa */
.pt-user-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a73e8;
  border: 3px solid var(--pt-card);
  box-shadow: 0 0 0 2px #1a73e8, 0 2px 6px rgba(11, 32, 48, 0.42);
}

/* Menu account nel topbar */
.pt-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pt-account-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--pt-surface-2);
  color: var(--bs-primary);
  font-size: 19px;
}

.pt-account-dropdown {
  min-width: 200px;
  padding: 8px 0;
  border: none;
  box-shadow: 0 4px 16px rgba(18, 62, 94, 0.16);
  border-radius: 12px;
}

.pt-account-email {
  font-size: 11px;
  color: var(--pt-text-45);
  word-break: break-all;
  padding: 2px 16px 6px;
}

.pt-account-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 8px 16px;
}

.pt-logout-item {
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  color: var(--pt-accent-dark);
}

/* Card CTA "crea un account" per anonimi */
.pt-account-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  background: var(--pt-accent-tint);
  border-radius: var(--pt-card-radius);
  padding: 20px 16px;
  margin: 16px;
}

.pt-account-cta i {
  font-size: 28px;
  color: var(--bs-primary);
}

.pt-account-cta p {
  font-size: 13px;
  color: var(--pt-text-70);
  margin: 0;
}

.pt-account-cta a {
  display: inline-block;
  background: var(--bs-primary);
  color: var(--pt-card);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 20px;
  border-radius: 999px;
  text-decoration: none;
}

/* Form di autenticazione (login/signup) */
.pt-auth-form {
  padding: 8px 16px;
}

.pt-auth-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pt-text-70);
  margin-bottom: 4px;
  display: block;
}

.pt-auth-form .form-control {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 14px;
}

.pt-auth-form .invalid-feedback {
  display: block;
  margin-top: -10px;
  margin-bottom: 12px;
}

.pt-auth-submit {
  width: 100%;
  background: var(--bs-primary);
  color: var(--pt-card);
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 14px;
}

.pt-auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--pt-text-45);
  font-size: 12px;
  margin: 16px 0;
}

.pt-auth-divider::before, .pt-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(18, 62, 94, 0.11);
}

.pt-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--pt-card);
  border: 1px solid rgba(18, 62, 94, 0.16);
  border-radius: 10px;
  padding: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--pt-text-80);
  text-decoration: none;
}

.pt-auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--pt-text-65);
  margin-top: 6px;
}

.pt-auth-switch a {
  color: var(--bs-primary);
  font-weight: 600;
  text-decoration: none;
}

/* Card tour salvato (I miei tour) */
.pt-tour-card {
  position: relative;
}

.pt-tour-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--pt-accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* Bottone salva tour su itinerario personalizzato */
.pt-save-tour-box {
  margin: 0 16px 16px;
  padding: 14px;
  background: var(--pt-card);
  border-radius: var(--pt-card-radius);
  box-shadow: 0 1px 3px rgba(18, 62, 94, 0.07);
}

.pt-save-tour-box input[type="text"] {
  width: 100%;
  border: 1px solid rgba(18, 62, 94, 0.16);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  margin-bottom: 10px;
}

.pt-save-tour-box button {
  width: 100%;
  background: var(--bs-secondary);
  color: var(--pt-card);
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-weight: 600;
  font-size: 13px;
}

/* ============================================================
   PASSAPORTO DI PALERMO (gamification)
   ============================================================ */

/* Hero con percentuale e barra di completamento */
.pt-passport-hero {
  margin: 12px 16px 4px;
  padding: 18px;
  border-radius: var(--pt-card-radius);
  background: linear-gradient(135deg, var(--bs-secondary), var(--pt-info));
  color: var(--pt-card);
}

.pt-passport-sub {
  font-size: 13px;
  opacity: 0.9;
  margin: 0 0 16px;
  line-height: 1.5;
}

.pt-passport-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pt-passport-pct {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.pt-passport-count {
  font-size: 13px;
  opacity: 0.9;
}

.pt-passport-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.pt-passport-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--pt-card);
  transition: width 0.4s ease;
}

/* Intestazione sezione riusabile */
.pt-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 22px 16px 10px;
}

.pt-section-head h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.pt-section-count {
  font-size: 12px;
  color: var(--bs-secondary);
  font-weight: 600;
}

/* Griglia badge */
.pt-badge-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 16px;
}

.pt-badge-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--pt-card-radius);
  background: var(--pt-card);
  box-shadow: 0 1px 3px rgba(18, 62, 94, 0.07);
}

.pt-badge-item.is-locked {
  background: var(--pt-surface-2);
  box-shadow: none;
}

.pt-badge-icon {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
}

.pt-badge-item.is-unlocked .pt-badge-icon {
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
}

.pt-badge-item.is-locked .pt-badge-icon {
  background: rgba(18, 62, 94, 0.06);
  color: var(--pt-text-40);
}

.pt-badge-lock {
  position: absolute;
  right: -2px;
  bottom: -2px;
  font-size: 14px;
  background: var(--pt-card);
  border-radius: 50%;
  padding: 2px;
  color: var(--pt-text-45);
}

.pt-badge-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pt-badge-text strong {
  font-size: 14px;
  font-weight: 600;
}

.pt-badge-item.is-locked .pt-badge-text strong {
  color: var(--pt-text-55);
}

.pt-badge-text small {
  font-size: 12px;
  color: var(--pt-text-60);
  line-height: 1.4;
}

.pt-badge-progress {
  font-size: 11px;
  font-weight: 600;
  color: var(--bs-secondary);
  margin-top: 2px;
}

/* Griglia "da collezionare" dei luoghi */
.pt-collect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 16px;
}

.pt-collect-item {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.pt-collect-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  background-color: var(--bs-secondary);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pt-card);
  font-size: 26px;
}

.pt-collect-item.is-locked .pt-collect-thumb {
  background-color: var(--pt-line-2);
  color: var(--pt-text-40);
  filter: grayscale(1);
}

.pt-collect-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bs-primary);
  color: var(--pt-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(11, 32, 48, 0.32);
}

.pt-collect-name {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.3;
}

.pt-collect-item.is-locked .pt-collect-name {
  color: var(--pt-text-40);
}

.pt-collect-date {
  font-size: 10px;
  color: var(--bs-secondary);
  margin-top: 2px;
}

.pt-collect-date.pt-collect-todo {
  color: var(--pt-text-40);
}

.pt-passport-empty {
  margin: 0 16px 4px;
  padding: 16px;
  border-radius: var(--pt-card-radius);
  background: rgba(var(--bs-primary-rgb), 0.06);
  color: var(--pt-accent-dark);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* Toast celebrativo per lo sblocco badge (diverso dal toast normale) */
#pt-toast.pt-toast-badge {
  background: linear-gradient(135deg, var(--bs-primary), var(--pt-accent-dark));
  color: var(--pt-card);
  font-weight: 600;
  padding: 14px 20px;
  box-shadow: 0 6px 24px rgba(var(--bs-primary-rgb), 0.5);
}

#pt-toast.pt-toast-badge .ti {
  margin-right: 8px;
  vertical-align: -2px;
}

/* ============================================================
   CONDIVISIONE TOUR (link pubblico)
   ============================================================ */

/* Badge "Tour condiviso" in cima alla pagina pubblica */
.pt-shared-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--bs-secondary);
  background: rgba(var(--bs-secondary-rgb), 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

/* Bottone "Condividi" nella pagina del tour (proprietario) */
.pt-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--bs-secondary);
  background: var(--pt-card);
  color: var(--bs-secondary);
  font-weight: 600;
  font-size: 13px;
}

.pt-share-btn:active {
  background: rgba(var(--bs-secondary-rgb), 0.08);
}

/* Azioni sulle card di "I miei tour" (condividi + elimina affiancati) */
.pt-tour-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}

.pt-tour-share {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(var(--bs-secondary-rgb), 0.1);
  color: var(--bs-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* Nella pagina "I miei tour" il delete non è più in posizione assoluta:
   ora vive dentro .pt-tour-actions insieme al bottone condividi. */
.pt-tour-actions .pt-tour-delete {
  position: static;
  top: auto;
  right: auto;
}

/* Bottone "Salva una copia" nella pagina pubblica (utente loggato) */
.pt-save-copy-box {
  margin: 4px 16px 16px;
}

.pt-save-copy-box button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bs-secondary);
  color: var(--pt-card);
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: 600;
  font-size: 14px;
}

/* Banner di acquisizione nella pagina pubblica (visitatore anonimo) */
.pt-acquire-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 16px 20px;
  padding: 16px;
  border-radius: var(--pt-card-radius);
  background: linear-gradient(135deg, var(--bs-primary), var(--pt-accent-dark));
  color: var(--pt-card);
  text-decoration: none;
}

.pt-acquire-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.pt-acquire-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pt-acquire-text strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.pt-acquire-text small {
  font-size: 12px;
  opacity: 0.9;
  line-height: 1.4;
}

.pt-acquire-cta {
  flex-shrink: 0;
  background: var(--pt-card);
  color: var(--bs-primary);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ============================================================
   AUDIOGUIDA GPS
   Toggle modalità, banner di conferma e player fisso in basso.
   ============================================================ */

/* Toggle "Audioguida" — sotto "Condividi la tua posizione", stesso
   linguaggio visivo (teal), con interruttore a destra per comunicare
   che è una modalità on/off, non un'azione una-tantum. */
.pt-audio-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 0 16px 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(28, 96, 145, 0.3);
  background: var(--pt-info-tint);
  color: var(--bs-secondary);
  font-weight: 600;
  font-size: 13px;
}

.pt-audio-toggle-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pt-audio-switch {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--pt-info-200);
  transition: background 0.2s ease;
}

.pt-audio-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pt-card);
  box-shadow: 0 1px 3px rgba(11, 32, 48, 0.26);
  transition: transform 0.2s ease;
}

.pt-audio-toggle.active {
  background: var(--bs-secondary);
  color: var(--pt-card);
  border-color: var(--bs-secondary);
}

.pt-audio-toggle.active .pt-audio-switch {
  background: rgba(255, 255, 255, 0.45);
}

.pt-audio-toggle.active .pt-audio-switch::after {
  transform: translateX(18px);
}

.pt-audio-status {
  color: var(--bs-secondary);
}

/* Banner di conferma "Vuoi ascoltare la storia di X?" — appare sopra il
   player/bottom-nav quando il GPS rileva la prossimità a una tappa. La
   narrazione parte solo se l'utente tocca "Ascolta" (gesto utente: anche
   il requisito iOS è soddisfatto). */
.pt-audio-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 60;
  background: var(--pt-card);
  border: 1px solid rgba(28, 96, 145, 0.25);
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: pt-audio-rise 0.22s ease;
}

@keyframes pt-audio-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pt-audio-banner-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pt-info-tint);
  color: var(--bs-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.pt-audio-banner-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.pt-audio-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.pt-audio-banner-actions button {
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  white-space: nowrap;
  cursor: pointer;
}

#pt-audio-banner-yes {
  background: var(--bs-secondary);
  color: var(--pt-card);
  display: flex;
  align-items: center;
  gap: 6px;
}

#pt-audio-banner-no {
  background: var(--pt-surface-2);
  color: var(--pt-text-65);
}

/* Player fisso: sostituisce visivamente la bottom-nav mentre la voce parla.
   Nome tappa a sinistra, controlli pausa/salta/stop a destra. Pensato per
   il pollice: bottoni ampi, contrasto alto. */
.pt-audio-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  background: var(--pt-chrome);
  color: var(--pt-card);
  padding: 10px 14px max(10px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 -3px 14px rgba(11, 32, 48, 0.22);
}

.pt-audio-player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.pt-audio-player-info > .ti {
  font-size: 22px;
  color: var(--pt-info-2);
  flex-shrink: 0;
}

.pt-audio-player-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pt-audio-player-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pt-info-2);
}

.pt-audio-player-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-audio-player-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pt-audio-player-controls button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--pt-card);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pt-audio-player-controls button:active {
  background: rgba(255, 255, 255, 0.28);
}

#pt-audio-pause {
  background: var(--pt-info-2);
  color: var(--pt-chrome);
}

#pt-audio-pause:active {
  background: var(--pt-info-2);
}

/* Bottone "Ascolta" manuale su ogni riga tappa (accanto alla spunta
   "visitata"). Discreto finché a riposo, si accende in teal al tocco. */
.pt-tappa-listen {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(28, 96, 145, 0.3);
  background: var(--pt-card);
  color: var(--bs-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pt-tappa-listen:active {
  background: var(--bs-secondary);
  color: var(--pt-card);
}

.pt-tappa-listen i {
  font-size: 18px;
}

/* ============================================================
   RECENSIONI CON FOTO
   Sezione nel dettaglio POI: media voto, galleria foto dei
   visitatori, commenti, form di invio e lightbox.
   ============================================================ */

.pt-flash-wrap { padding: 0 16px; }

.pt-flash {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}

.pt-flash-ok { background: var(--pt-info-tint); color: var(--pt-info); border: 1px solid rgba(28, 96, 145, .25); }
.pt-flash-error { background: var(--pt-accent-tint); color: var(--pt-accent-dark); border: 1px solid rgba(192, 69, 42,.3); }
.pt-flash i { font-size: 18px; flex-shrink: 0; }

.pt-reviews {
  padding: 20px 16px 8px;
  border-top: 8px solid rgba(0,0,0,.04);
  margin-top: 8px;
}

.pt-reviews-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pt-reviews-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pt-reviews-title i { color: var(--bs-primary); }

.pt-reviews-score {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pt-reviews-score-num { font-size: 20px; font-weight: 700; color: var(--bs-primary); }
.pt-reviews-score-stars { color: var(--pt-reward); font-size: 14px; line-height: 1; }
.pt-reviews-score-count { font-size: 12px; color: var(--pt-text-55); }

/* Striscia orizzontale di foto: scorre col pollice, niente griglia rigida. */
.pt-reviews-photos { margin-bottom: 18px; }

.pt-reviews-photos-label {
  font-size: 12px;
  color: var(--pt-text-55);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-reviews-photos-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.pt-reviews-photos-strip::-webkit-scrollbar { height: 0; }

.pt-review-thumb {
  flex: 0 0 auto;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  scroll-snap-align: start;
}

.pt-reviews-photos-strip .pt-review-thumb img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.pt-reviews-empty {
  font-size: 13px;
  color: var(--pt-text-45);
  text-align: center;
  padding: 18px 8px;
}

/* Singola recensione */
.pt-review {
  padding: 14px 0;
  border-top: 1px solid rgba(18, 62, 94, 0.08);
}

.pt-review-mine {
  background: var(--pt-card);
  border: 1px solid rgba(192, 69, 42,.2);
  border-radius: var(--pt-card-radius);
  padding: 14px;
  margin-bottom: 6px;
}

.pt-review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pt-review-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bs-secondary);
  color: var(--pt-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.pt-review-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pt-review-author { font-size: 13px; font-weight: 600; }
.pt-review-date { font-size: 11px; color: var(--pt-text-45); }

.pt-review-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pt-review-pending { background: var(--pt-reward-tint); color: var(--pt-reward-dark); }
.pt-review-rejected { background: var(--pt-surface-2); color: var(--pt-text-55); }

.pt-review-stars { color: var(--pt-reward); font-size: 14px; margin-top: 8px; line-height: 1; }

.pt-review-photo {
  display: block;
  margin-top: 10px;
  border: none;
  padding: 0;
  background: none;
  width: 100%;
  cursor: pointer;
}

.pt-review-photo img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.pt-review-text {
  font-size: 14px;
  color: var(--pt-text-75);
  line-height: 1.55;
  margin: 10px 0 0;
  white-space: pre-line;
}

.pt-review-delete {
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--pt-accent-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Form di invio */
.pt-review-form {
  margin-top: 18px;
  background: var(--pt-card);
  border: 1px solid rgba(18, 62, 94, 0.09);
  border-radius: var(--pt-card-radius);
  padding: 16px;
}

.pt-review-form-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pt-review-form-title i { color: var(--bs-primary); }
.pt-review-form-sub { font-size: 12px; color: var(--pt-text-55); margin: 4px 0 14px; }

.pt-review-form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pt-text-65);
  margin-bottom: 6px;
}

/* Stelle cliccabili in CSS puro: i radio sono in ordine 5->1 nel DOM, così
   `:checked ~ label` e `:hover ~ label` colorano la stella e tutte quelle
   alla sua sinistra (che nel DOM la seguono). Nessun JS necessario. */
.pt-star-input {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
  margin-bottom: 16px;
}

.pt-star-input input { display: none; }

.pt-star-input label {
  font-size: 26px;
  color: var(--pt-line);
  cursor: pointer;
  transition: color .12s ease, transform .12s ease;
  line-height: 1;
}

.pt-star-input label:hover,
.pt-star-input label:hover ~ label,
.pt-star-input input:checked ~ label {
  color: var(--pt-reward);
}

.pt-star-input label:active { transform: scale(1.18); }

/* Dropzone foto: grande, tocca-e-scegli, diventa anteprima dopo la scelta. */
.pt-photo-drop {
  position: relative;
  display: block;
  width: 100%;
  min-height: 132px;
  border: 2px dashed rgba(28, 96, 145, .35);
  border-radius: 12px;
  background: var(--pt-surface);
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 12px;
}

.pt-photo-drop-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--bs-secondary);
  font-size: 13px;
  font-weight: 500;
}

.pt-photo-drop-empty i { font-size: 30px; }

.pt-photo-preview {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  display: block;
}

.pt-photo-change {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0,0,0,.6);
  color: var(--pt-card);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pt-review-textarea {
  width: 100%;
  border: 1px solid rgba(18, 62, 94, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 12px;
}

.pt-review-textarea:focus {
  outline: none;
  border-color: var(--bs-secondary);
  box-shadow: 0 0 0 3px rgba(28, 96, 145, .12);
}

.pt-review-submit {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: var(--bs-primary);
  color: var(--pt-card);
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pt-review-submit:active { background: var(--pt-accent-dark); }

.pt-review-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed rgba(28, 96, 145, .35);
  border-radius: 12px;
  background: var(--pt-surface);
  color: var(--bs-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

/* Lightbox */
.pt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pt-lightbox img {
  max-width: 100%;
  max-height: 76vh;
  border-radius: 8px;
  object-fit: contain;
}

.pt-lightbox-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.15);
  color: var(--pt-card);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pt-lightbox-caption {
  margin-top: 14px;
  color: var(--pt-card);
  font-size: 13px;
  text-align: center;
  max-width: 560px;
  line-height: 1.5;
}

.pt-lightbox-caption strong { display: block; margin-bottom: 4px; color: var(--pt-info-2); }

/* ============================================================
   TOUR LAMPO
   Card in evidenza, form di input, badge risultato, casi limite.
   ============================================================ */

/* Variante teal della cta-card, per distinguere il Tour lampo dal
   builder classico (arancione). */
.pt-cta-lampo {
  background: linear-gradient(135deg, var(--pt-info), var(--pt-chrome));
  box-shadow: 0 3px 10px rgba(28, 96, 145, 0.28);
}

/* Sezioni del form */
.pt-lampo-section {
  padding: 16px;
  border-bottom: 8px solid rgba(18, 62, 94, 0.04);
}

.pt-lampo-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--pt-text-70);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-lampo-section h4 i { color: var(--bs-secondary); }

/* Chip tempo */
.pt-lampo-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.pt-lampo-chip {
  border: 1.5px solid rgba(28, 96, 145, 0.3);
  background: var(--pt-card);
  color: var(--bs-secondary);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pt-lampo-chip.active {
  background: var(--bs-secondary);
  color: var(--pt-card);
  border-color: var(--bs-secondary);
}

/* Radio partenza */
.pt-lampo-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid rgba(18, 62, 94, 0.11);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pt-lampo-radio.active {
  border-color: var(--bs-secondary);
  background: var(--pt-info-tint);
}

.pt-lampo-radio input { display: none; }

.pt-lampo-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--pt-line-2);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.15s ease;
}

.pt-lampo-radio.active .pt-lampo-radio-dot {
  border-color: var(--bs-secondary);
}

.pt-lampo-radio.active .pt-lampo-radio-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bs-secondary);
}

.pt-lampo-radio i { color: var(--bs-secondary); }

.pt-lampo-radio select {
  width: 100%;
  border: none;
  background: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--pt-text-80);
  padding: 2px 0;
}

.pt-lampo-radio select:disabled { color: var(--pt-text-40); }

.pt-lampo-gps-status {
  font-size: 12px;
  color: var(--bs-primary);
  margin: 4px 0 0;
  min-height: 16px;
}

/* Categorie */
.pt-lampo-cats { display: flex; flex-direction: column; gap: 8px; }

.pt-lampo-cat {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.pt-lampo-cat input { display: none; }

.pt-lampo-cat span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid rgba(18, 62, 94, 0.11);
  border-radius: 10px;
  font-size: 14px;
  width: 100%;
  transition: all 0.15s ease;
}

.pt-lampo-cat input:checked + span {
  border-color: var(--bs-secondary);
  background: var(--pt-info-tint);
  color: var(--bs-secondary);
  font-weight: 600;
}

/* Badge risultato: confronto tempo stimato vs budget */
.pt-lampo-badge {
  margin: 0 16px 12px;
  padding: 12px 14px;
  background: var(--pt-info-tint);
  border: 1px solid rgba(28, 96, 145, 0.25);
  border-radius: 12px;
}

.pt-lampo-badge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.pt-lampo-badge-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--bs-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.pt-lampo-badge-time {
  font-size: 12px;
  color: var(--pt-text-70);
  font-weight: 500;
}

.pt-lampo-bar {
  height: 8px;
  background: rgba(28, 96, 145, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.pt-lampo-bar span {
  display: block;
  height: 100%;
  background: var(--bs-secondary);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Casi limite (tempo insufficiente, nessun POI) */
.pt-lampo-limite {
  padding: 40px 24px;
  text-align: center;
}

.pt-lampo-limite-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--pt-reward-tint);
  color: var(--pt-reward-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 16px;
}

.pt-lampo-limite-text {
  font-size: 15px;
  color: var(--pt-text-75);
  line-height: 1.5;
  margin-bottom: 20px;
}

.pt-lampo-poi-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--pt-card);
  border: 1px solid rgba(18, 62, 94, 0.11);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  text-align: left;
  margin-bottom: 16px;
}

.pt-lampo-poi-cat {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--pt-info-tint);
  color: var(--bs-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.pt-lampo-poi-info { flex: 1; display: flex; flex-direction: column; }
.pt-lampo-poi-info strong { font-size: 14px; }
.pt-lampo-poi-info small { font-size: 12px; color: var(--pt-text-55); }

.pt-lampo-riprova {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--bs-secondary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* ============================================================
   TOUR COMMUNITY
   Directory tour pubblicati, racconto autore, form pubblicazione.
   ============================================================ */

/* Card nella directory */
.pt-community-card {
  display: block;
  background: var(--pt-card);
  border: 1px solid rgba(18, 62, 94, 0.09);
  border-radius: var(--pt-card-radius);
  padding: 14px 16px;
  margin: 0 16px 12px;
  text-decoration: none;
  color: inherit;
}

.pt-community-card-head h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 3px;
}

.pt-community-meta { font-size: 12px; color: var(--pt-text-55); }

.pt-community-racconto {
  font-size: 13px;
  color: var(--pt-text-70);
  line-height: 1.5;
  margin: 8px 0 0;
}

.pt-community-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.pt-community-copie {
  font-size: 12px;
  color: var(--bs-secondary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pt-community-go {
  font-size: 12px;
  color: var(--pt-text-40);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

/* Blocco racconto nel dettaglio itinerario */
.pt-racconto {
  margin: 4px 16px 16px;
  padding: 14px;
  background: var(--pt-card);
  border: 1px solid rgba(18, 62, 94, 0.08);
  border-radius: var(--pt-card-radius);
}

.pt-racconto-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pt-text-75);
}

.pt-racconto-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bs-secondary);
  color: var(--pt-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.pt-racconto-text {
  font-size: 14px;
  color: var(--pt-text-75);
  line-height: 1.55;
  margin: 0 0 10px;
  white-space: pre-line;
}

.pt-racconto-tip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 8px;
  font-size: 13px;
}

.pt-racconto-tip strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.pt-racconto-good { background: var(--pt-info-tint); color: var(--pt-info); }
.pt-racconto-bad { background: var(--pt-accent-tint); color: var(--pt-accent-dark); }
.pt-racconto-tip span { color: var(--pt-text-70); }

/* Bottone "Pubblica per la community" nel dettaglio */
.pt-publish-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--pt-info-tint);
  color: var(--bs-secondary);
  border: 1px solid rgba(28, 96, 145, 0.3);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

/* Form di pubblicazione */
.pt-publish-form { display: flex; flex-direction: column; }

.pt-publish-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--pt-text-70);
  margin: 14px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-publish-input,
.pt-publish-textarea {
  width: 100%;
  border: 1px solid rgba(18, 62, 94, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.pt-publish-textarea { resize: vertical; }

.pt-publish-input:focus,
.pt-publish-textarea:focus {
  outline: none;
  border-color: var(--bs-secondary);
  box-shadow: 0 0 0 3px rgba(28, 96, 145, 0.12);
}

.pt-publish-submit {
  margin-top: 20px;
  border: none;
  border-radius: 10px;
  background: var(--bs-secondary);
  color: var(--pt-card);
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pt-publish-submit:active { background: var(--pt-chrome); }

.pt-publish-nota {
  font-size: 12px;
  color: var(--pt-text-55);
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

.pt-publish-nota i { flex-shrink: 0; margin-top: 1px; }

/* ============================================================
   VIAGGIO DI GRUPPO
   Attivazione, lista partecipanti, invito, join pubblico.
   ============================================================ */

/* CTA di attivazione (proprietario) */
.pt-gruppo-attiva {
  margin: 8px 16px 16px;
  padding: 16px;
  background: var(--pt-card);
  border: 1px solid rgba(28, 96, 145, 0.25);
  border-radius: var(--pt-card-radius);
}

.pt-gruppo-attiva-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.pt-gruppo-attiva-head i {
  font-size: 26px;
  color: var(--bs-secondary);
  flex-shrink: 0;
}

.pt-gruppo-attiva-head strong { display: block; font-size: 15px; }
.pt-gruppo-attiva-head small { font-size: 12px; color: var(--pt-text-55); }

.pt-gruppo-permesso-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--pt-text-70);
  margin: 0 0 8px;
}

.pt-gruppo-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid rgba(18, 62, 94, 0.11);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pt-gruppo-radio.active {
  border-color: var(--bs-secondary);
  background: var(--pt-info-tint);
}

.pt-gruppo-radio input { display: none; }

.pt-gruppo-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--pt-line-2);
  flex-shrink: 0;
  position: relative;
}

.pt-gruppo-radio.active .pt-gruppo-radio-dot { border-color: var(--bs-secondary); }

.pt-gruppo-radio.active .pt-gruppo-radio-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bs-secondary);
}

.pt-gruppo-radio-text strong { display: block; font-size: 14px; }
.pt-gruppo-radio-text small { font-size: 12px; color: var(--pt-text-55); }

.pt-gruppo-attiva-btn {
  width: 100%;
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  background: var(--bs-secondary);
  color: var(--pt-card);
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pt-gruppo-attiva-btn:active { background: var(--pt-chrome); }

/* Gruppo attivo */
.pt-gruppo {
  margin: 8px 16px 16px;
  padding: 16px;
  background: var(--pt-card);
  border: 1px solid rgba(18, 62, 94, 0.09);
  border-radius: var(--pt-card-radius);
}

.pt-gruppo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pt-gruppo-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-gruppo-title i { color: var(--bs-secondary); }
.pt-gruppo-count { font-size: 12px; color: var(--pt-text-55); }

.pt-gruppo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--bs-secondary);
  background: var(--pt-info-tint);
  padding: 4px 8px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.pt-gruppo-lista { display: flex; flex-direction: column; gap: 8px; }

.pt-gruppo-membro {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pt-gruppo-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bs-secondary);
  color: var(--pt-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.pt-gruppo-nome { flex: 1; font-size: 14px; font-weight: 500; }
.pt-gruppo-nome small { display: block; font-size: 11px; color: var(--pt-text-45); font-weight: 400; }

.pt-gruppo-rimuovi {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--pt-surface-2);
  color: var(--pt-text-45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-gruppo-invita {
  width: 100%;
  margin-top: 14px;
  border: 1.5px solid var(--bs-secondary);
  border-radius: 10px;
  background: var(--pt-card);
  color: var(--bs-secondary);
  font-weight: 600;
  font-size: 14px;
  padding: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pt-gruppo-esci {
  width: 100%;
  margin-top: 8px;
  border: none;
  background: none;
  color: var(--pt-accent-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Join pubblico */
.pt-gruppo-join {
  margin: 8px 16px 16px;
  padding: 16px;
  background: linear-gradient(135deg, var(--pt-info), var(--pt-chrome));
  border-radius: var(--pt-card-radius);
  color: var(--pt-card);
  text-align: center;
}

.pt-gruppo-join-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.pt-gruppo-join-sub { font-size: 13px; color: rgba(255, 255, 255, 0.85); margin: 0 0 12px; }

.pt-gruppo-join-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: 10px;
  background: var(--pt-card);
  color: var(--bs-secondary);
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  cursor: pointer;
  text-decoration: none;
}

.pt-gruppo-join-full {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
}

/* ============================================================
   POI PROPOSTI DAGLI UTENTI
   Banner in esplora, form con mappa e duplicati, lista proposte.
   ============================================================ */

/* Banner "Segnala un luogo" in fondo a Esplora */
.pt-propose-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 16px 20px;
  padding: 14px;
  background: var(--pt-info-tint);
  border: 1px dashed rgba(28, 96, 145, 0.4);
  border-radius: var(--pt-card-radius);
  text-decoration: none;
  color: inherit;
}

.pt-propose-banner > i:first-child {
  font-size: 24px;
  color: var(--bs-secondary);
  flex-shrink: 0;
}

.pt-propose-banner strong { display: block; font-size: 14px; color: var(--bs-secondary); }
.pt-propose-banner small { font-size: 12px; color: var(--pt-text-60); }

/* Form di proposta */
.pt-propose-form { display: flex; flex-direction: column; }

.pt-propose-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--pt-text-70);
  margin: 14px 0 6px;
}

.pt-propose-hint { font-size: 12px; color: var(--pt-text-45); margin: 0 0 8px; }

.pt-propose-input,
.pt-propose-textarea {
  width: 100%;
  border: 1px solid rgba(18, 62, 94, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.pt-propose-textarea { resize: vertical; }

.pt-propose-input:focus,
.pt-propose-textarea:focus {
  outline: none;
  border-color: var(--bs-secondary);
  box-shadow: 0 0 0 3px rgba(28, 96, 145, 0.12);
}

#pt-propose-map {
  width: 100%;
  height: 260px;
  border-radius: 12px;
  border: 1px solid rgba(18, 62, 94, 0.11);
  margin-bottom: 10px;
}

/* Box duplicati vicini */
.pt-propose-vicini {
  background: var(--pt-card);
  border: 1px solid rgba(192, 69, 42, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 4px;
}

.pt-propose-vicini-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pt-accent-dark);
  margin: 0 0 8px;
}

.pt-propose-vicini ul { list-style: none; margin: 0 0 8px; padding: 0; }

.pt-propose-vicini li {
  font-size: 13px;
  color: var(--pt-text-70);
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-propose-vicini li i { color: var(--bs-secondary); }
.pt-propose-vicini li small { color: var(--pt-text-45); margin-left: auto; }
.pt-propose-vicini-nota { font-size: 11px; color: var(--pt-text-45); margin: 0; }

.pt-propose-submit {
  margin-top: 20px;
  border: none;
  border-radius: 10px;
  background: var(--bs-secondary);
  color: var(--pt-card);
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pt-propose-submit:active { background: var(--pt-chrome); }

/* Lista mie proposte */
.pt-proposta-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--pt-card);
  border: 1px solid rgba(18, 62, 94, 0.09);
  border-radius: var(--pt-card-radius);
  padding: 14px;
  margin-bottom: 10px;
}

.pt-proposta-info { flex: 1; }
.pt-proposta-info strong { display: block; font-size: 14px; }
.pt-proposta-info small { font-size: 12px; color: var(--pt-text-45); }

.pt-proposta-stato {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  white-space: nowrap;
}

.pt-proposta-attesa { background: var(--pt-reward-tint); color: var(--pt-reward-dark); }
.pt-proposta-ok { background: var(--pt-info-tint); color: var(--pt-info); }
.pt-proposta-no { background: var(--pt-surface-2); color: var(--pt-text-55); }

.pt-propose-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  padding: 12px;
  border: 1.5px solid var(--bs-secondary);
  border-radius: 10px;
  color: var(--bs-secondary);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* ============================================================
   MODIFICA TAPPE (editor itinerario)
   Lista ordinabile + aggiunta POI per categoria.
   ============================================================ */

.pt-edit-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  margin-left: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--pt-card);
  color: var(--bs-secondary);
  border: 1px solid rgba(28, 96, 145, 0.35);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.pt-edit-section {
  padding: 16px;
  border-bottom: 8px solid rgba(18, 62, 94, 0.04);
}

.pt-edit-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--pt-text-70);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-edit-section h4 i { color: var(--bs-secondary); }

/* Lista tappe attuali: l'ordine visivo è l'ordine salvato */
.pt-edit-list { list-style: none; margin: 0; padding: 0; }

.pt-edit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--pt-card);
  border: 1px solid rgba(18, 62, 94, 0.09);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.pt-edit-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bs-secondary);
  color: var(--pt-card);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pt-edit-nome {
  flex: 1;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pt-edit-nome i { color: var(--bs-secondary); flex-shrink: 0; }

.pt-edit-actions { display: flex; gap: 4px; flex-shrink: 0; }

.pt-edit-actions button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: var(--pt-surface-2);
  color: var(--pt-text-65);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pt-edit-actions button:disabled { opacity: .35; cursor: default; }
.pt-edit-remove { background: var(--pt-accent-tint) !important; color: var(--pt-accent-dark) !important; }

.pt-edit-vuoto {
  font-size: 13px;
  color: var(--pt-text-45);
  text-align: center;
  padding: 20px 8px;
}

/* Sezione aggiunta POI */
.pt-edit-cat { margin-bottom: 14px; }

.pt-edit-cat-head {
  font-size: 12px;
  font-weight: 600;
  color: var(--pt-text-55);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-edit-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(28, 96, 145, 0.3);
  background: var(--pt-card);
  color: var(--bs-secondary);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  margin: 0 6px 6px 0;
  cursor: pointer;
}

.pt-edit-add:active { background: var(--pt-info-tint); }

/* Sezione viaggi di gruppo in "I miei tour" */
.pt-gruppi-sezione { margin-top: 24px; }

.pt-gruppi-titolo {
  font-size: 15px;
  font-weight: 600;
  margin: 0 16px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pt-gruppi-titolo i { color: var(--bs-secondary); }

.pt-gruppi-titolo small {
  font-size: 11px;
  color: var(--pt-text-45);
  font-weight: 400;
  margin-left: auto;
}

.pt-gruppo-card { display: block; text-decoration: none; color: inherit; }
.pt-badge-gruppo { background: var(--pt-info-tint) !important; color: var(--bs-secondary) !important; }

/* Azioni di pubblicazione nella lista "I miei tour": stessa forma del
   bottone condividi, colore diverso per distinguere lo stato. */
.pt-tour-publish,
.pt-tour-pending,
.pt-tour-published {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-decoration: none;
  flex-shrink: 0;
}

.pt-tour-publish { background: rgba(var(--bs-primary-rgb), 0.12); color: var(--bs-primary); }
.pt-tour-pending { background: var(--pt-reward-tint); color: var(--pt-reward-dark); }
.pt-tour-published { background: var(--pt-info-tint); color: var(--bs-secondary); }

/* ============================================================
   L'USCITA: stato, programmazione, modalità navigazione
   ============================================================ */

.pt-uscita { margin: 0 16px 16px; }

/* Riga di stato, sempre visibile */
.pt-uscita-stato {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.pt-uscita-stato i { font-size: 17px; flex-shrink: 0; }
.pt-uscita-quando { margin-left: auto; font-weight: 500; font-size: 12px; opacity: .85; }

.pt-uscita-stato-pronto { background: var(--pt-surface); color: var(--pt-text-65); }
.pt-uscita-stato-programmato { background: var(--pt-info-tint); color: var(--bs-secondary); }
.pt-uscita-stato-in_corso { background: var(--bs-secondary); color: var(--pt-card); }
.pt-uscita-stato-concluso { background: var(--pt-surface-2); color: var(--pt-text-60); }
.pt-uscita-stato-scaduto { background: var(--pt-reward-tint); color: var(--pt-reward-dark); }
.pt-uscita-stato-annullato { background: var(--pt-accent-tint); color: var(--pt-accent-dark); }

/* Bottone "Avvia il tour": è l'azione principale della pagina */
.pt-uscita-avvia {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  border-radius: var(--pt-card-radius);
  background: linear-gradient(135deg, var(--pt-info), var(--pt-chrome));
  color: var(--pt-card);
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 3px 12px rgba(28, 96, 145, .3);
}

.pt-uscita-avvia:disabled { opacity: .6; }
.pt-uscita-avvia > i { font-size: 26px; flex-shrink: 0; }
.pt-uscita-avvia strong { display: block; font-size: 15px; }
.pt-uscita-avvia small { font-size: 11px; color: rgba(255, 255, 255, .85); }

/* Modalità navigazione */
.pt-nav-box {
  background: var(--pt-chrome);
  color: var(--pt-card);
  border-radius: var(--pt-card-radius);
  padding: 14px 16px;
}

.pt-nav-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pt-nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--pt-info-2);
  display: flex;
  align-items: center;
  gap: 5px;
}

.pt-nav-count { font-size: 14px; font-weight: 700; }

.pt-nav-bar {
  height: 8px;
  background: rgba(255, 255, 255, .18);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.pt-nav-bar span {
  display: block;
  height: 100%;
  background: var(--pt-info-2);
  border-radius: 999px;
  transition: width .4s ease;
}

.pt-nav-stop {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, .15);
  color: var(--pt-card);
  font-weight: 600;
  font-size: 13px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Programmazione data/ora */
.pt-uscita-programma {
  margin-top: 10px;
  background: var(--pt-card);
  border: 1px solid rgba(18, 62, 94, 0.09);
  border-radius: var(--pt-card-radius);
  padding: 12px 14px;
}

.pt-uscita-programma summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--bs-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.pt-uscita-programma summary::-webkit-details-marker { display: none; }
.pt-uscita-programma-sub { font-size: 12px; color: var(--pt-text-55); margin: 8px 0 12px; }

.pt-uscita-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--pt-text-65);
  margin: 10px 0 5px;
}

.pt-uscita-input {
  width: 100%;
  border: 1px solid rgba(18, 62, 94, 0.15);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
}

.pt-uscita-input:focus {
  outline: none;
  border-color: var(--bs-secondary);
  box-shadow: 0 0 0 3px rgba(28, 96, 145, .12);
}

.pt-uscita-salva {
  width: 100%;
  margin-top: 14px;
  border: none;
  border-radius: 9px;
  background: var(--bs-secondary);
  color: var(--pt-card);
  font-weight: 600;
  font-size: 13px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pt-uscita-annulla {
  width: 100%;
  margin-top: 8px;
  border: none;
  background: none;
  color: var(--pt-accent-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Badge di stato compatto nelle liste di tour */
.pt-tour-stato {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  margin-top: 4px;
}

/* --- Accesso all'uscita: invito vs aperto --- */
.pt-gruppo-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pt-badge-aperto { background: var(--pt-reward-tint) !important; color: var(--pt-reward-dark) !important; }

/* Nota che distingue "aperto" da "pubblicato in community": è il punto in cui
   l'utente rischia di confondere le due cose, quindi va detto sul posto. */
.pt-accesso-nota {
  font-size: 11px;
  color: var(--pt-text-55);
  line-height: 1.45;
  margin: 6px 0 12px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.pt-accesso-nota i { flex-shrink: 0; margin-top: 1px; }

.pt-accesso-pannello {
  margin-top: 12px;
  border-top: 1px solid rgba(18, 62, 94, 0.08);
  padding-top: 12px;
}

.pt-accesso-pannello summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--bs-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin-bottom: 10px;
}

.pt-accesso-pannello summary::-webkit-details-marker { display: none; }

/* Nota discreta: la tappa risulta da fare in questo giro, ma l'utente
   c'era già stato in passato. Informazione, non giudizio. */
.pt-tappa-vista-prima {
  font-size: 11px;
  color: var(--pt-reward-dark);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

/* ============================================================
   BACHECA DELLE USCITE APERTE
   ============================================================ */

.pt-bacheca-avviso {
  margin: 0 16px 12px;
  padding: 10px 12px;
  background: var(--pt-reward-tint);
  color: var(--pt-reward-dark);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.pt-bacheca-avviso i { flex-shrink: 0; margin-top: 1px; }

.pt-bacheca-card {
  display: flex;
  gap: 12px;
  background: var(--pt-card);
  border: 1px solid rgba(18, 62, 94, 0.09);
  border-radius: var(--pt-card-radius);
  padding: 12px 14px;
  margin: 0 16px 10px;
  text-decoration: none;
  color: inherit;
}

/* Data a sinistra, stile "foglietto di calendario" */
.pt-bacheca-data {
  flex-shrink: 0;
  width: 46px;
  border-radius: 10px;
  background: var(--pt-info-tint);
  color: var(--bs-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
}

.pt-bacheca-giorno { font-size: 19px; font-weight: 700; line-height: 1; }
.pt-bacheca-mese { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }

.pt-bacheca-corpo { flex: 1; min-width: 0; }
.pt-bacheca-corpo h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }

.pt-bacheca-meta {
  font-size: 12px;
  color: var(--pt-text-55);
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.pt-bacheca-posti {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--bs-secondary);
  background: var(--pt-info-tint);
  padding: 3px 8px;
  border-radius: 999px;
}

.pt-bacheca-incorso {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  margin-left: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--pt-card);
  background: var(--bs-secondary);
  padding: 3px 8px;
  border-radius: 999px;
}

/* Nota mostrata a chi non fa parte del gruppo, al posto dei nomi */
.pt-gruppo-privacy {
  font-size: 12px;
  color: var(--pt-text-45);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  line-height: 1.4;
}

/* Avviso: il builder ha ripreso una selezione precedente. Va detto, altrimenti
   trovare delle spunte già messe sembra un errore dell'app. */
.pt-builder-ripreso {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 16px 0;
  padding: 9px 12px;
  background: var(--pt-info-tint);
  border-radius: 10px;
  font-size: 12px;
  color: var(--bs-secondary);
}

.pt-builder-ripreso i { flex-shrink: 0; }
.pt-builder-ripreso span { flex: 1; line-height: 1.35; }

.pt-builder-ripreso button {
  flex-shrink: 0;
  border: none;
  background: var(--bs-secondary);
  color: var(--pt-card);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

/* La sezione "Crea un viaggio di gruppo" è chiusa di default: nella pagina di
   un tour da percorrere queste opzioni servono solo a chi le cerca, e tenerle
   sempre aperte allungava la pagina di due gruppi di scelte e un campo. */
details.pt-gruppo-attiva > summary.pt-gruppo-attiva-head {
  cursor: pointer;
  list-style: none;
  margin-bottom: 0;
}

details.pt-gruppo-attiva > summary.pt-gruppo-attiva-head::-webkit-details-marker {
  display: none;
}

.pt-gruppo-attiva-freccia {
  margin-left: auto;
  color: var(--pt-text-35);
  font-size: 18px;
  transition: transform .2s ease;
}

details.pt-gruppo-attiva[open] .pt-gruppo-attiva-freccia {
  transform: rotate(180deg);
}

/* Il form respira solo quando la sezione è aperta */
details.pt-gruppo-attiva[open] > summary.pt-gruppo-attiva-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(18, 62, 94, 0.08);
}

/* ============================================================================
   LIVELLO IDENTITÀ
   ----------------------------------------------------------------------------
   Sta in fondo al foglio per vincere sui blocchi precedenti a pari specificità.
   Non introduce classi nuove tranne quelle della scena di apertura
   (.pt-scena-*): tutto il resto riveste il markup che c'è già.

   Il segno distintivo dell'app è la LINEA DI PERCORSO: una traccia con nodi,
   la stessa di una mappa o di un segnavia. Compare in tre posti, e in tutti
   e tre porta un'informazione vera:
     · sul bordo inferiore della scena di apertura — il cammino parte qui
     · lungo la lista delle tappe — la camminata che le unisce
     · in testa al passaporto — il filo che lega i luoghi raccolti
   Non compare mai dietro al testo, e non ci sono altre decorazioni.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FONDAMENTA
   -------------------------------------------------------------------------- */

body {
  font: var(--pt-t-body);
  color: var(--pt-text);
  background-color: var(--pt-surface);
  padding-bottom: 100px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Titoli: stessa famiglia, larghezza estesa. È il carattere del cartello. */
.pt-scena-title,
.pt-section-head h3,
.pt-topbar h1,
.pt-cta-card h3,
.pt-passport-pct,
.pt-stat-value,
.pt-reviews-score-num,
.pt-poi-title,
.pt-community-card-head h3,
.pt-gruppi-titolo,
.pt-lampo-badge-time,
.pt-review-form-title,
.pt-reviews-title,
.pt-nav-count {
  font-family: var(--pt-font-display);
  font-stretch: var(--pt-wide);
  letter-spacing: -0.015em;
}

/* Etichette: maiuscoletto spaziato, come sui pannelli informativi */
.pt-scena-eyebrow,
.pt-badge-cat,
.pt-stat-label,
.pt-audio-player-label,
.pt-section-count,
.pt-bacheca-mese,
.pt-uscita-label,
.pt-review-form-label,
.pt-gruppo-permesso-label,
.pt-nav-label,
.pt-endpoint-field label {
  font: var(--pt-t-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* Numeri in colonna: in una lista non devono ballare da una riga all'altra */
.pt-stat-value, .pt-distance-badge, .pt-nav-count, .pt-passport-pct,
.pt-passport-count, .pt-lampo-badge-time, .pt-bacheca-giorno,
.pt-reviews-score-num, .pt-badge-progress, .pt-collect-date, .pt-tappa-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Salto al contenuto: invisibile col mouse, primo elemento con la tastiera */
.pt-skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--pt-r-sm);
  background: var(--pt-card);
  box-shadow: var(--pt-shadow-2);
  font: 700 13px var(--pt-font-body);
  color: var(--pt-chrome);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--pt-fast) var(--pt-ease);
}

.pt-skip:focus {
  transform: none;
}

/* Il fuoco da tastiera si deve vedere sempre */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--pt-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   2. LA CORNICE
   Contenuti chiari dentro una cornice scura: all'aperto si legge meglio e il
   prodotto sembra montato, non stampato.
   -------------------------------------------------------------------------- */

.pt-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: calc(9px + env(safe-area-inset-top)) 14px 9px;
  background: var(--pt-chrome);
  border-bottom: 2px solid var(--pt-accent);
  color: var(--pt-card);
}

.pt-topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--pt-card);
}

.pt-topbar h1 a,
.pt-topbar a.ti,
.pt-topbar h1 .ti {
  color: var(--pt-card);
}

.pt-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pt-account-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--pt-card);
  font-size: 19px;
  transition: background var(--pt-fast) var(--pt-ease);
}

.pt-account-btn:active {
  background: rgba(255, 255, 255, 0.26);
}

.pt-lang-badge {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.13);
  border-radius: var(--pt-r-pill);
}

.pt-lang-badge a {
  padding: 3px 9px;
  border-radius: var(--pt-r-pill);
  font: 700 11px/1.4 var(--pt-font-body);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: all var(--pt-fast) var(--pt-ease);
}

.pt-lang-badge a.active {
  background: var(--pt-card);
  color: var(--pt-chrome);
}

.pt-account-dropdown {
  border: 1px solid var(--pt-hairline);
  border-radius: var(--pt-r);
  box-shadow: var(--pt-shadow-2);
  padding: 6px;
}

.pt-account-dropdown .dropdown-item {
  border-radius: var(--pt-r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--pt-text-75);
}

.pt-account-email {
  font-size: 12px;
  color: var(--pt-text-55);
}

/* --------------------------------------------------------------------------
   3. NAVIGAZIONE
   Sul telefono è una lastra sospesa in basso. Su schermo grande sale nella
   cornice in alto (vedi sezione 12).
   -------------------------------------------------------------------------- */

.pt-bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-around;
  gap: 2px;
  padding: 7px 6px 6px;
  background: var(--pt-chrome-deep);
  border: none;
  border-radius: var(--pt-r-lg);
  box-shadow: var(--pt-shadow-nav);
  z-index: 40;
}

.pt-bottom-nav a {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px 5px;
  border-radius: var(--pt-r-sm);
  font: 600 10px/1.2 var(--pt-font-body);
  text-align: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--pt-fast) var(--pt-ease),
              background var(--pt-fast) var(--pt-ease);
}

.pt-bottom-nav a i {
  font-size: 21px;
  line-height: 1;
}

.pt-bottom-nav a.active {
  color: var(--pt-card);
  background: rgba(255, 255, 255, 0.1);
}

.pt-bottom-nav a.active::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--pt-accent);
}

/* --------------------------------------------------------------------------
   4. SCENA DI APERTURA
   Chi apre l'app è in piedi, in strada, con poco tempo. Una riga per dire
   cosa succede se cammina, e il campo di ricerca subito sotto il pollice.
   Sopra il testo non ci va niente: nessuna texture, nessun motivo.
   -------------------------------------------------------------------------- */

.pt-scena {
  position: relative;
  padding: 28px 18px 44px;
  background: linear-gradient(165deg, var(--pt-chrome) 0%, #0D3350 58%, var(--pt-chrome-deep) 100%);
  color: var(--pt-card);
}

.pt-scena-eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding-top: 12px;
  border-top: 2px solid var(--pt-accent);
  color: var(--pt-info-2);
}

.pt-scena-title {
  margin: 0 0 12px;
  max-width: 20ch;
  font-size: clamp(27px, 8.2vw, 36px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--pt-card);
}

.pt-scena-title em {
  font-style: normal;
  color: var(--pt-accent-200);
}

.pt-scena-lede {
  margin: 0;
  max-width: 40ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}

/* La linea di percorso chiude la scena: il cammino parte da qui */
.pt-scena::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 20px;
  height: 9px;
  background-image:
    radial-gradient(circle at center, var(--pt-accent) 2.6px, transparent 2.7px),
    linear-gradient(to right, rgba(255, 255, 255, 0.22) 0 100%);
  background-size: 52px 9px, 100% 2px;
  background-position: left center, left center;
  background-repeat: repeat-x, repeat-x;
}

/* La ricerca sale a cavallo del bordo: è il gesto che dice "parti da qui" */
.pt-scena + .pt-search {
  position: relative;
  z-index: 2;
  margin-top: -26px;
  padding: 0 16px 10px;
}

.pt-search input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--pt-hairline);
  border-radius: var(--pt-r);
  background: var(--pt-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2345535E' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") no-repeat 15px center;
  box-shadow: var(--pt-shadow-2);
  font: 500 15px var(--pt-font-body);
  color: var(--pt-text);
  -webkit-appearance: none;
  appearance: none;
}

.pt-search input::placeholder {
  color: var(--pt-text-45);
  font-weight: 400;
}

.pt-search input:focus {
  outline: none;
  border-color: var(--pt-accent);
  box-shadow: var(--pt-shadow-2), 0 0 0 3px rgba(192, 69, 42, 0.16);
}

/* --------------------------------------------------------------------------
   5. FILTRI
   Regola del sistema: se è tondo si tocca, se è quadrato è un'etichetta.
   -------------------------------------------------------------------------- */

.pt-chip-row {
  padding: 14px 16px 6px;
  gap: 7px;
}

.pt-chip {
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--pt-hairline);
  border-radius: var(--pt-r-pill);
  background: var(--pt-card);
  font: 600 13px/1 var(--pt-font-body);
  color: var(--pt-text-70);
  transition: all var(--pt-fast) var(--pt-ease);
}

.pt-chip i {
  font-size: 15px;
  opacity: 0.75;
}

.pt-chip.active {
  background: var(--pt-accent);
  border-color: var(--pt-accent);
  color: var(--pt-card);
  box-shadow: 0 2px 8px rgba(192, 69, 42, 0.28);
}

.pt-chip.active i {
  opacity: 1;
}

.pt-action-row {
  gap: 8px;
  padding: 6px 16px 10px;
}

.pt-action-btn {
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--pt-hairline);
  border-radius: var(--pt-r-pill);
  background: var(--pt-card);
  font: 600 12.5px/1 var(--pt-font-body);
  color: var(--pt-text-70);
  transition: all var(--pt-fast) var(--pt-ease);
}

.pt-action-btn.active {
  background: var(--pt-accent-tint);
  border-color: var(--pt-accent-200);
  color: var(--pt-accent-dark);
}

.pt-badge-cat {
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--pt-info-tint);
  color: var(--pt-info);
}

/* --------------------------------------------------------------------------
   6. SCHEDE
   Linea sottile prima dell'ombra: l'app sembra disegnata, non galleggiante,
   e regge meglio la luce diretta.
   -------------------------------------------------------------------------- */

.pt-poi-card,
.pt-itin-card,
.pt-evento-card,
.pt-stat-card,
.pt-tour-card,
.pt-community-card,
.pt-badge-item,
.pt-bacheca-card,
.pt-gruppo-card,
.pt-lampo-poi-card,
.pt-review-mine,
.pt-builder-section,
.pt-lampo-section,
.pt-edit-section {
  border: 1px solid var(--pt-hairline);
  border-radius: var(--pt-r);
  background: var(--pt-card);
  box-shadow: var(--pt-shadow-1);
}

.pt-poi-card {
  align-items: center;
  gap: 13px;
  padding: 11px;
  transition: transform var(--pt-fast) var(--pt-ease),
              box-shadow var(--pt-fast) var(--pt-ease),
              border-color var(--pt-fast) var(--pt-ease);
}

.pt-poi-card:active {
  transform: scale(0.985);
  box-shadow: var(--pt-shadow-2);
}

.pt-poi-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background-color: var(--pt-chrome);
  box-shadow: inset 0 0 0 1px rgba(11, 32, 48, 0.14);
  font-size: 25px;
  color: rgba(255, 255, 255, 0.85);
}

.pt-poi-info {
  min-width: 0;
  flex: 1;
}

.pt-poi-card h3 {
  margin: 0 0 3px;
  font: 700 15px/1.25 var(--pt-font-body);
  letter-spacing: -0.01em;
  color: var(--pt-text);
}

.pt-poi-card p {
  margin: 0 0 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--pt-text-55);
}

/* Un solo momento animato: le schede entrano sfalsate al primo caricamento */
.pt-list > .pt-poi-card {
  animation: pt-entra var(--pt-med) var(--pt-ease) both;
}

.pt-list > .pt-poi-card:nth-child(1)   { animation-delay: 20ms; }
.pt-list > .pt-poi-card:nth-child(2)   { animation-delay: 45ms; }
.pt-list > .pt-poi-card:nth-child(3)   { animation-delay: 70ms; }
.pt-list > .pt-poi-card:nth-child(4)   { animation-delay: 95ms; }
.pt-list > .pt-poi-card:nth-child(5)   { animation-delay: 120ms; }
.pt-list > .pt-poi-card:nth-child(n+6) { animation-delay: 140ms; }

@keyframes pt-entra {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   7. DETTAGLIO LUOGO
   -------------------------------------------------------------------------- */

.pt-hero {
  position: relative;
  height: 250px;
  background-color: var(--pt-chrome);
  font-size: 54px;
  color: rgba(255, 255, 255, 0.8);
}

.pt-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 96px;
  background: linear-gradient(to top, var(--pt-surface) 2%, rgba(239, 241, 238, 0) 100%);
}

.pt-poi-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--pt-text);
}

.pt-poi-descrizione {
  font-size: 15px;
  line-height: 1.65;
  color: var(--pt-text-70);
}

/* --------------------------------------------------------------------------
   8. AZIONI — un solo accento per schermata
   -------------------------------------------------------------------------- */

.pt-listen-btn,
.pt-auth-submit,
.pt-review-submit,
.pt-uscita-avvia,
.pt-gruppo-attiva-btn,
.pt-builder-bar button,
.pt-edit-actions button,
.pt-tour-publish,
.pt-share-btn,
.pt-open-route-btn,
.pt-lampo-riprova {
  border: none;
  border-radius: var(--pt-r-sm);
  font-family: var(--pt-font-body);
  font-weight: 700;
  transition: transform var(--pt-fast) var(--pt-ease),
              box-shadow var(--pt-fast) var(--pt-ease),
              background var(--pt-fast) var(--pt-ease);
}

.pt-listen-btn {
  width: calc(100% - 32px);
  margin: 4px 16px 14px;
  padding: 14px;
  gap: 9px;
  border-radius: var(--pt-r);
  background: var(--pt-accent);
  color: var(--pt-card);
  font-size: 15px;
  box-shadow: 0 2px 10px rgba(192, 69, 42, 0.26);
}

.pt-listen-btn i {
  font-size: 19px;
}

.pt-listen-btn:active {
  transform: scale(0.985);
  background: var(--pt-accent-dark);
}

.pt-listen-btn.speaking {
  background: var(--pt-chrome);
  box-shadow: 0 2px 10px rgba(18, 62, 94, 0.26);
}

.pt-cta-card,
.pt-cta-lampo {
  border-radius: var(--pt-r);
  padding: 16px;
}

.pt-cta-card h3 {
  font-size: 17px;
  font-weight: 700;
}

.pt-cta-card p {
  font-size: 12.5px;
  line-height: 1.45;
  opacity: 0.9;
}

.pt-cta-lampo {
  background: linear-gradient(135deg, var(--pt-info), var(--pt-chrome));
  box-shadow: 0 3px 12px rgba(18, 62, 94, 0.26);
}

.pt-cta-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-size: 21px;
}

/* --------------------------------------------------------------------------
   9. ITINERARI — la linea di percorso, secondo posto
   La sequenza delle tappe è informazione, quindi si disegna: le tappe stanno
   su una traccia, e la traccia è la camminata che le unisce.
   -------------------------------------------------------------------------- */

.pt-tappa {
  position: relative;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pt-hairline);
}

.pt-tappa-num {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  background: var(--pt-accent);
  box-shadow: 0 0 0 4px var(--pt-surface);
  font: 700 12.5px/1 var(--pt-font-body);
}

.pt-tappa::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 30px;
  bottom: -8px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--pt-accent-200) 0 5px,
    transparent 5px 10px
  );
}

.pt-tappa:last-child::before {
  display: none;
}

.pt-tappa.pt-tappa-visited .pt-tappa-num,
.pt-tappa.visitata .pt-tappa-num {
  background: var(--pt-ok);
}

.pt-tappa.pt-tappa-nearby {
  background: var(--pt-accent-tint);
}

.pt-tappa-nome {
  font: 700 15px/1.3 var(--pt-font-body);
  color: var(--pt-text);
}

.pt-stat-card {
  padding: 14px 10px;
}

.pt-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--pt-chrome);
}

.pt-stat-label {
  color: var(--pt-text-55);
}

.pt-stat-card i {
  color: var(--pt-accent);
}

.pt-itin-card {
  padding: 16px;
}

.pt-itin-card h3 {
  font: 700 16px/1.3 var(--pt-font-body);
  letter-spacing: -0.012em;
  color: var(--pt-text);
}

.pt-itin-card p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--pt-text-60);
}

/* --------------------------------------------------------------------------
   10. PASSAPORTO — qui si spende l'audacia
   È la schermata che l'utente fotografa e manda agli amici, quindi è anche il
   canale di acquisizione più economico. Sembra un documento: linea di percorso
   in testa, e i badge diventano sigilli impressi, ognuno ruotato di poco.
   -------------------------------------------------------------------------- */

.pt-passport-hero {
  position: relative;
  overflow: hidden;
  margin: 14px 16px 6px;
  padding: 26px 20px 20px;
  border-radius: var(--pt-r-lg);
  background:
    radial-gradient(112% 82% at 84% 0%, rgba(192, 138, 42, 0.2), transparent 62%),
    linear-gradient(158deg, var(--pt-chrome) 0%, var(--pt-chrome-deep) 100%);
  box-shadow: 0 4px 18px rgba(11, 32, 48, 0.22);
}

/* la linea di percorso, terzo posto: il filo che lega i luoghi raccolti */
.pt-passport-hero::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 12px;
  height: 9px;
  background-image:
    radial-gradient(circle at center, var(--pt-reward) 2.6px, transparent 2.7px),
    linear-gradient(to right, rgba(255, 255, 255, 0.2) 0 100%);
  background-size: 52px 9px, 100% 2px;
  background-position: left center, left center;
  background-repeat: repeat-x, repeat-x;
}

.pt-passport-hero > * {
  position: relative;
}

.pt-passport-sub {
  margin: 4px 0 18px;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  opacity: 1;
}

.pt-passport-pct {
  font-size: 46px;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--pt-card);
}

.pt-passport-count {
  font: 600 12px/1.3 var(--pt-font-body);
  color: var(--pt-info-2);
}

.pt-passport-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.16);
}

.pt-passport-fill {
  background: linear-gradient(90deg, var(--pt-reward), #E8C878);
  box-shadow: 0 0 10px rgba(192, 138, 42, 0.5);
}

.pt-section-head {
  margin: 26px 16px 10px;
}

.pt-section-head h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--pt-text);
}

.pt-section-count {
  color: var(--pt-text-45);
}

/* --- i sigilli --- */

.pt-badge-item {
  gap: 15px;
  padding: 14px;
}

.pt-badge-icon {
  width: 52px;
  height: 52px;
  font-size: 23px;
}

.pt-badge-item.is-unlocked .pt-badge-icon {
  background: radial-gradient(circle at 34% 26%, #F0D492 0%, var(--pt-reward) 52%, var(--pt-reward-dark) 100%);
  color: #4B3406;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    inset 0 0 0 4px rgba(75, 52, 6, 0.16),
    0 2px 7px rgba(138, 100, 18, 0.4);
  transform: rotate(-4deg);
}

.pt-badge-item:nth-child(even).is-unlocked .pt-badge-icon {
  transform: rotate(3deg);
}

.pt-badge-item.is-locked .pt-badge-icon {
  background: var(--pt-surface);
  border: 1.5px dashed var(--pt-line-2);
  color: var(--pt-text-35);
  box-shadow: none;
}

.pt-badge-lock {
  color: var(--pt-text-40);
}

.pt-badge-text strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--pt-text);
}

.pt-badge-item.is-locked .pt-badge-text strong {
  color: var(--pt-text-55);
}

.pt-badge-text small {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--pt-text-55);
}

.pt-badge-progress {
  align-self: flex-start;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--pt-reward-tint);
  color: var(--pt-reward-dark);
  font: 700 11px/1.4 var(--pt-font-body);
}

/* --- il foglio dei luoghi da collezionare --- */

.pt-collect-grid {
  gap: 12px;
}

.pt-collect-thumb {
  border-radius: 12px;
  background-color: var(--pt-chrome);
  box-shadow: inset 0 0 0 1px rgba(11, 32, 48, 0.16);
}

.pt-collect-item.is-locked .pt-collect-thumb {
  filter: grayscale(1);
  opacity: 0.42;
}

.pt-collect-check {
  background: var(--pt-reward);
  color: #4B3406;
  box-shadow: 0 1px 5px rgba(138, 100, 18, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.pt-collect-name {
  margin-top: 7px;
  font: 700 12.5px/1.3 var(--pt-font-body);
  color: var(--pt-text);
}

.pt-collect-date {
  font: 600 11px/1.3 var(--pt-font-body);
  color: var(--pt-reward-dark);
}

.pt-collect-date.pt-collect-todo {
  color: var(--pt-text-40);
}

.pt-passport-empty {
  margin: 0 16px;
  padding: 26px 18px;
  border: 1px dashed var(--pt-line-2);
  border-radius: var(--pt-r);
  background: var(--pt-card);
  text-align: center;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--pt-text-60);
}

/* --------------------------------------------------------------------------
   11. VOCE, VALUTAZIONI, STATI, FORM
   -------------------------------------------------------------------------- */

.pt-audio-player {
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  padding: 12px 14px;
  border-radius: var(--pt-r-lg);
  background: var(--pt-chrome-deep);
  box-shadow: var(--pt-shadow-nav);
}

.pt-audio-player-label {
  color: var(--pt-info-2);
}

.pt-audio-player-title {
  font: 700 14px/1.3 var(--pt-font-body);
}

.pt-audio-banner {
  border: 1px solid var(--pt-hairline);
  border-radius: var(--pt-r);
  box-shadow: var(--pt-shadow-2);
}

.pt-audio-banner-icon {
  background: var(--pt-accent);
  color: var(--pt-card);
}

.pt-reviews-score-num {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--pt-reward-dark);
}

.pt-reviews-score-stars,
.pt-review-stars,
.pt-star-input label {
  color: var(--pt-reward);
}

.pt-uscita-stato-in_corso {
  background: var(--pt-accent-tint);
  color: var(--pt-accent-dark);
}

.pt-uscita-stato-concluso {
  background: var(--pt-ok-tint);
  color: var(--pt-ok);
}

.pt-uscita-stato-annullato,
.pt-uscita-stato-scaduto {
  background: var(--pt-surface-2);
  color: var(--pt-text-60);
}

.pt-flash {
  border-radius: var(--pt-r-sm);
  font-weight: 600;
}

.pt-flash-error {
  background: var(--pt-accent-tint);
  color: var(--pt-danger);
}

.pt-flash-ok {
  background: var(--pt-ok-tint);
  color: var(--pt-ok);
}

/* Azioni distruttive: riconoscibili, mai invitanti */
.pt-tour-delete,
.pt-review-delete,
.pt-gruppo-esci,
.pt-gruppo-rimuovi,
.pt-uscita-annulla,
.pt-edit-remove {
  color: var(--pt-danger);
  font-weight: 600;
}

.pt-auth-form .form-control,
.pt-review-textarea,
.pt-uscita-input,
.pt-save-tour-box input[type="text"],
.pt-endpoint-field select,
.pt-lampo-radio select {
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-r-sm);
  background: var(--pt-card);
  font-family: var(--pt-font-body);
  font-size: 15px;
  color: var(--pt-text);
}

.pt-auth-form .form-control:focus,
.pt-review-textarea:focus,
.pt-uscita-input:focus,
.pt-endpoint-field select:focus {
  border-color: var(--pt-accent);
  box-shadow: 0 0 0 3px rgba(192, 69, 42, 0.14);
  outline: none;
}

.pt-auth-form label {
  font: 700 12px/1.4 var(--pt-font-body);
  color: var(--pt-text-65);
}

.pt-auth-submit {
  padding: 14px;
  background: var(--pt-accent);
  color: var(--pt-card);
  font-size: 15px;
}

.pt-auth-submit:active {
  transform: scale(0.99);
  background: var(--pt-accent-dark);
}

.pt-google-btn {
  border: 1px solid var(--pt-line-2);
  border-radius: var(--pt-r-sm);
  font-weight: 600;
}

/* Stati vuoti: un invito, non un vicolo cieco */
.pt-reviews-empty,
.pt-edit-vuoto,
.pt-bacheca-vuota {
  border: 1px dashed var(--pt-line-2);
  border-radius: var(--pt-r);
  background: var(--pt-card);
  color: var(--pt-text-60);
  font-size: 13.5px;
  line-height: 1.55;
}

.pt-propose-banner {
  border: 1px dashed var(--pt-hairline-2);
  border-radius: var(--pt-r);
  background: var(--pt-info-tint);
}

.pt-propose-banner strong {
  font-weight: 700;
  color: var(--pt-chrome);
}

.pt-acquire-banner {
  border-radius: var(--pt-r);
  box-shadow: var(--pt-shadow-2);
}

.pt-toast {
  border-radius: var(--pt-r-pill);
  font-weight: 600;
  box-shadow: var(--pt-shadow-2);
}

.pt-distance-badge {
  background: var(--pt-info-tint);
  color: var(--pt-info);
  font-weight: 700;
}

.pt-shared-badge {
  border-radius: var(--pt-r-pill);
  font-weight: 700;
}

#pt-map,
#pt-propose-map,
.pt-itin-map {
  border-radius: var(--pt-r);
  box-shadow: inset 0 0 0 1px var(--pt-hairline);
}

.leaflet-container {
  font-family: var(--pt-font-body);
}

/* --------------------------------------------------------------------------
   12. SCHERMI GRANDI
   L'app nasce per il telefono, ma su desktop non deve sembrare un telefono
   ingrandito. Tre cose cambiano:
     · i contenuti stanno in una colonna di lettura centrata, su una pagina
       che si vede essere una pagina;
     · la navigazione dal basso sale nella cornice in alto, dove il mouse
       la cerca;
     · dove esiste un contenitore di lista, le schede vanno su più colonne.
   Nessuna modifica al markup: solo CSS.
   -------------------------------------------------------------------------- */

@media (min-width: 800px) {
  body {
    background: var(--pt-surface-2);
    padding-bottom: 40px;
  }

  main {
    max-width: var(--pt-col);
    margin-inline: auto;
    min-height: 100vh;
    background: var(--pt-surface);
    border-inline: 1px solid var(--pt-hairline);
  }

  /* la cornice resta a tutta larghezza: è la barra dell'applicazione */
  .pt-topbar {
    min-height: 64px;
    padding-inline: max(20px, calc((100% - 1180px) / 2));
  }

  .pt-topbar h1 {
    font-size: 20px;
  }

  /* la navigazione sale in testa, dentro la cornice */
  .pt-bottom-nav {
    top: 0;
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    height: 64px;
    gap: 2px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    align-items: center;
    justify-content: center;
  }

  .pt-bottom-nav a {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 8px;
    padding: 9px 14px;
    border-radius: var(--pt-r-pill);
    font-size: 13px;
    font-weight: 600;
  }

  .pt-bottom-nav a i {
    font-size: 18px;
  }

  .pt-bottom-nav a:hover {
    color: var(--pt-card);
    background: rgba(255, 255, 255, 0.08);
  }

  .pt-bottom-nav a.active {
    background: rgba(255, 255, 255, 0.14);
  }

  .pt-bottom-nav a.active::before {
    top: auto;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    transform: none;
    border-radius: 3px 3px 0 0;
  }

  /* il lettore audio resta in basso, larghezza della colonna */
  .pt-audio-player {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(var(--pt-col), calc(100% - 32px));
    bottom: 16px;
  }

  /* la scena di apertura respira */
  .pt-scena {
    padding: 44px 32px 56px;
  }

  .pt-scena-title {
    font-size: 42px;
    max-width: 22ch;
  }

  .pt-scena-lede {
    font-size: 16px;
  }

  .pt-scena::after {
    left: 32px;
    right: 32px;
    bottom: 26px;
  }

  .pt-scena + .pt-search {
    padding-inline: 24px;
  }

  /* dove c'è un contenitore, più colonne */
  .pt-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 16px;
  }

  .pt-list > .pt-poi-card {
    margin: 0;
  }

  .pt-badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pt-collect-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pt-hero {
    height: 320px;
  }

  .pt-poi-title {
    font-size: 32px;
  }

  /* col mouse esiste il passaggio del cursore: usiamolo */
  .pt-poi-card:hover,
  .pt-itin-card:hover,
  .pt-community-card:hover {
    border-color: var(--pt-hairline-2);
    box-shadow: var(--pt-shadow-2);
  }

  .pt-chip:hover {
    border-color: var(--pt-accent-200);
    color: var(--pt-accent-dark);
  }
}

@media (min-width: 1180px) {
  :root {
    --pt-col: 880px;
  }

  .pt-scena-title {
    font-size: 48px;
  }

  .pt-collect-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Chi ha chiesto meno movimento non ne riceve */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
