/* Il Diario di Lampedusa — PWA stylesheet
   Palette "Mare" identica al sito */
:root {
  --bg-body: #e0f7fa;
  --white: #ffffff;
  --turquoise: #4dd0e1;
  --sea-blue: #0288d1;
  --sun-yellow: #ffd54f;
  --navy: #0b1e4c;
  --text-muted: #5b6577;
  --header-h: 80px;
  --tabbar-h: 64px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(11, 30, 76, 0.08);
  --shadow-md: 0 6px 18px rgba(11, 30, 76, 0.12);
  --font-display: 'Satisfy', 'Brush Script MT', cursive;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg-body); color: var(--navy); font-family: var(--font-body); }
body { min-height: 100vh; padding-top: var(--header-h); padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--sea-blue); text-decoration: none; }

/* HEADER */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: var(--white); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; padding: 0 14px; z-index: 50;
  padding-top: env(safe-area-inset-top);
}
.app-header.with-back { padding-left: 4px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 22px; color: var(--sea-blue);
  text-decoration: none; flex: 1; line-height: 1;
}
.brand-logo {
  width: 64px; height: 64px; border-radius: 50%;
  flex-shrink: 0; display: inline-block;
  position: relative; overflow: hidden;
  background: var(--sea-blue);
  border: 3px solid var(--white);
  box-shadow:
    0 0 0 2px var(--sea-blue),
    0 4px 12px rgba(11, 30, 76, 0.3);
}
.brand-logo-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.55); transform-origin: center 48%;
  display: block;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand small { display: block; font-family: var(--font-body); font-size: 10px; color: var(--text-muted); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 2px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; background: transparent; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--navy); cursor: pointer;
}
.icon-btn:active { background: rgba(2, 136, 209, 0.12); }
.icon-btn svg { width: 22px; height: 22px; }

