/* ==========================================================================
   THE SICILY TRIP DESIGNER — la faccia pubblica di Epic Sicily.
   Mediterraneo, editoriale, caldo. Navy e turchese del marchio, sabbia e
   terracotta per il calore. Mobile prima di tutto: pollici, non mouse.
   ========================================================================== */

:root {
  --navy: #26315F;
  --navy-deep: #1B2342;
  --turquoise: #5AD7E0;
  --turquoise-soft: #EAF8FA;
  --sand: #F7F1E7;
  --sand-deep: #EFE5D4;
  --terracotta: #C96F4A;
  --gold: #D9A441;
  --ink: #232B4A;
  --grey: #66738A;
  --line: #E3DCCE;
  --paper: #FDFBF7;
  --ok: #2E7D5B;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0 }
html { -webkit-text-size-adjust: 100% }
body {
  font-family: var(--sans); color: var(--ink); background: var(--paper);
  min-height: 100vh; line-height: 1.55;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(90,215,224,.14) 0%, transparent 60%),
    radial-gradient(900px 480px at -10% 8%, rgba(217,164,65,.10) 0%, transparent 55%),
    var(--paper);
}
img, svg { max-width: 100%; display: block }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none }
input, select, textarea { font: inherit; color: inherit }
a { color: var(--navy) }

/* ---- testata ------------------------------------------------------------ */
.pv-top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(253,251,247,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.pv-top-inner {
  max-width: 1160px; margin: 0 auto; padding: 12px 18px;
  display: flex; align-items: center; gap: 14px;
}
.pv-wordmark { display: flex; align-items: baseline; gap: 8px; text-decoration: none }
.pv-wordmark b {
  font-family: var(--serif); font-weight: 600; letter-spacing: .06em;
  color: var(--navy); font-size: 17px;
}
.pv-wordmark span {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 600;
}
.pv-progress { flex: 1; height: 4px; border-radius: 99px; background: var(--sand-deep); overflow: hidden }
.pv-progress i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--turquoise), var(--navy));
  border-radius: 99px; transition: width .45s cubic-bezier(.22,.9,.36,1);
}
.pv-stepcount { font-size: 12px; color: var(--grey); white-space: nowrap; font-variant-numeric: tabular-nums }

/* ---- impalcatura -------------------------------------------------------- */
.pv-shell {
  max-width: 1160px; margin: 0 auto; padding: 22px 18px 120px;
  display: grid; grid-template-columns: 1fr; gap: 26px;
}
@media (min-width: 980px) {
  .pv-shell { grid-template-columns: minmax(0,1fr) 340px; padding-bottom: 60px }
}
.pv-main { min-width: 0 }

/* ---- il passo ----------------------------------------------------------- */
.pv-step { animation: pv-in .38s cubic-bezier(.22,.9,.36,1) }
@keyframes pv-in { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) {
  .pv-step { animation: none }
  .pv-progress i { transition: none }
}

.pv-kicker {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 700; margin-bottom: 10px;
}
.pv-q {
  font-family: var(--serif); font-weight: 500; color: var(--navy);
  font-size: clamp(24px, 4.6vw, 34px); line-height: 1.18; letter-spacing: -.01em;
  margin-bottom: 8px; text-wrap: balance;
}
.pv-sub { color: var(--grey); font-size: 15.5px; max-width: 56ch; margin-bottom: 22px }
.pv-sub b { color: var(--ink); font-weight: 600 }
.pv-reassure { margin-top: 18px; font-size: 13.5px; color: var(--grey); display: flex; gap: 8px; align-items: baseline }
.pv-reassure::before { content: '✓'; color: var(--ok); font-weight: 700 }

/* ---- griglie di carte --------------------------------------------------- */
.pv-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) }
.pv-cards.wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) }
.pv-cards.narrow { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) }

.pv-card {
  text-align: left; background: #fff; border: 1.5px solid var(--line);
  border-radius: 16px; padding: 16px; position: relative;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
  min-height: 44px;
}
.pv-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(38,49,95,.35) }
.pv-card:focus-visible, .pv-chip:focus-visible, .pv-tri:focus-visible, .pv-btn:focus-visible {
  outline: 3px solid var(--turquoise); outline-offset: 2px }
