/* ============================================================
   Sicily Travel Phrases — styles.css (mobile-first)
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Sicily GO redesign — navy + arancio (derivati dal logo), font Poppins */
  --primary: #1C3A5F;        /* navy: header, stati attivi, selezioni */
  --primary-dark: #16345C;
  --primary-light: #2563A8;
  --primary-bg: #EAF0F6;     /* tint navy chiaro: tip, badge, tag */
  --accent: #F26A21;         /* arancio: avatar, logo GO, momenti CTA */
  --bg: #F6F5EE;             /* sfondo app */
  --card: #FFFFFF;           /* superfici */
  --text: #1C2520;
  --text-secondary: #6B7670;
  --text-light: #9CA3AF;
  --border: #E6E8E0;
  --success: #059669;
  --success-bg: #ECFDF5;
  --emergency: #D6453D;
  --emergency-bg: #FBEDEC;
  --essential-bg: #FFF7ED;
  --shadow: 0 2px 8px rgba(28,37,32,0.06);
  --shadow-lg: 0 10px 24px rgba(28,37,32,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 68px;
  --header-height: 56px;
  --max-width: 480px;
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
}

body.overlay-open { overflow: hidden; }

#app {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

a { text-decoration: none; color: inherit; }

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
  height: var(--header-height);
}

.header-back {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px 4px 0;
  line-height: 1;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.header-auth-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  opacity: 0.9;
  flex-shrink: 0;
}
.header-auth-btn:active { opacity: 0.6; }

.header-city-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 4px 6px 4px 10px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
  transition: background 0.15s ease;
}
.header-city-chip:hover { background: rgba(255, 255, 255, 0.28); }
.header-city-chip:active { background: rgba(255, 255, 255, 0.35); }
.header-city-chip-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 14px;
  line-height: 1;
}

/* ---------- City Picker (home) ---------- */
.city-picker {
  margin-bottom: 24px;
}
.city-picker-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 12px;
}
.city-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.city-picker-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}
.city-picker-card:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.city-picker-card:active {
  transform: scale(0.97);
}

/* ---------- Language Bottom Sheet ---------- */
.lang-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.lang-sheet {
  width: 100%;
  max-width: var(--max-width);
  background: var(--card);
  border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: slideUp 0.22s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.lang-sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 4px auto 12px;
}

.lang-sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  padding: 0 4px 10px;
  margin: 0;
}

.lang-sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  min-height: 48px;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lang-sheet-item:active { background: var(--bg); }

.lang-sheet-item.active {
  font-weight: 700;
  color: var(--text);
  background: color-mix(in oklab, var(--primary) 9%, white);
}

.lang-sheet-flag { font-size: 22px; line-height: 1; }

.lang-sheet-name { flex: 1; font-size: 14.5px; font-weight: 600; }

.lang-sheet-check { font-size: 16px; font-weight: 800; color: var(--primary); }

.phrase-customize-cta {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--surface, #f5f5f5);
  border: 1px dashed var(--primary);
  border-radius: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.phrase-customize-cta:active { opacity: 0.7; }

/* ---------- Bottom Nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  min-height: var(--nav-height);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  min-width: 44px;
  padding: 6px 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-tab.active { color: var(--primary); font-weight: 800; }
.nav-icon { font-size: 22px; line-height: 1; display: flex; }
.nav-icon svg { width: 22px; height: 22px; display: block; }
.nav-label { font-weight: inherit; }

/* ---------- Page content ---------- */
.page-content {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 44px + 24px);
  overflow-y: auto;
}

/* ---------- Scenario Grid ---------- */
.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.scenario-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.scenario-card:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-lg);
}

.scenario-icon { font-size: 32px; line-height: 1; }

.scenario-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.scenario-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ---------- Scenario intro ---------- */
.scenario-intro {
  text-align: center;
  padding: 16px 0;
}
.scenario-intro-icon { font-size: 48px; }
.scenario-intro-desc {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ---------- Section title ---------- */
.section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 16px 0 8px;
  color: var(--text);
}

/* ---------- Script List ---------- */
.scripts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.script-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s;
}

.script-item:active { transform: scale(0.98); }

.script-title {
  font-size: 14.5px;
  font-weight: 700;
}

