:root {
  --bg: #f6f5f2; --fg: #1d1d1b; --muted: #6b6b66; --card: #fff; --line: #e2e0da;
  --accent: #8a6d3b; --accent-fg: #fff; --err: #b3261e; --ok: #2e7d32;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, sans-serif; background: var(--bg); color: var(--fg); }
header { padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
h1 { margin: 0; font-size: 1.3rem; }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--fg); background: #fff; }
button { font: inherit; padding: 8px 16px; border: 0; border-radius: 4px; background: var(--accent); color: var(--accent-fg); cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.price { font-size: 1.1rem; font-weight: 700; white-space: nowrap; }
#msg.err { color: var(--err); }
#msg.ok { color: var(--ok); }
pre { overflow: auto; background: #1d1d1b; color: #eee; padding: 12px; border-radius: 6px; font-size: .8rem; }
@media (max-width: 700px) {
}

/* ---------- calendario prezzi ---------- */
.cal-nav button { pointer-events: auto; background: transparent; color: var(--fg); font-size: 1.4rem; padding: 0 12px; line-height: 1.4; }
.cal-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.cal-month h4 { margin: 4px 0 8px; text-align: center; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-wd { text-align: center; font-size: .75rem; color: var(--muted); padding-bottom: 4px; text-transform: capitalize; }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 48px; padding: 2px; background: transparent; color: var(--fg); border-radius: 4px; }
.cal-day small { font-size: .65rem; color: var(--muted); }
.cal-day small.min { color: var(--accent); font-weight: 600; }
.cal-day:not([disabled]):hover { background: #efe7d9; }
.cal-day.dis { opacity: 1; color: #c4c2bc; }
.cal-day.dis small { color: #c4c2bc; }
.cal-day.range { background: #efe7d9; border-radius: 0; }
.cal-day.edge { background: var(--accent); color: var(--accent-fg); }
.cal-day.stop span { text-decoration: line-through; }
.cal-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { background: #fff; color: var(--fg); border: 1px solid var(--line); border-radius: 16px; padding: 4px 12px; font-size: .85rem; }
.chip.active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.cal-recap { margin: 12px 0 0; }
.cal-recap .err { color: var(--err); }

/* ---------- riepilogo carrello ---------- */
.with-recap:not([hidden]) { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.recap { position: sticky; top: 16px; font-size: .9rem; }
.recap h3 { margin: 0 0 4px; font-size: 1rem; }
.recap .stay { color: var(--muted); margin: 0 0 12px; }
.recap-room { border-top: 1px solid var(--line); padding: 10px 0; }
.recap-room .head { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.recap-room .sub { color: var(--muted); font-size: .8rem; }
.recap-room ul { margin: 6px 0 0; padding-left: 16px; font-size: .8rem; }
.recap-room li { display: flex; justify-content: space-between; gap: 8px; }
.recap-row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.recap-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-size: 1.05rem; font-weight: 700; }
.recap-row.muted { color: var(--muted); font-size: .8rem; }
.recap .edit { margin-top: 12px; width: 100%; }
.recap-toggle { display: none; }
@media (max-width: 860px) {
  #results-step .recap-toggle { display: block; width: 100%; background: none; color: var(--accent); padding: 0 0 6px; font-size: .8rem; font-weight: 600; }
}
@media (max-width: 860px) {
  .with-recap:not([hidden]) { grid-template-columns: 1fr; }
  .recap { position: static; order: -1; }
}
.recap-room.empty .head em { font-weight: 400; color: var(--muted); }
.recap button.link { background: none; color: var(--accent); padding: 4px 0 0; font-size: .8rem; text-decoration: underline; }
#results-step .recap { max-height: calc(100vh - 32px); overflow: auto; }
@media (max-width: 860px) {
  /* Nei risultati il riepilogo resta agganciato in basso */
  #results-step .recap { position: sticky; top: auto; bottom: 0; order: 1; max-height: 70vh; margin: 0 -16px -16px;
    border-radius: 12px 12px 0 0; padding: 10px 16px 12px; box-shadow: 0 -4px 16px rgba(0,0,0,.12); }
  #results-step .recap:not(.expanded) > :not(.recap-toggle):not(.total):not(.edit) { display: none; }
  #results-step .recap:not(.expanded) .recap-row.total { border-top: 0; margin-top: 0; }
  #results-step .recap:not(.expanded) .edit { margin-top: 6px; }
}

/* ---------- maschera di ricerca ---------- */
[hidden] { display: none !important; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 1168px; margin: 0 auto; }
.prefs { display: flex; gap: 6px; }
.prefs select { padding: 4px 6px; font-size: .85rem; }

.searchbar { position: relative; display: flex; align-items: stretch; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.05); margin-bottom: 16px; }
.sb-dates { display: flex; flex: 2; }
.sb-field { display: flex; flex-direction: column; justify-content: center; gap: 2px; flex: 1; min-width: 0;
  padding: 10px 16px; cursor: pointer; border-right: 1px solid var(--line); color: var(--fg); }
.sb-guests { flex: 1.4; }
.sb-code { flex: 1; cursor: text; }
.sb-field:hover, .sb-dates:hover .sb-field { background: #faf8f4; }
.sb-dates.open .sb-field, .sb-guests.open { background: #f3ede2; }
.sb-dates:focus-visible, .sb-guests:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sb-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sb-value { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-code input { border: 0; padding: 0; font-weight: 600; background: transparent; outline: none; min-width: 0; }
.sb-code input::placeholder { font-weight: 400; color: #aaa69d; }
.sb-submit { margin: 8px; padding: 0 28px; border-radius: 8px; font-weight: 600; }

.popover { position: absolute; top: calc(100% + 8px); z-index: 20; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 16px; }
.calendar { left: 0; width: min(760px, 100%); }
.cal-nav { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; pointer-events: none; }
.guests-pop { left: 40%; width: 340px; max-height: 70vh; overflow: auto; }

.occ { padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.occ:last-child { border-bottom: 0; }
.occ-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.stepper { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.stepper small { color: var(--muted); font-size: .75rem; }
.stepper-ctrl { display: flex; align-items: center; gap: 10px; }
.stepper-ctrl span { min-width: 18px; text-align: center; font-weight: 600; }
.stepper-ctrl button { width: 32px; height: 32px; padding: 0; border-radius: 50%; background: #fff; color: var(--fg);
  border: 1px solid var(--line); font-size: 1.1rem; line-height: 1; }
.stepper-ctrl button:not(:disabled):hover { border-color: var(--accent); color: var(--accent); }
.ages { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.gp-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
button.link { background: none; color: var(--accent); padding: 4px 0; font-size: .85rem; text-decoration: underline; }

@media (max-width: 860px) {
  .searchbar { flex-direction: column; }
  .sb-field { border-right: 0; border-bottom: 1px solid var(--line); }
  .sb-dates .sb-field:first-child { border-right: 1px solid var(--line); }
  .sb-submit { padding: 12px; }
  .popover { left: 0; right: 0; width: auto; }
  .calendar { top: 72px; }
  .guests-pop { top: 144px; }
}

/* ---------- gallery camera ---------- */
.carousel { position: relative; align-self: start; aspect-ratio: 70/47; border-radius: 6px; overflow: hidden; background: #eee; }
.car-open { display: block; width: 100%; height: 100%; padding: 0; background: none; border-radius: 0; cursor: zoom-in; }
.car-open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; padding: 0; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--fg); font-size: 1.3rem; line-height: 1; opacity: 0; transition: opacity .15s; }
.car-arrow.prev { left: 8px; } .car-arrow.next { right: 8px; }
.carousel:hover .car-arrow, .car-arrow:focus-visible { opacity: 1; }
@media (hover: none) { .car-arrow { opacity: 1; } }
.car-count { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,.6);
  color: #fff; font-size: .75rem; pointer-events: none; }

.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: rgba(12,12,11,.95); color: #fff; }
.lb-top { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.lb-title { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { color: #bbb; font-size: .85rem; }
.lb-close { background: none; font-size: 1.3rem; padding: 4px 8px; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 56px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: rgba(255,255,255,.15); font-size: 1.8rem; line-height: 1; }
.lb-arrow:hover { background: rgba(255,255,255,.3); }
.lb-arrow.prev { left: 8px; } .lb-arrow.next { right: 8px; }
.lb-thumbs { display: flex; gap: 6px; padding: 12px 16px; overflow-x: auto; justify-content: safe center; }
.lb-thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border-radius: 4px; overflow: hidden; background: none;
  opacity: .5; border: 2px solid transparent; }
.lb-thumbs button.active { opacity: 1; border-color: #fff; }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 700px) {
  .lb-stage { padding: 0; }
  .lb-arrow { display: none; }
}

/* ---------- percorso di prenotazione ---------- */
.progress { background: var(--card); border-bottom: 1px solid var(--line); padding: 14px 16px 12px; }
#steps { counter-reset: step; display: flex; list-style: none; margin: 0 auto; padding: 0; max-width: 760px; }
#steps li { flex: 1; position: relative; }
/* linea di collegamento verso lo step precedente */
#steps li + li::before { content: ''; position: absolute; top: 15px; right: calc(50% + 22px); left: calc(-50% + 22px);
  height: 2px; background: var(--line); border-radius: 1px; }
#steps li.done + li::before, #steps li.done + li.active::before { background: var(--accent); }
#steps button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 0;
  background: none; color: var(--muted); font-size: .8rem; border-radius: 0; }
#steps button:disabled { opacity: 1; cursor: default; }
#steps .dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--card); font-weight: 700; font-size: .85rem; transition: all .2s; }
#steps li.active .dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px #f1e9dc; }
#steps li.active .lbl { color: var(--fg); font-weight: 700; }
#steps li.done .dot { background: var(--accent); border-color: var(--accent); color: transparent; position: relative; }
#steps li.done .dot::after { content: ''; position: absolute; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg); }
#steps li.done .lbl { color: var(--accent); }
#steps li.done button:hover .lbl { text-decoration: underline; }
@media (max-width: 600px) {
  #steps li:not(.active) .lbl { display: none; }
  #steps .lbl { white-space: nowrap; }
}

/* ---------- scheda camera ---------- */
.results-head { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }
.empty-results p { margin: 4px 0 0; color: var(--muted); }
.room { padding: 0; overflow: hidden; }
.room-top { display: grid; grid-template-columns: minmax(260px, 42%) 1fr; gap: 20px; padding: 16px; }
.room-top .carousel { position: relative; }
.ribbon { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 12px; background: var(--accent);
  color: #fff; font-size: .75rem; font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.room-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.room-info h3 { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.room-meta { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.room-meta li { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 14px; background: #f3f1ec;
  font-size: .8rem; color: #45443f; }
.room-short { color: #45443f; font-size: .9rem; }
.room-short p { margin: 0; }
.room-more summary, .rate-more summary { cursor: pointer; color: var(--accent); font-size: .85rem; font-weight: 600; width: fit-content; }
.room-more > div { font-size: .88rem; color: #45443f; margin-top: 6px; }
.room-from { margin-top: auto; display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: .85rem; }
.room-from strong { font-size: 1.35rem; color: var(--fg); }

.ico { display: inline-flex; width: 16px; height: 16px; flex: none; }
.ico svg { width: 100%; height: 100%; }

.rates { border-top: 1px solid var(--line); background: #fbfaf7; }
.rate-group { padding: 4px 16px 8px; }
.rate-group + .rate-group { border-top: 1px solid var(--line); }
.cluster-title { margin: 12px 0 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.rate { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px; margin-bottom: 8px; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
.rate:hover { border-color: #d5cbb8; }
.rate.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.rate-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; }
.badge { padding: 2px 8px; border-radius: 10px; font-size: .7rem; font-weight: 700; }
.best-badge { background: #e6f2e7; color: var(--ok); }
.rate-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .84rem; color: #45443f; }
.rate-feats li { display: flex; align-items: flex-start; gap: 6px; }
.rate-feats .ico { margin-top: 2px; color: var(--muted); }
.rate-feats .ok, .rate-feats .ok .ico { color: var(--ok); }
.rate-feats .warn, .rate-feats .warn .ico { color: var(--err); }
.rate-feats .meal { font-weight: 600; }
.rate-more { margin-top: 6px; }
.rate-more > div { font-size: .84rem; color: #45443f; }
.rate-more ul { margin: 4px 0; padding-left: 18px; }
.rate-price { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; text-align: right; min-width: 170px; }
.rate-price .price { font-size: 1.35rem; }
.price-sub { font-size: .75rem; color: var(--muted); }
.price-sub.tax { color: #8a6d3b; }
.select-rate { margin-top: 8px; width: 100%; font-weight: 600; }
.select-rate.selected { background: #fff; color: var(--accent); border: 1px solid var(--accent); }

@media (max-width: 700px) {
  .room-top { grid-template-columns: 1fr; padding: 0 0 12px; gap: 12px; }
  .room-top .carousel { border-radius: 0; }
  .room-info { padding: 0 16px; }
  .rate-group { padding: 4px 10px 8px; }
  .rate { grid-template-columns: 1fr; gap: 10px; }
  .rate-price { align-items: stretch; text-align: left; min-width: 0; border-top: 1px dashed var(--line); padding-top: 10px; }
}

/* ---------- caricamento ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #e6dfd2; border-top-color: var(--accent);
  animation: spin .8s linear infinite; }
.loading-overlay { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; background: rgba(246,245,242,.85); backdrop-filter: blur(2px); }
.loading-overlay p, .loader-block p { margin: 0; color: var(--muted); font-weight: 600; }
.loader-block { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 64px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.sb-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; animation: spin .8s linear infinite; }
.sb-submit.busy .btn-spinner { display: inline-block; }
.sb-submit.busy:disabled { opacity: .85; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .spinner, .btn-spinner { animation-duration: 2.4s; } }

/* ---------- nessun risultato / errore ---------- */
#results-step.no-recap:not([hidden]) { grid-template-columns: 1fr; }
#results-step.no-recap .recap { display: none; }
.notice { max-width: 640px; margin: 8px auto 16px; padding: 32px 28px; text-align: center; }
.notice-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #f3ede2; color: var(--accent); }
.notice-icon svg { width: 32px; height: 32px; }
.notice h3 { margin: 14px 0 8px; font-size: 1.25rem; }
.notice p { margin: 0 0 8px; color: #45443f; }
.notice .muted { color: var(--muted); font-size: .8rem; }
.notice-tips { display: inline-block; text-align: left; margin: 4px 0 16px; padding-left: 20px; color: var(--muted); font-size: .9rem; }
.notice-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.notice-contact { margin-top: 18px !important; padding-top: 14px; border-top: 1px solid var(--line); font-size: .88rem; }
.notice-contact a { color: var(--accent); font-weight: 600; }
.notice.error .notice-icon { background: #fbe9e7; color: var(--err); }
.notice.error h3 { margin-top: 0; }

/* ---------- servizi ---------- */
.services-head h2 { margin: 0 0 4px; font-size: 1.35rem; }
.services-head p { margin: 0 0 16px; color: var(--muted); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.svc-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.svc-card:hover { border-color: #d5cbb8; }
.svc-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.svc-media { position: relative; aspect-ratio: 2/1; background: #eee8dc; overflow: hidden; }
.svc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-added { position: absolute; right: 10px; top: 10px; padding: 3px 10px; border-radius: 12px; background: var(--ok); color: #fff;
  font-size: .75rem; font-weight: 700; opacity: 0; transform: scale(.9); transition: all .15s; }
.svc-card.selected .svc-added { opacity: 1; transform: none; }
.svc-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; flex: 1; }
.svc-body h3 { margin: 0; font-size: 1.05rem; }
.svc-text { margin: -4px 0 0; color: var(--muted); font-size: .88rem; }
.svc-price { display: flex; align-items: baseline; gap: 6px; }
.svc-price strong { font-size: 1.2rem; }
.svc-price span { color: var(--muted); font-size: .8rem; }
.svc-room-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.svc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-chip { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 76px; padding: 6px 10px; border-radius: 8px;
  background: #fff; color: var(--fg); border: 1px solid var(--line); font-size: .82rem; line-height: 1.2; }
.svc-chip span { text-transform: capitalize; font-weight: 600; }
.svc-chip small { color: var(--muted); font-size: .72rem; }
.svc-chip:not(:disabled):hover { border-color: var(--accent); }
.svc-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.svc-chip.on small { color: #f1e9dc; }
.svc-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 10px;
  border-top: 1px dashed var(--line); font-size: .88rem; }
.svc-foot .muted { color: var(--muted); }
.services-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.recap button.link.edit { margin-top: 4px; }

/* ---------- form dati ospite ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.guest-head h2 { margin: 0 0 4px; font-size: 1.35rem; }
.guest-head p { margin: 0 0 16px; color: var(--muted); }
.form-section { padding: 20px; }
.form-section h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.05rem; }
.sec-num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .8rem; }
.sec-sub { margin: 4px 0 0 36px; color: var(--muted); font-size: .85rem; }
.field-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; position: relative; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.form-section > .field { margin-top: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--fg); }
.req { color: var(--err); }
.opt { color: var(--muted); font-weight: 400; font-size: .8rem; }
.field input, .field select, .field textarea { height: 46px; padding: 10px 12px; border: 1px solid #d6d3cb; border-radius: 8px;
  font-size: 1rem; transition: border-color .15s, box-shadow .15s; }
.field textarea { height: auto; resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: #aaa69d; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #f1e9dc; }
.field.valid input, .field.valid select { border-color: #9cc5a0;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e7d32' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; padding-right: 36px; }
.field.valid select { background-position: right 30px center; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--err); box-shadow: 0 0 0 3px #fbe9e7; }
.hint { color: var(--muted); font-size: .78rem; }
.field.invalid .hint { display: none; }
.field-err { color: var(--err); font-size: .78rem; font-weight: 600; }
.field-err:empty { display: none; }
.counter { align-self: flex-end; color: var(--muted); font-size: .75rem; }

.consent { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.consent.invalid { border-color: var(--err); background: #fffafa; }
.consent label.check { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; font-size: .92rem; color: var(--fg); cursor: pointer; }
.consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent .box { flex: none; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid #bdb8ad; border-radius: 5px; background: #fff; transition: all .15s; }
.consent input:checked + .box { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / 14px; border-color: var(--accent); }
.consent input:focus-visible + .box { box-shadow: 0 0 0 3px #f1e9dc; border-color: var(--accent); }
.consent.invalid .box { border-color: var(--err); }
.consent button.link { margin-left: 30px; }
.consent .field-err { display: block; margin: 4px 0 0 30px; }
.consent .field-err:empty { display: none; }

.form-confirm { padding: 20px; }
.form-confirm .rate-feats { margin-bottom: 16px; }
.confirm-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.confirm-total { display: flex; flex-direction: column; }
.confirm-total span { color: var(--muted); font-size: .85rem; }
.confirm-total strong { font-size: 1.5rem; }
.confirm-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 8px; font-size: 1rem; font-weight: 700; }
.confirm-btn.busy .btn-spinner { display: inline-block; }
.form-status { margin: 12px 0 0; font-size: .9rem; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.err { color: var(--err); }
.form-status.ok { color: var(--ok); }

.policy-dialog { width: min(640px, calc(100vw - 32px)); max-height: 80vh; padding: 0; border: 0; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); display: none; flex-direction: column; }
.policy-dialog[open] { display: flex; }
.policy-dialog::backdrop { background: rgba(20,20,18,.5); }
.pd-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.pd-head h3 { margin: 0; }
.pd-close { background: none; color: var(--fg); font-size: 1.1rem; padding: 4px 8px; }
.pd-body { padding: 16px 20px; overflow: auto; font-size: .9rem; color: #45443f; }
.pd-foot { padding: 12px 20px; border-top: 1px solid var(--line); text-align: right; }

@media (max-width: 700px) {
  .field-grid { grid-template-columns: 1fr; }
  .sec-sub { margin-left: 0; }
  .confirm-row { flex-direction: column; align-items: stretch; }
  .confirm-btn { justify-content: center; }
}

/* ---------- notifiche (toasts.js) ---------- */
#msg { display: none; } /* sostituito dalle notifiche */
.toasts { position: fixed; right: 16px; bottom: calc(16px + var(--toast-offset, 0px)); z-index: 200;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { position: relative; display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 12px 38px 14px 12px;
  border-radius: 12px; background: var(--card); color: var(--fg); border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); pointer-events: auto; animation: toast-in .45s cubic-bezier(.2,.9,.25,1.15) both; }
.toast.leaving { animation: toast-out .35s ease-in forwards; }
.toast.bump { animation: toast-bump .3s ease-out; }
@keyframes toast-in { from { transform: translateX(calc(100% + 40px)); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateX(calc(100% + 40px)); opacity: 0; } }
@keyframes toast-bump { 40% { transform: scale(1.03); } }
@keyframes toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.toast-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; }
.toast-icon svg { width: 18px; height: 18px; }
.toast-body { min-width: 0; font-size: .88rem; line-height: 1.35; }
.toast-body strong { font-size: .92rem; }
.toast-body p { margin: 2px 0 0; }
.toast-count { font-size: .75rem; font-weight: 700; opacity: .8; }
.toast-close { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; padding: 0; border-radius: 50%;
  background: transparent; color: inherit; opacity: .7; font-size: .8rem; line-height: 1; }
.toast-close:hover { opacity: 1; background: rgba(0,0,0,.08); }
.toast-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; transform-origin: left; background: currentColor; opacity: .35; }

/* Errore: rosso pieno */
.toast-error { background: #b3261e; border-color: #9d1f18; color: #fff; }
.toast-error .toast-icon { background: rgba(255,255,255,.18); }
.toast-error .toast-close:hover { background: rgba(255,255,255,.18); }
.toast-error .toast-progress { background: #fff; opacity: .5; }
.toast-warning .toast-icon { background: #fdf0d8; color: #9a6500; }
.toast-warning { border-left: 4px solid #d99100; }
.toast-success .toast-icon { background: #e6f2e7; color: var(--ok); }
.toast-success { border-left: 4px solid var(--ok); }
.toast-info .toast-icon { background: var(--accent-soft, #f3ede2); color: var(--accent); }
.toast-info { border-left: 4px solid var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .toast, .toast.leaving { animation-duration: .01s; }
}

/* ---------- incorporata nel sito dell'hotel (?embed=1) ---------- */
.embedded body > header { display: none; }