.pv-card.on {
  border-color: var(--navy); box-shadow: 0 0 0 1.5px var(--navy), 0 12px 26px -16px rgba(38,49,95,.4);
  background: linear-gradient(180deg, #fff 0%, var(--turquoise-soft) 140%);
}
.pv-card .t { font-weight: 650; color: var(--navy); font-size: 15.5px; line-height: 1.25 }
.pv-card .d { font-size: 13px; color: var(--grey); margin-top: 5px; line-height: 1.45 }
.pv-card .e { font-size: 22px; margin-bottom: 8px; line-height: 1 }
.pv-card.on::after {
  content: '✓'; position: absolute; top: 10px; right: 12px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 700; display: grid; place-items: center;
}

/* ---- chips -------------------------------------------------------------- */
.pv-chips { display: flex; flex-wrap: wrap; gap: 10px }
.pv-chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 10px 16px; font-size: 14.5px; font-weight: 550; color: var(--ink);
  transition: all .13s ease; min-height: 44px;
}
.pv-chip:hover { border-color: var(--navy) }
.pv-chip.on { background: var(--navy); border-color: var(--navy); color: #fff }
.pv-chip.top { background: var(--terracotta); border-color: var(--terracotta); color: #fff }
.pv-chip .n { opacity: .75; font-weight: 400; margin-left: 4px; font-size: 12.5px }

/* ---- carte destinazione (tri-stato) ------------------------------------- */
.pv-tri {
  text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
  overflow: hidden; padding: 0; position: relative; transition: transform .14s ease, box-shadow .14s ease;
}
.pv-tri:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(38,49,95,.35) }
.pv-tri .art { height: 82px; position: relative; background: var(--sand) }
.pv-tri .art svg, .pv-tri .art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.pv-tri .body { padding: 10px 12px 12px }
.pv-tri .t { font-weight: 650; color: var(--navy); font-size: 14.5px }
.pv-tri .d { font-size: 12px; color: var(--grey); margin-top: 2px }
.pv-tri .state {
  position: absolute; top: 8px; right: 8px; border-radius: 999px; font-size: 12px;
  font-weight: 700; padding: 4px 10px; display: none; box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.pv-tri.must { border-color: var(--terracotta); box-shadow: 0 0 0 1.5px var(--terracotta) }
.pv-tri.must .state { display: block; background: var(--terracotta); color: #fff }
.pv-tri.like { border-color: var(--navy); box-shadow: 0 0 0 1.5px var(--navy) }
.pv-tri.like .state { display: block; background: var(--navy); color: #fff }
.pv-tri-hint { font-size: 13px; color: var(--grey); margin: 10px 0 16px }

/* ---- la mappa della Sicilia ---------------------------------------------- */
.pv-map {
  background: linear-gradient(180deg, #DDF1F5 0%, #CBE9F0 100%);
  border: 1.5px solid #BFE2E9; border-radius: 18px;
  padding: 14px 14px 8px; margin-bottom: 18px;
}
.pv-map svg { width: 100%; height: auto; display: block; max-height: 300px }
.pv-map .isola { fill: #F3EAD5; stroke: #26315F; stroke-width: 1.2; stroke-linejoin: round }
.pv-map .isoletta { fill: #F3EAD5; stroke: #26315F; stroke-width: .9 }
.pv-map .d { fill: #9FB4BE }
.pv-map text {
  font-family: var(--sans); font-size: 9px; font-weight: 700; fill: var(--navy);
  paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 2.6px;
}
.pv-map .cap { font-size: 11.5px; color: #4E6B74; text-align: center; padding: 6px 0 4px }

/* ---- contatori (+/-) ---------------------------------------------------- */
.pv-counter { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; width: max-content }
.pv-counter button { width: 48px; height: 48px; font-size: 22px; color: var(--navy); font-weight: 600 }
.pv-counter button:disabled { opacity: .3; cursor: default }
.pv-counter .v { min-width: 44px; text-align: center; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums }
.pv-counter-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line) }
.pv-counter-row .l { font-weight: 600 } .pv-counter-row .s { display: block; font-size: 13px; color: var(--grey); font-weight: 400 }

/* ---- input -------------------------------------------------------------- */
.pv-input, .pv-select, .pv-textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  padding: 13px 16px; font-size: 16px; transition: border-color .13s ease;
}
.pv-input:focus, .pv-select:focus, .pv-textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(90,215,224,.25) }
.pv-textarea { min-height: 120px; resize: vertical; line-height: 1.6 }
.pv-label { display: block; font-size: 13.5px; font-weight: 650; color: var(--navy); margin: 14px 0 6px }
.pv-field-row { display: grid; gap: 12px; grid-template-columns: 1fr }
@media (min-width: 560px) { .pv-field-row { grid-template-columns: 1fr 1fr } }
.pv-err { color: #A33B2A; font-size: 13.5px; margin-top: 10px; display: none }
.pv-err.show { display: block }

/* ---- navigazione -------------------------------------------------------- */
.pv-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(253,251,247,.95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
}
.pv-nav-inner { max-width: 1160px; margin: 0 auto; display: flex; gap: 12px; align-items: center }
@media (min-width: 980px) {
  .pv-nav { position: static; background: none; border: 0; padding: 26px 0 0 }
  .pv-nav-inner { padding: 0 }
}
.pv-btn {
  border-radius: 999px; padding: 14px 26px; font-weight: 700; font-size: 15.5px;
  transition: transform .12s ease, box-shadow .12s ease; min-height: 50px;
}
.pv-btn.primary {
  background: var(--navy); color: #fff; flex: 1; max-width: 340px;
  box-shadow: 0 10px 22px -10px rgba(38,49,95,.55);
}
.pv-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -10px rgba(38,49,95,.6) }
.pv-btn.primary:disabled { opacity: .45; cursor: default; transform: none }
.pv-btn.ghost { color: var(--navy); border: 1.5px solid var(--line); background: #fff }
.pv-btn.ghost:hover { border-color: var(--navy) }
.pv-btn.link { color: var(--grey); font-weight: 550; padding: 14px 10px; text-decoration: underline; text-underline-offset: 3px }
.pv-btn.big { font-size: 17px; padding: 16px 34px }

/* ---- accoglienza -------------------------------------------------------- */
.pv-hero { padding: 4vh 0 0 }
.pv-hero .art { border-radius: 22px; overflow: hidden; margin-bottom: 26px; position: relative;
  height: clamp(200px, 34vw, 340px); background: var(--sand);
  box-shadow: 0 24px 48px -24px rgba(38,49,95,.4) }
.pv-hero .art svg, .pv-hero .art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.pv-hero h1 {
  font-family: var(--serif); font-weight: 520; color: var(--navy);
  font-size: clamp(34px, 7vw, 54px); line-height: 1.08; letter-spacing: -.015em;
  margin-bottom: 14px; text-wrap: balance;
}
.pv-hero h1 em { font-style: italic; color: var(--terracotta) }
.pv-hero p { color: var(--grey); font-size: 16.5px; max-width: 52ch; margin-bottom: 26px }
.pv-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center }
.pv-hero-meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; color: var(--grey) }
.pv-hero-meta span { display: flex; gap: 7px; align-items: center }

/* ---- consigli («this looks like your kind of experience») ---------------- */
.pv-reco {
  border: 1.5px solid var(--line); border-left: 4px solid var(--turquoise);
  background: #fff; border-radius: 16px; padding: 16px; margin-top: 14px;
  display: grid; gap: 4px;
}
.pv-reco .thumb { margin: -16px -16px 8px; height: 140px; overflow: hidden;
  border-radius: 14px 14px 0 0; background: var(--sand) }
.pv-reco .thumb img { width: 100%; height: 100%; object-fit: cover; display: block }
.pv-reco .why { font-size: 12.5px; color: var(--terracotta); font-weight: 700; letter-spacing: .08em; text-transform: uppercase }
.pv-reco .t { font-family: var(--serif); font-size: 18px; color: var(--navy); font-weight: 600 }
.pv-reco .d { font-size: 14px; color: var(--grey) }
.pv-reco .meta { font-size: 13px; color: var(--ink); margin-top: 4px }
.pv-reco .origin { font-size: 12px; color: var(--navy); font-weight: 650; margin-top: 4px }
.pv-reco .origin.net { color: var(--terracotta) }
.pv-reco .actions { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap }
.pv-reco .add { background: var(--navy); color: #fff; border-radius: 999px; padding: 9px 18px; font-weight: 650; font-size: 14px }
.pv-reco .add.on { background: var(--ok) }
.pv-reco .more { color: var(--navy); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; padding: 9px 6px }

/* ---- la lavagna «Your Sicily so far» ------------------------------------ */
.pv-board {
  background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 70%, #2E4079 100%);
  color: #EAF0F6; border-radius: 20px; padding: 22px;
  position: sticky; top: 76px;
  box-shadow: 0 24px 48px -24px rgba(27,35,66,.55);
}
.pv-board h3 {
  font-family: var(--serif); font-weight: 520; font-size: 20px; color: #fff;
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px;
}
.pv-board h3::after { content: ''; flex: 1; height: 1px; background: rgba(90,215,224,.35) }
.pv-board .rows { display: grid; gap: 5px; font-size: 14px }
.pv-board .row { display: flex; gap: 10px; align-items: baseline }
.pv-board .row .ic { width: 18px; text-align: center; flex: none; opacity: .9 }
.pv-board .row .muted { color: #9FB0C8 }
.pv-board button.row {
  color: inherit; text-align: left; width: 100%; border-radius: 10px;
  padding: 4px 6px; margin: 0 -6px; transition: background .12s ease;
}
.pv-board button.row .tx { flex: 1; min-width: 0 }
.pv-board button.row .pen { opacity: 0; color: var(--turquoise); flex: none; font-size: 12px }
.pv-board button.row:hover { background: rgba(90,215,224,.12) }
.pv-board button.row:hover .pen { opacity: 1 }
.pv-board .route { display: flex; flex-wrap: wrap; gap: 6px; align-items: center }
.pv-board .route b { font-weight: 600 }
.pv-board .route .sep { color: var(--turquoise); font-weight: 700 }
.pv-est { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(159,176,200,.28) }
.pv-est .lbl { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--turquoise); font-weight: 700 }
.pv-est .val { font-family: var(--serif); font-size: 24px; color: #fff; margin: 4px 0 2px }
.pv-est .per { font-size: 13px; color: #C6D2E2 }
.pv-est .note { font-size: 12px; color: #9FB0C8; margin-top: 8px; line-height: 1.5 }
.pv-est .pending { font-size: 13.5px; color: #C6D2E2 }
.pv-board-toggle { display: none }
@media (max-width: 979px) {
  .pv-board-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; pointer-events: none }
  .pv-board { position: static; border-radius: 20px 20px 0 0; transform: translateY(calc(100% - 0px));
    transition: transform .35s cubic-bezier(.22,.9,.36,1); pointer-events: auto; max-height: 76vh; overflow: auto;
    display: none }
  .pv-board-wrap.open .pv-board { transform: none; display: block }
  .pv-board-toggle {
    display: flex; pointer-events: auto; margin: 0 auto; align-items: center; gap: 8px;
    background: var(--navy-deep); color: #fff; border-radius: 999px 999px 0 0;
    padding: 9px 22px calc(7px + env(safe-area-inset-bottom)); font-size: 13.5px; font-weight: 650;
    box-shadow: 0 -8px 24px -12px rgba(27,35,66,.6); position: relative; z-index: 51;
  }
  .pv-board-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--turquoise) }
  body.nav-visible .pv-board-wrap { bottom: 74px }
}

/* ---- riepilogo ----------------------------------------------------------- */
.pv-summary { display: grid; gap: 14px }
.pv-sumcard { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 16px 18px }
.pv-sumcard .h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px }
.pv-sumcard .h b { font-size: 12px; letter-spacing: .13em; text-transform: uppercase; color: var(--terracotta) }
.pv-sumcard .h button { color: var(--navy); font-size: 13px; text-decoration: underline; text-underline-offset: 3px }
.pv-sumcard .v { margin-top: 6px; font-size: 15px; line-height: 1.6 }
.pv-sumhero {
  background: linear-gradient(165deg, var(--navy-deep), var(--navy)); color: #fff;
  border-radius: 20px; padding: 24px;
}
.pv-sumhero .t { font-family: var(--serif); font-size: 28px; font-weight: 520 }
.pv-sumhero .s { color: #C6D2E2; margin-top: 4px; font-size: 15px }

/* ---- fine ---------------------------------------------------------------- */
.pv-done { text-align: center; padding: 8vh 0 }
.pv-done .badge {
  width: 74px; height: 74px; margin: 0 auto 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--turquoise), var(--navy));
  display: grid; place-items: center; color: #fff; font-size: 34px;
  box-shadow: 0 18px 36px -16px rgba(38,49,95,.5);
}
.pv-done h2 { font-family: var(--serif); font-weight: 520; color: var(--navy); font-size: clamp(28px, 5vw, 38px); margin-bottom: 12px }
.pv-done p { color: var(--grey); max-width: 50ch; margin: 0 auto 10px }

/* ---- consenso ------------------------------------------------------------ */
.pv-consent { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; font-size: 14px; color: var(--ink) }
.pv-consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--navy) }
.pv-consent .req { color: var(--terracotta); font-weight: 700 }
.pv-fineprint { font-size: 12.5px; color: var(--grey); margin-top: 14px; line-height: 1.55 }

/* ---- varie --------------------------------------------------------------- */
.pv-divider { height: 1px; background: var(--line); margin: 22px 0 }
.pv-notice {
  background: var(--turquoise-soft); border: 1px solid #C7ECF0; color: var(--ink);
  border-radius: 14px; padding: 13px 16px; font-size: 14px; margin: 14px 0; line-height: 1.55;
}
.pv-notice.warm { background: #FBF3E9; border-color: #EFD9BC }
.pv-saved-pill {
  display: inline-flex; gap: 8px; align-items: center; background: #fff;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; margin: 4px 6px 4px 0;
}
.pv-saved-pill button { color: var(--terracotta); font-weight: 700; font-size: 15px }
.pv-search-results { display: grid; gap: 8px; margin-top: 10px }
.pv-search-hit { text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 10px 12px; display: flex; gap: 12px; align-items: center; width: 100% }
.pv-search-hit:hover { border-color: var(--navy) }
.pv-search-hit .th { flex: none; width: 62px; height: 52px; border-radius: 9px; overflow: hidden; background: var(--sand) }
.pv-search-hit .th img { width: 100%; height: 100%; object-fit: cover; display: block }
.pv-search-hit .tx { min-width: 0 }
.pv-search-hit .t { font-weight: 650; color: var(--navy); font-size: 14.5px }
.pv-search-hit .d { font-size: 12.5px; color: var(--grey);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.pv-skipline { margin-top: 16px; text-align: center }
@media (min-width: 980px) { .pv-skipline { text-align: left } }

/* ---- il selettore di lingua in testata (7 settembre 2026) ---------------- */
.pv-lang { display: flex; gap: 2px; align-items: center; flex: none }
.pv-lang a, .pv-lang b {
  font-size: 11px; letter-spacing: .04em; font-weight: 600; text-decoration: none;
  padding: 3px 5px; border-radius: 6px; color: var(--grey);
}
.pv-lang a:hover { color: var(--navy); background: var(--sand-deep) }
.pv-lang b { color: var(--navy); background: var(--sand-deep) }
@media (max-width: 560px) {
  .pv-top-inner { flex-wrap: wrap }
  .pv-progress { order: 3; flex-basis: 100% }
  .pv-lang a, .pv-lang b { padding: 3px 4px; font-size: 10.5px }
}