.script-count {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.script-arrow {
  font-size: 22px;
  color: var(--primary);
  font-weight: 300;
}

/* ---------- Phrase Card ---------- */
.phrase-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.phrase-card.essential { border-left: 4px solid var(--primary); }
.phrase-card.emergency { border-left: 4px solid var(--emergency); background: var(--emergency-bg); }
.phrase-card.compact { padding: 12px; }

.phrase-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-essential { background: var(--primary-bg); color: var(--primary-dark); }
.badge-emergency { background: var(--emergency-bg); color: var(--emergency); }
.badge-step { background: var(--primary-bg); color: var(--primary-dark); }

/* Meaning nella lingua del turista (testo principale, grande) */
.phrase-meaning-primary {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 6px;
}

.compact .phrase-meaning-primary { font-size: 17px; }

/* Frase italiana (secondaria, sotto) */
.phrase-it-secondary {
  font-size: 15px;
  color: var(--primary-dark);
  font-weight: 600;
  font-style: italic;
  margin-bottom: 8px;
  line-height: 1.35;
}

.compact .phrase-it-secondary { font-size: 14px; }

/* legacy (mantenuti per overlay e compatibilita) */
.phrase-it {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}

.compact .phrase-it { font-size: 17px; }

.phrase-meaning {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-style: italic;
}

.phrase-tip {
  font-size: 13px;
  background: var(--primary-bg);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--text);
}

.tip-label {
  font-weight: 700;
  color: var(--primary-dark);
}

/* ---------- Phrase Actions ---------- */
.phrase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font);
}

.btn:active { transform: scale(0.95); }

.btn-play {
  background: var(--primary);
  color: #fff;
}
.btn-play:active { background: var(--primary-dark); }

.btn-slow {
  background: var(--primary-bg);
  color: var(--primary-dark);
}

.btn-stop {
  background: #F3F4F6;
  color: var(--text-secondary);
}

.btn-show {
  background: var(--primary-bg);
  color: var(--primary-dark);
}

.btn-fav {
  background: #FFF;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-fav.is-fav {
  background: var(--emergency-bg);
  color: var(--emergency);
  border-color: var(--emergency);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  font-size: 15px;
}

.btn-step-prev, .btn-step-next {
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  font-size: 14px;
}

/* ---------- Step Navigation ---------- */
.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  padding: 0 4px;
}

.step-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.step-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

/* ---------- Script all-list ---------- */
.script-all-title {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  user-select: none;
  -webkit-user-select: none;
}

.script-all-title::after { content: ' \25BC'; font-size: 10px; }
.script-all-title.expanded::after { content: ' \25B2'; }

.script-all-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.script-all-list.expanded { max-height: 2000px; }

.mini-phrase {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mini-phrase:last-child { border-bottom: none; }
.mini-phrase.current { background: var(--primary-bg); border-radius: var(--radius-sm); }

.mini-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  min-width: 20px;
  margin-top: 2px;
}

.mini-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mini-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.mini-it {
  font-size: 12px;
  color: var(--primary-dark);
  font-style: italic;
  line-height: 1.3;
}

/* ---------- Search ---------- */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 18px;
  pointer-events: none;
  opacity: 0.5;
}

.search-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14.5px;
  font-family: var(--font);
  background: var(--card);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus { border-color: var(--primary); }
.search-input::placeholder { color: var(--text-light); }

.search-results { margin-top: 16px; }

/* ---------- Show Overlay (full-screen) ---------- */
.show-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #111827;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-step {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.overlay-text {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.3;
  max-width: 90%;
  word-break: break-word;
}

.overlay-meaning {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  margin-top: 16px;
  font-style: italic;
  max-width: 90%;
}

.overlay-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-overlay-play, .btn-overlay-slow {
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font);
}

.btn-overlay-slow {
  background: rgba(255,255,255,0.15);
}

.btn-overlay-copy {
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 12px 20px;
  font-size: 15px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
}

.overlay-nav {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.btn-overlay-prev, .btn-overlay-next {
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 12px 24px;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font);
}

/* ---------- Favorites / Empty ---------- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}
/* Empty-state dentro la griglia esperienze: occupa tutte le colonne, centrato, 90% */
.exp-grid .empty-state {
  grid-column: 1 / -1;
  width: 90%;
  margin: 0 auto;
}

/* ---------- Settings ---------- */
.settings-page { padding-bottom: 24px; }

.settings-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.settings-section h3 {
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.lang-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.lang-btn.active {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.lang-flag { font-size: 22px; }

.speed-btns {
  display: flex;
  gap: 8px;
}

.speed-btn {
  flex: 1;
  padding: 12px;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.2s, background 0.2s;
}

.speed-btn.active {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary-dark);
}

.tts-warning {
  margin-top: 10px;
  padding: 10px;
  background: var(--emergency-bg);
  border-radius: var(--radius-sm);
  color: var(--emergency);
  font-size: 13px;
}

.about-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- Loading / Error ---------- */
.loading-state, .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 16px;
  min-height: 60vh;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Hotel Search Banner ---------- */
.hotel-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 16px;
  background: var(--card);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.hotel-banner:active {
  transform: scale(0.98);
  box-shadow: var(--shadow);
}

.hotel-banner-icon {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}

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

.hotel-banner-text strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
}