/* SEARCH OVERLAY */
.search-overlay {
  position: fixed; inset: 0; background: var(--white); z-index: 80;
  display: none; flex-direction: column;
}
.search-overlay.open { display: flex; }
.search-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #e2eef3; }
.search-bar input {
  flex: 1; height: 40px; border: 0; outline: 0; background: #f0f8fa;
  border-radius: 20px; padding: 0 14px; font-size: 16px;
}
.search-results { flex: 1; overflow-y: auto; padding: 8px 0; }
.search-result { padding: 12px 16px; border-bottom: 1px solid #eef5f8; display: flex; gap: 12px; align-items: center; }
.search-result img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: #d0eef5; }
.search-result .meta { font-size: 12px; color: var(--text-muted); }

/* MAIN */
main { padding: 12px 14px 24px; max-width: 720px; margin: 0 auto; }

/* HERO HOME */
.hero {
  background: linear-gradient(135deg, var(--sea-blue), var(--turquoise));
  color: var(--white); border-radius: var(--radius); padding: 18px 18px 16px;
  margin-bottom: 16px; box-shadow: var(--shadow-md);
}
.hero h1 { margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 1; }
.hero p { margin: 6px 0 0; font-size: 14px; opacity: 0.92; }

/* SECTIONS */
.section-title { font-size: 15px; font-weight: 700; color: var(--navy); margin: 18px 4px 10px; display: flex; justify-content: space-between; align-items: baseline; }
.section-title a { font-size: 12px; font-weight: 600; color: var(--sea-blue); }

/* HOME CATEGORY TILES */
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile {
  background: var(--white); border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  box-shadow: var(--shadow-sm); min-height: 96px;
  color: var(--navy); position: relative; overflow: hidden;
  transition: transform 0.12s ease;
}
.tile:active { transform: scale(0.97); }
.tile .emoji { font-size: 26px; }
.tile .label { font-weight: 700; font-size: 14px; }
.tile .count { font-size: 11px; color: var(--text-muted); }
.tile.--accent-yellow { background: var(--sun-yellow); }
.tile.--accent-turquoise { background: var(--turquoise); color: var(--white); }
.tile.--accent-turquoise .count { color: rgba(255,255,255,0.85); }
.tile.--accent-navy { background: var(--navy); color: var(--white); }
.tile.--accent-navy .count { color: rgba(255,255,255,0.7); }

/* SUBCATEGORY CHIPS (IG-style) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; min-width: 64px; text-align: center;
  background: var(--white); border-radius: 32px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; color: var(--navy);
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.chip.active { background: var(--sea-blue); color: var(--white); }

/* CARD LIST */
.card-list { display: grid; gap: 12px; }
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); display: grid; grid-template-columns: 110px 1fr;
}
.card-cover { background: #d0eef5; aspect-ratio: 1 / 1; object-fit: cover; width: 110px; height: 100%; }
.card-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-cat { font-size: 11px; color: var(--sea-blue); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--navy); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-desc { font-size: 12px; color: var(--text-muted); margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.card-row .save-btn { margin-left: auto; }

/* SAVE BUTTON */
.save-btn {
  background: transparent; border: 0; cursor: pointer; padding: 4px;
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.save-btn.saved { color: #e53935; }
.save-btn.--anim { animation: pop 0.32s ease; }
@keyframes pop { 0%{ transform: scale(1); } 40%{ transform: scale(1.45); } 100%{ transform: scale(1); } }

/* SCHEDA (detail) */
.detail-cover { aspect-ratio: 16 / 10; background: #d0eef5; object-fit: cover; width: 100%; border-radius: var(--radius); margin-bottom: 12px; }
.detail-meta { color: var(--sea-blue); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.detail-title { font-family: var(--font-display); font-size: 30px; line-height: 1.05; color: var(--navy); margin: 6px 0 4px; }
.detail-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 14px; }
.detail-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 18px; }
.action-btn {
  background: var(--white); border: 0; border-radius: 12px; padding: 10px 6px;
  font-size: 12px; font-weight: 600; color: var(--navy); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
}
.action-btn.primary { background: var(--sea-blue); color: var(--white); }
.action-btn.whatsapp { background: #25d366; color: var(--white); }
.action-btn svg { width: 20px; height: 20px; }
.detail-section { background: var(--white); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.detail-section h3 { margin: 0 0 8px; font-size: 14px; color: var(--sea-blue); text-transform: uppercase; letter-spacing: 0.04em; }
.detail-section p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--navy); }
.rich-content { font-size: 14px; line-height: 1.55; color: var(--navy); }
.rich-content p { margin: 0 0 10px; }
.rich-content p:last-child { margin-bottom: 0; }
.rich-content blockquote { border-left: 3px solid var(--sea-blue); background: #f0fbfd; margin: 10px 0; padding: 8px 12px; font-style: italic; color: var(--navy); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.rich-content strong { color: var(--navy); font-weight: 700; }
.rich-content em { font-style: italic; }
.rich-content mark { background: var(--sun-yellow); color: var(--navy); padding: 1px 4px; border-radius: 3px; }
.rich-content h2, .rich-content h3, .rich-content h4 { margin: 14px 0 6px; color: var(--navy); font-size: 16px; text-transform: none; letter-spacing: 0; }
.rich-content ul, .rich-content ol { margin: 8px 0 10px 20px; padding: 0; }
.rich-content li { margin-bottom: 4px; }
.rich-content a { color: var(--sea-blue); text-decoration: underline; }
.rich-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); display: block; margin: 8px 0; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 4px; }
.gallery-item { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 6px; background: #e9eef5; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.gallery-item:hover img { transform: scale(1.05); }

/* Blocco editoriale non-concorrenziale in fondo alla scheda attivita' */
.explore-block { margin-top: 16px; padding: 0 4px 8px; }
.explore-block .section-title { font-size: 14px; color: var(--sea-blue); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 10px; }
.explore-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.explore-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--navy);
  transition: transform .15s ease, box-shadow .15s ease;
}
.explore-card:active { transform: scale(.98); }
.explore-card .ic { font-size: 24px; line-height: 1; }
.explore-card strong { display: block; font-size: 14px; color: var(--navy); }
.explore-card em { display: block; font-size: 12px; color: var(--text-muted); font-style: normal; margin-top: 2px; }

/* TAB BAR */
.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--tabbar-h);
  background: var(--white); box-shadow: 0 -2px 12px rgba(11, 30, 76, 0.08);
  display: flex; align-items: stretch; z-index: 60;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; font-weight: 600; color: var(--text-muted);
  background: transparent; border: 0; cursor: pointer; text-decoration: none;
}
.tab .ic { font-size: 22px; line-height: 1; }
.tab.active { color: var(--sea-blue); }

