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

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

:root {
  --primary: #D4603A;
  --primary-dark: #B84E2C;
  --primary-light: #F5A66E;
  --primary-bg: #FEF1EB;
  --bg: #F9F5F1;
  --card: #FFFFFF;
  --text: #1F2937;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --border: #E8E0D8;
  --success: #059669;
  --success-bg: #ECFDF5;
  --emergency: #DC2626;
  --emergency-bg: #FEF2F2;
  --essential-bg: #FFF7ED;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --nav-height: 64px;
  --header-height: 56px;
  --max-width: 480px;
  --font: -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; }

.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);
  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, 0);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  font-size: 11px;
  color: var(--text-secondary);
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-tab.active { color: var(--primary); }
.nav-icon { font-size: 22px; line-height: 1; }
.nav-label { font-weight: 500; }

/* ---------- Page content ---------- */
.page-content {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(var(--nav-height) + 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-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
}

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

.script-title {
  font-size: 15px;
  font-weight: 600;
}

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

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

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

.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(--essential-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: #EEF2FF;
  color: #4338CA;
}

.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: 12px 12px 12px 40px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  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;
}

/* ---------- 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 {
  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: 20px;
  border: 1.5px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font);
}
.chip.active {
  background: var(--primary);
  color: #fff;
}
.chip:active { opacity: 0.8; }

/* ---------- Experience Cards ---------- */
.exp-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, 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-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.exp-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.exp-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.exp-card-tag {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  background: var(--primary-bg);
  color: var(--primary-dark);
}

/* ---------- 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);
}

.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) + 12px);
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
}
.whatsapp-btn:active {
  transform: scale(0.95);
}
.whatsapp-btn.premium {
  background: var(--primary);
  color: #fff;
}
.whatsapp-btn.free {
  background: var(--card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ---------- 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; }
  .qa-grid { grid-template-columns: 1fr 1fr; }
  .overlay-text { font-size: 42px; }
}