.hotel-banner-text span {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.hotel-banner-arrow {
  font-size: 28px;
  color: var(--primary);
  font-weight: 300;
  flex-shrink: 0;
}

/* ---------- Filter Chips ---------- */
.filter-chips-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.filter-scroll-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--primary);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  box-shadow: var(--shadow);
}
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font);
}
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.chip:active { opacity: 0.8; }

/* ---------- Experience Cards ---------- */
.exp-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: var(--text);
}
.exp-card:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-lg);
}
.exp-card-img {
  width: 100%;
  height: 95px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.exp-card-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.exp-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.exp-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
}
.exp-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.exp-card-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 10px;
  background: var(--primary-bg);
  color: var(--primary-dark);
}

/* ---------- Experience Grid ---------- */
.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

/* ---------- Esperienze page — compact filters ---------- */
.page-esperienze .section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 10px 0 2px;
}
.page-esperienze .filter-chips {
  padding: 4px 0 2px;
  flex: 1;
}
.page-esperienze .chip {
  padding: 6px 12px;
  font-size: 12px;
}

/* ---------- Auth Forms ---------- */
.page-auth .auth-form {
  max-width: 400px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.auth-form .form-group {
  margin-bottom: 1rem;
}

.auth-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary, #1a1a1a);
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.auth-form .btn-auth-submit {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary, #2563eb);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 0.5rem;
}

.auth-form .btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-form .auth-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  min-height: 1.25rem;
}

.auth-form .auth-link {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--primary, #2563eb);
}

.auth-link-inline {
  color: var(--primary, #2563eb);
  text-decoration: underline;
  cursor: pointer;
  margin-left: 0.25rem;
}

.verify-page {
  max-width: 480px;
  margin: 1.5rem auto;
  padding: 0 1rem;
  text-align: center;
}

.verify-heading {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  color: #111;
}

.verify-body {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.verify-body strong { color: #111; word-break: break-all; }

.verify-status {
  min-height: 1.25rem;
  font-size: 0.875rem;
  color: #16a34a;
  margin-top: 0.75rem;
}

.verify-page .btn-auth-submit {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
}

.verify-page .auth-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--primary, #2563eb);
  text-decoration: none;
}

.settings-section .btn-logout {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #dc2626;
  background: #fff;
  border: 1px solid #dc2626;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1rem;
}

/* ---------- Paywall Overlay ---------- */
.paywall-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(17, 24, 39, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.paywall-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}
.paywall-headline {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 16px;
  color: var(--text);
}
.paywall-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}
.paywall-features li {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  padding: 8px 0;
  color: var(--text);
}
.paywall-cta {
  display: block;
  width: 100%;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.paywall-cta:active {
  opacity: 0.8;
}
.paypal-container {
  margin-top: 16px;
}

/* ---------- WhatsApp Concierge Button ---------- */
.whatsapp-btn {
  position: fixed;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 16px);
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  /* Verde WhatsApp fisso — non cambia con lo stato premium/free (redesign Sicily GO) */
  background: #25D366;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}
.whatsapp-btn:active {
  transform: scale(0.95);
}
.whatsapp-btn.premium,
.whatsapp-btn.free {
  background: #25D366;
  color: #fff;
}

/* ---------- Payment Success Banner ---------- */
.payment-success {
  background: #ECFDF5;
  border: 1px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.payment-success .close-banner {
  background: none;
  border: none;
  color: var(--success);
  font-size: 18px;
  cursor: pointer;
  padding: 0 0 0 8px;
}

/* ---------- Custom Phrases ---------- */
.custom-phrase-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
  align-items: center;
}
.custom-phrase-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  background: var(--card);
  color: var(--text);
}
.custom-phrase-input:focus {
  outline: none;
  border-color: var(--primary);
}
.custom-phrase-counter {
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}
.custom-phrase-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.custom-phrase-text {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.custom-phrase-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-delete-phrase {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  opacity: 0.6;
}
.btn-delete-phrase:hover {
  opacity: 1;
}
.settings-link {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

/* Favorites sync indicator */
.btn-fav.syncing {
  opacity: 0.6;
}

/* ---------- Desktop enhancements ---------- */
@media (min-width: 481px) {
  body { background: #E5DDD5; }
  #app {
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    background: var(--bg);
  }
  .scenario-grid { grid-template-columns: 1fr 1fr 1fr; }
  .exp-grid { grid-template-columns: 1fr 1fr 1fr; }
  .exp-card-img { height: 120px; }
  .qa-grid { grid-template-columns: 1fr 1fr; }
  .overlay-text { font-size: 42px; }
}

/* ============================================================
   Desktop gate — la web app è mobile-only
   ============================================================ */
#desktop-gate { display: none; }

@media (min-width: 1024px) {
  #desktop-gate {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: radial-gradient(circle at 50% 40%, #122a4a 0%, #0b1c33 60%, #060f1d 100%);
    color: #FAF7E6;
    text-align: center;
  }
  /* nasconde l'app sotto l'overlay quando si è da desktop */
  #app { display: none; }
  body { overflow: hidden; }

  .desktop-gate__inner {
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .desktop-gate__logo {
    width: 340px;
    height: auto;
    object-fit: contain;
  }
  .desktop-gate__tagline {
    font-size: 18px;
    font-weight: 500;
    color: #FAF7E6;
    margin-top: -8px;
  }

  .desktop-gate__qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 12px 0 4px;
    padding: 14px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  }
  .desktop-gate__qr img { display: block; border-radius: 6px; }
}

/* ============================================================
   Sicily GO — Home redesign (navy + arancio, Poppins)
   ============================================================ */

/* ---------- Home header (brand lockup) ---------- */
.home-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--primary);
  color: #fff;
  flex-shrink: 0;
}
.home-brand { display: flex; align-items: center; }
.home-brand-logo { height: 38px; width: auto; display: block; }