/* INSTALL BANNER */
.install-banner {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom));
  background: var(--navy); color: var(--white); border-radius: var(--radius);
  padding: 12px 14px; display: none; align-items: center; gap: 12px; z-index: 70;
  box-shadow: var(--shadow-md);
}
.install-banner.show { display: flex; }
.install-banner .icon { width: 38px; height: 38px; border-radius: 10px; background: var(--sea-blue); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.install-banner .txt { flex: 1; font-size: 13px; line-height: 1.3; }
.install-banner .txt strong { font-size: 14px; display: block; }
.install-banner button { background: var(--sun-yellow); color: var(--navy); border: 0; border-radius: 18px; padding: 8px 14px; font-weight: 700; font-size: 13px; cursor: pointer; }
.install-banner .close { background: transparent; color: rgba(255,255,255,0.6); padding: 0 4px; font-size: 18px; }

/* iOS MODAL */
.ios-modal {
  position: fixed; inset: 0; background: rgba(11, 30, 76, 0.55); z-index: 90;
  display: none; align-items: flex-end; justify-content: center;
}
.ios-modal.open { display: flex; }
.ios-modal .sheet {
  background: var(--white); border-radius: 18px 18px 0 0;
  width: 100%; max-width: 480px; padding: 20px 18px 28px; text-align: center;
}
.ios-modal h2 { font-family: var(--font-display); color: var(--sea-blue); margin: 4px 0 8px; font-size: 26px; }
.ios-modal p { color: var(--text-muted); font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.ios-modal .steps { display: grid; gap: 10px; text-align: left; margin-bottom: 16px; }
.ios-modal .step { display: flex; align-items: center; gap: 12px; background: #f0f8fa; padding: 10px; border-radius: 12px; font-size: 13px; }
.ios-modal .step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--sea-blue); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.ios-modal button.close-modal { background: var(--sea-blue); color: var(--white); border: 0; border-radius: 22px; padding: 10px 22px; font-weight: 700; cursor: pointer; }

/* EMPTY STATE */
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty .ic { font-size: 48px; margin-bottom: 10px; }
.empty h3 { color: var(--navy); margin: 0 0 6px; }
.empty p { margin: 0; font-size: 14px; }

/* MAGAZINE / PROFILO */
.list-rows { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.list-rows .row {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border-bottom: 1px solid #eef5f8; color: var(--navy); font-size: 14px;
}
.list-rows .row:last-child { border-bottom: 0; }
.list-rows .row .ic { font-size: 20px; color: var(--sea-blue); }
.list-rows .row .arrow { margin-left: auto; color: var(--text-muted); }

/* UTIL */
.muted { color: var(--text-muted); }
.center { text-align: center; }
.btn-load-more { display: block; margin: 14px auto 0; background: var(--sea-blue); color: var(--white); border: 0; padding: 10px 18px; border-radius: 22px; font-weight: 700; cursor: pointer; }

/* small screens */
@media (max-width: 360px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .card { grid-template-columns: 92px 1fr; }
  .card-cover { width: 92px; }
}

/* ============================================================
   AUTH / PROFILE / TOAST — palette Mare
   ============================================================ */

/* Header avatar button */
.acct-btn { padding: 0; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: var(--white);
  font-weight: 700; border-radius: 50%;
  letter-spacing: 0.02em; user-select: none;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }

/* Auth tabs */
.auth-wrap { max-width: 460px; margin: 0 auto; }
.auth-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 18px 18px 22px;
  margin-bottom: 14px;
}
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: #f0f8fa; border-radius: 28px; padding: 4px;
  margin-bottom: 16px;
}
.auth-tab {
  border: 0; background: transparent; padding: 9px 8px;
  border-radius: 24px; font-weight: 700; font-size: 13px;
  color: var(--text-muted); cursor: pointer;
}
.auth-tab.active { background: var(--white); color: var(--sea-blue); box-shadow: var(--shadow-sm); }

/* Form controls */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 700; color: var(--navy); letter-spacing: 0.02em; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field textarea {
  height: 46px; border: 1.5px solid #e2eef3; background: var(--white);
  border-radius: 12px; padding: 0 14px; font-size: 15px; color: var(--navy);
  outline: 0; transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: var(--font-body); width: 100%;
}
.field textarea { height: auto; min-height: 80px; padding: 10px 14px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--sea-blue);
  box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.18);
}
.field .hint { font-size: 11px; color: var(--text-muted); }
.field .error { font-size: 12px; color: #e53935; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Buttons */
.btn {
  height: 48px; border: 0; border-radius: 26px; font-weight: 700; font-size: 15px;
  cursor: pointer; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background: var(--sea-blue); color: var(--white); }
.btn-primary:active { background: #026fa9; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--sea-blue); }
.btn-outline { background: var(--white); color: var(--navy); border: 1.5px solid #e2eef3; }
.btn-danger { background: #e53935; color: var(--white); }

/* OAuth buttons */
.oauth-row { display: grid; gap: 8px; margin-bottom: 8px; }
.oauth-btn {
  height: 46px; background: var(--white); border: 1.5px solid #e2eef3;
  border-radius: 24px; font-size: 14px; font-weight: 700; color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer;
}
.oauth-btn .gicon { width: 18px; height: 18px; flex-shrink: 0; }
.oauth-btn.apple { background: #000; color: #fff; border-color: #000; }

.divider {
  display: flex; align-items: center; gap: 10px; margin: 14px 0;
  color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #e2eef3; }

/* Radio / chip groups */
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-row label {
  flex: 1; min-width: 80px; text-align: center;
  background: var(--white); border: 1.5px solid #e2eef3;
  border-radius: 22px; padding: 9px 10px; font-size: 13px; font-weight: 600;
  color: var(--navy); cursor: pointer;
}
.radio-row input { display: none; }
.radio-row input:checked + span { color: var(--white); }
.radio-row label:has(input:checked) { background: var(--sea-blue); border-color: var(--sea-blue); color: var(--white); }

/* Multi-select chips */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-select {
  background: var(--white); border: 1.5px solid #e2eef3;
  border-radius: 22px; padding: 8px 14px; font-size: 13px;
  font-weight: 600; color: var(--navy); cursor: pointer;
  user-select: none; transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.chip-select.active {
  background: var(--turquoise); color: var(--white); border-color: var(--turquoise);
}

/* Profile score bar */
.score-card {
  background: var(--white); border-radius: var(--radius); padding: 14px;
  margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.score-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.score-head strong { font-size: 13px; color: var(--navy); text-transform: uppercase; letter-spacing: 0.04em; }
.score-head .val { color: var(--sea-blue); font-weight: 700; font-size: 18px; }
.score-bar {
  height: 8px; background: #e2eef3; border-radius: 6px; overflow: hidden;
}
.score-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--turquoise), var(--sea-blue));
  width: 0%; transition: width 0.4s ease;
}
.score-cta { margin-top: 10px; font-size: 12px; color: var(--text-muted); }

/* Profile sections */
.profile-head {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border-radius: var(--radius); padding: 14px;
  margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.profile-head .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-head .who strong { font-size: 16px; color: var(--navy); }
.profile-head .who span { font-size: 12px; color: var(--text-muted); word-break: break-all; }

.section-card {
  background: var(--white); border-radius: var(--radius);
  padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.section-card h3 {
  margin: 0 0 12px; font-size: 13px; color: var(--sea-blue);
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  background: #f0f8fa; border-radius: 12px; padding: 10px;
  text-align: center;
}
.stat strong { display: block; font-size: 20px; color: var(--sea-blue); }
.stat small { font-size: 11px; color: var(--text-muted); }

/* Auth hero (logged-out profile page) */
.auth-hero {
  background: linear-gradient(135deg, var(--sea-blue), var(--turquoise));
  color: var(--white); border-radius: var(--radius); padding: 22px 18px 20px;
  text-align: center; margin-bottom: 14px; box-shadow: var(--shadow-md);
}
.auth-hero h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 26px; }
.auth-hero p { margin: 0 0 14px; font-size: 14px; opacity: 0.95; }
.auth-hero .btn { background: var(--white); color: var(--sea-blue); }

/* Toast */
.toast-host {
  position: fixed; left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; z-index: 95;
}
.toast {
  background: var(--navy); color: var(--white);
  padding: 11px 18px; border-radius: 22px; font-size: 14px;
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.2s ease, transform 0.25s ease;
  pointer-events: auto; max-width: 90vw;
}
.toast.in { opacity: 1; transform: translateY(0); }
.toast--err { background: #c62828; }
.toast--ok { background: #2e7d32; }

/* Banner for guests */
.guest-banner {
  background: var(--sun-yellow); color: var(--navy);
  border-radius: var(--radius); padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   HOME (mirror del sito web): hero, category tiles, editorial,
   sponsor strip. Convive con la palette esistente.
   ============================================================ */

/* Site hero (foto Lampedusa + claim) — rispecchia l'home Astro */
.site-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  margin: 4px 0 18px;
  box-shadow: var(--shadow-md);
  background: #0b1e4c url('icons/hero-mobile.jpg') center/cover no-repeat;
  color: var(--white);
  display: flex; align-items: flex-end;
}
@media (min-width: 560px) {
  .site-hero { background-image: url('icons/hero-tablet.jpg'); min-height: 380px; }
}
.site-hero__overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(11,30,76,0.05) 0%, rgba(11,30,76,0.55) 75%, rgba(11,30,76,0.85) 100%);
}
.site-hero__body {
  position: relative; z-index: 1; padding: 20px 18px 22px; width: 100%;
}
.site-hero__kicker {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
.site-hero__claim {
  margin: 8px 0 6px;
  font-family: var(--font-body);
  font-size: clamp(24px, 6.5vw, 32px);
  line-height: 1.1; font-weight: 800; color: var(--white);
  text-shadow: 0 2px 12px rgba(0,0,0,0.55), 0 1px 3px rgba(0,0,0,0.45);
}
.site-hero__claim .script {
  font-family: var(--font-display);
  color: var(--sun-yellow);
  font-weight: 400;
  font-size: 1.18em; line-height: 1;
  display: inline-block;
}
.site-hero__sub {
  margin: 4px 0 14px;
  font-size: 14px; line-height: 1.45;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.site-hero__ctas { display: flex; gap: 8px; flex-wrap: wrap; }
.site-hero__ctas .btn {
  height: 42px; padding: 0 16px; font-size: 14px; border-radius: 999px;
}
.site-hero__ctas .btn-primary { background: var(--sun-yellow); color: var(--navy); }
.site-hero__ctas .btn-primary:active { background: #e6c043; }
.site-hero__ctas .btn-ghost {
  background: rgba(255,255,255,0.14);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.4);
}
.site-hero__ctas .btn-ghost:active { background: rgba(255,255,255,0.22); }

/* Category tile con foto (stile Astro) */
.cat-photo-grid {
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
@media (min-width: 480px) { .cat-photo-grid { grid-template-columns: repeat(2, 1fr); } }
.cat-photo {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--white);
}
.cat-photo__img { position: absolute; inset: 0; }
.cat-photo__img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.cat-photo:active .cat-photo__img img { transform: scale(1.04); }
.cat-photo__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,30,76,0) 35%, rgba(11,30,76,0.7) 100%);
}
.cat-photo__body {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.cat-photo__title {
  font-size: 18px; font-weight: 800; color: var(--white);
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}
.cat-photo__count {
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}

/* Vecchia home-hero (deprecata): la teniamo solo per non rompere pagine
   che potrebbero ancora referenziarla. */
.home-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #0b1e4c 0%, #16306e 60%, #35adef 100%);
  color: var(--white);
  padding: 22px 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
  isolation: isolate;
}
.home-hero::after{
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(60% 80% at 80% 20%, rgba(255,213,79,.22), transparent 60%),
    radial-gradient(50% 60% at 10% 90%, rgba(77,208,225,.35), transparent 60%);
}
.home-hero .kicker {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.home-hero h1 {
  margin: .55em 0 .15em;
  font-family: var(--font-body);
  font-size: clamp(24px, 6.5vw, 32px);
  line-height: 1.1; font-weight: 800; color: var(--white);
}
.home-hero h1 .script {
  font-family: var(--font-display);
  color: var(--sun-yellow);
  font-weight: 400;
  font-size: 1.18em; line-height: 1;
  display: inline-block;
}
.home-hero p {
  margin: .3em 0 14px;
  font-size: 14px; line-height: 1.45;
  color: rgba(255,255,255,.92);
}
.home-hero-ctas { display: flex; gap: 8px; flex-wrap: wrap; }
.home-hero-ctas .btn {
  height: 42px; padding: 0 16px; font-size: 14px;
  border-radius: 999px;
}
.home-hero-ctas .btn-primary {
  background: var(--sun-yellow); color: var(--navy);
}
.home-hero-ctas .btn-primary:active { background: #e6c043; }
.home-hero-ctas .btn-ghost {
  background: rgba(255,255,255,.14);
  color: var(--white);
  border: 1px solid rgba(255,255,255,.4);
}
.home-hero-ctas .btn-ghost:active { background: rgba(255,255,255,.22); }

/* Section heads (eyebrow + h2 + optional more link) */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 10px; margin: 22px 4px 12px;
}
.section-head .eyebrow {
  display: block;
  color: var(--text-muted);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 2px;
}
.section-head .section-h2 {
  margin: 0; color: var(--navy);
  font-size: 18px; font-weight: 800; line-height: 1.2;
}
.section-head .more {
  font-size: 12px; font-weight: 700; color: var(--sea-blue); white-space: nowrap;
}

/* Category tiles — stile sito (icone+etichetta su griglia 4col) */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 360px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
.cat-tile {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  text-decoration: none; color: var(--navy);
  min-height: 86px;
  text-align: center;
  transition: transform .12s ease;
}
.cat-tile:active { transform: scale(.97); }
.cat-tile .ico {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, #e3f3fc, #fff);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
}
.cat-tile .lbl {
  font-size: 12px; font-weight: 700; line-height: 1.15;
  color: var(--navy);
}
.cat-tile.--accent-yellow { background: var(--sun-yellow); }
.cat-tile.--accent-yellow .ico { background: rgba(255,255,255,.55); }
.cat-tile.--accent-turquoise { background: var(--turquoise); color: var(--white); }
.cat-tile.--accent-turquoise .lbl { color: var(--white); }
.cat-tile.--accent-turquoise .ico { background: rgba(255,255,255,.25); }
.cat-tile.--accent-navy { background: var(--navy); color: var(--white); }
.cat-tile.--accent-navy .lbl { color: var(--white); }
.cat-tile.--accent-navy .ico { background: rgba(255,255,255,.14); color: var(--white); }

/* Editorial cards — replica della sezione "Ultimi articoli" del sito */
.editorial-grid {
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
@media (min-width: 560px) {
  .editorial-grid { grid-template-columns: repeat(2, 1fr); }
}
.edit-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  color: var(--navy);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.edit-card:active { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.edit-card .media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #e3f3fc, #fff);
  overflow: hidden;
  display: block;
}
.edit-card .media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.edit-card .media .chip {
  position: absolute; top: 10px; left: 10px;
  background: rgba(11,30,76,.92); color: var(--white);
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
}
.edit-card .body {
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.edit-card .body h3 {
  margin: 0; font-size: 15px; line-height: 1.25; font-weight: 700; color: var(--navy);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.edit-card .open {
  font-size: 13px; font-weight: 700; color: var(--navy);
}

/* Sponsor strip — come sul sito */
.sponsor-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
@media (min-width: 560px) {
  .sponsor-grid { grid-template-columns: repeat(4, 1fr); }
}
.sponsor {
  position: relative;
  background: #fffdf6;
  border: 1px dashed #d6cfb1;
  border-radius: var(--radius);
  padding: 12px;
  display: flex; align-items: center; gap: 10px;
  min-height: 78px;
}
.sponsor::before {
  content: "Sponsor"; position: absolute; top: 6px; right: 8px;
  font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted);
}
.sponsor .logo-ph {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, #fff, #e3f3fc);
  border: 1px solid #e6e9ef; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); font-weight: 800;
}
.sponsor .meta { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.sponsor .meta strong { color: var(--navy); font-size: 13px; line-height: 1.2; }
.sponsor .meta span { color: var(--text-muted); font-size: 11px; }
.guest-banner .ic { font-size: 20px; }
.guest-banner .txt { flex: 1; font-size: 13px; line-height: 1.3; }
.guest-banner .txt strong { display: block; }
.guest-banner a {
  background: var(--navy); color: var(--white); padding: 7px 14px;
  border-radius: 16px; font-size: 12px; font-weight: 700;
}

/* Toggle (checkbox stylable) */
.toggle-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
}
.toggle-row .lbl { flex: 1; font-size: 14px; color: var(--navy); }
.toggle-row .lbl small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.toggle {
  position: relative; width: 44px; height: 26px; flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; inset: 0; background: #cfd8dc;
  border-radius: 26px; cursor: pointer; transition: background 0.2s ease;
}
.toggle .slider::before {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; background: var(--white); border-radius: 50%;
  transition: transform 0.2s ease;
}
.toggle input:checked + .slider { background: var(--sea-blue); }
.toggle input:checked + .slider::before { transform: translateX(18px); }

/* OAuth demo modal */
.oauth-modal {
  position: fixed; inset: 0; background: rgba(11, 30, 76, 0.55); z-index: 92;
  display: none; align-items: flex-end; justify-content: center;
}
.oauth-modal.open { display: flex; }
.oauth-modal .sheet {
  background: var(--white); border-radius: 18px 18px 0 0;
  width: 100%; max-width: 480px; padding: 22px 18px 28px;
}
.oauth-modal h3 { font-family: var(--font-display); color: var(--sea-blue); margin: 0 0 4px; font-size: 24px; }
.oauth-modal .demo-note {
  background: #f0f8fa; color: var(--text-muted);
  padding: 8px 12px; border-radius: 10px;
  font-size: 12px; margin: 8px 0 14px;
}
.oauth-modal .actions { display: flex; gap: 8px; margin-top: 12px; }
.oauth-modal .actions .btn { flex: 1; height: 44px; }

/* Travel planning form (Pianifica il tuo viaggio) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.form-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--navy);
  font-weight: 600;
}
.form-row input,
.form-row select {
  padding: 10px 12px;
  border: 1px solid #d0eef5;
  border-radius: 8px;
  font-size: 14px;
  background: var(--white);
  font-family: inherit;
  color: var(--navy);
}
.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--sea-blue);
  box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.15);
}

/* Inline checkbox-with-label (e.g. "Viaggio con animale domestico").
   Named .travel-toggle to avoid colliding with the existing .toggle
   slider switch already used elsewhere on the profile page. */
.travel-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  cursor: pointer;
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
}
.travel-toggle input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--sea-blue);
  cursor: pointer;
}

/* UTM welcome banner (home page) */
.utm-banner {
  background: var(--sun-yellow);
  color: var(--navy);
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.utm-banner .utm-banner-text { flex: 1; line-height: 1.3; }
.utm-banner .btn {
  padding: 6px 12px;
  font-size: 13px;
  background: var(--navy);
  color: var(--white);
  border-radius: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.utm-banner-close {
  background: transparent;
  border: 0;
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.6;
}
.utm-banner-close:hover { opacity: 1; }