.home-lang-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.16);
  border: none;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}
.home-lang-pill .lang-flag { font-size: 15px; line-height: 1; }

.home-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Home content layout ---------- */
.page-home .page-content {
  padding: 14px 16px;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 90px);
}
/* Il wrapper interno è l'unico figlio diretto: impila le sezioni con gap costante */
.page-home .page-content > div {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.page-home .page-content > div > * { margin: 0; }

/* ---------- City chips row ---------- */
.home-city-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
}
.home-city-row::-webkit-scrollbar { display: none; }
.home-city-chip {
  flex-shrink: 0;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.home-city-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------- Section headings ---------- */
.home-h-title { font-size: 21px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.3; }
.home-h-title.sm { font-size: 17px; }
.home-h-sub { font-size: 13.5px; color: var(--text-secondary); margin-top: 3px; }

/* ---------- Quick Actions ---------- */
.home-qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}
.home-qa-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 16px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.home-qa-card:active { transform: scale(0.97); }
.home-qa-emoji { font-size: 28px; line-height: 1; }
.home-qa-title { font-size: 13.5px; font-weight: 700; }

/* ---------- Scenario cards (centered grid) ---------- */
.home-scen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.home-scen-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  font-family: var(--font);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.home-scen-card:active { transform: scale(0.97); }
.home-scen-ico { font-size: 30px; line-height: 1; }
.home-scen-txt { display: flex; flex-direction: column; gap: 1px; }
.home-scen-title { font-size: 14.5px; font-weight: 700; }
.home-scen-desc { font-size: 12.5px; color: var(--text-secondary); line-height: 1.35; }

/* ---------- Promo banners (Experiences / Stays / Hotel) ---------- */
.home-promo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
  color: #fff;
  text-align: left;
  transition: transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.home-promo:active { transform: scale(0.98); }
.home-promo-exp {
  background: linear-gradient(135deg, #16345C 0%, #2563A8 100%);
  box-shadow: 0 10px 24px rgba(22, 52, 92, 0.35);
}
.home-promo-stay {
  background: linear-gradient(135deg, #D9531E 0%, #F58A2E 100%);
  box-shadow: 0 10px 24px rgba(217, 83, 30, 0.35);
}
.home-promo-hotel {
  background: linear-gradient(135deg, #0B6E5D 0%, #16997E 100%);
  box-shadow: 0 10px 24px rgba(11, 110, 93, 0.35);
}
.home-promo-food {
  background: linear-gradient(135deg, #7A1F3D 0%, #C0392B 100%);
  box-shadow: 0 10px 24px rgba(122, 31, 61, 0.35);
}
.home-promo-ico {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.home-promo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.home-promo-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.home-promo-txt strong { font-size: 16px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.home-promo-txt span { font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,0.95); }
.home-promo-arrow { font-size: 22px; font-weight: 300; color: #fff; flex-shrink: 0; }
