:root {
  --studio: #264c3e;
  --studio-soft: color-mix(in srgb, var(--studio) 10%, #fff);
  --bg: #f5f4ef;
  --card: #ffffff;
  --ink: #1f2a26;
  --muted: #69736e;
  --line: #e2e4dd;
  --field: #fbfaf7;
  --warn: #9a5b00;
  --warn-bg: #fff6e3;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --ok: #2e7d4f;
  --ok-bg: #e7f4ec;
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
@media (min-width: 1600px) { html { font-size: 17px; } body { font-size: 16px; } main { max-width: 1240px; } }
a { color: var(--studio); }
code { font-size: 12px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* barra superiore */
.topbar { background: #fff; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding: 10px max(16px, calc(50% - 560px)); }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 17px; }
.brand small { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.monogram { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--studio); display: grid; place-items: center; color: var(--studio); font-size: 13px; overflow: hidden; background: #fff; flex: none; }
.monogram img { width: 100%; height: 100%; object-fit: contain; }
.save-state { font-size: 12px; color: var(--muted); }
.save-state.dirty { color: var(--warn); }
.save-state.err { color: var(--danger); }
.nav { display: flex; flex-wrap: wrap; gap: 0 4px; padding: 0 max(16px, calc(50% - 560px)); border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; scrollbar-width: none; }
.nav a { padding: 12px 10px; color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; font-size: 13px; }
.nav a.active { color: var(--ink); border-bottom-color: var(--studio); }
main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 60px; outline: none; }
.foot { text-align: center; font-size: 11px; color: var(--muted); padding: 0 16px 24px; }

/* blocchi */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card > h3:first-child, .card > .card-head:first-child { margin-bottom: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 0 22px; }
.hero em { font-style: italic; color: color-mix(in srgb, var(--studio) 55%, #9aa59f); }
.grid { display: grid; gap: 12px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 8px; }

/* campi */
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; width: 100%; min-width: 0; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--studio) 35%, transparent); border-color: var(--studio); background: #fff; }
.invalid input, .invalid textarea, input.invalid { border-color: var(--danger); background: var(--danger-bg); }
.hint { font-size: 11px; color: var(--muted); }
.hint.err { color: var(--danger); }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; padding: 6px 0; color: var(--ink); }
/* casella di spunta sempre visibile (bug corretto rispetto alla versione online) */
.check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; padding: 0; border: 1.5px solid #9aa59f; border-radius: 5px; background: #fff; display: grid; place-items: center; flex: none; cursor: pointer; }
.check input:checked { background: var(--studio); border-color: var(--studio); }
.check input:checked::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }

/* pulsanti */
.btn { font: inherit; font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #c9cec6; background: #fafaf7; }
.btn.primary { background: var(--studio); border-color: var(--studio); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, #fff); }
.btn.danger.solid { background: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 4px 6px; border-radius: 6px; font-size: 15px; }
.icon-btn:hover { background: var(--danger-bg); color: var(--danger); }

/* statistiche */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.kpi { background: #f0efe9; padding: 14px 16px; }
.kpi span { font-size: 12px; color: var(--muted); display: block; }
.kpi strong { font-family: var(--serif); font-weight: 400; font-size: 24px; display: block; margin-top: 4px; }

/* badge */
.badge { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 99px; background: #eef0ea; color: var(--muted); white-space: nowrap; }
.badge.s-nuova-richiesta, .badge.s-da-contattare { background: #fff3dc; color: #8a5a00; }
.badge.s-preventivo-inviato { background: #e5effa; color: #24578f; }
.badge.s-confermato { background: var(--ok-bg); color: var(--ok); }
.badge.s-completato { background: #ece7f6; color: #5b3f8c; }
.badge.s-annullato, .badge.s-perso { background: #f1f1f1; color: #888; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--danger-bg); color: var(--danger); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }

/* lista matrimoni */
.list { display: flex; flex-direction: column; }
.wrow { display: grid; grid-template-columns: 54px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 6px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.wrow:hover { background: #fafaf6; }
.wdate { background: #f0efe9; border-radius: 8px; text-align: center; padding: 5px 0; font-family: var(--serif); font-size: 18px; line-height: 1.1; }
.wdate small { display: block; font-family: var(--sans); font-size: 10px; color: var(--muted); }
.wname { font-family: var(--serif); font-size: 17px; }
.wmoney { text-align: right; font-size: 13px; white-space: nowrap; }
.wmoney small { display: block; color: var(--muted); font-size: 11px; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* scheda */
.whead { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; scrollbar-width: thin; }
.tabs a { padding: 9px 11px; text-decoration: none; color: var(--muted); font-size: 13px; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--studio); }
.tabs a .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-left: 5px; vertical-align: middle; }
.alerts { margin-bottom: 14px; }
.alert { padding: 9px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 13px; margin-bottom: 6px; display: flex; gap: 8px; align-items: baseline; }
.alert.err { background: var(--danger-bg); color: var(--danger); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.info { background: var(--studio-soft); color: var(--studio); }
.summary { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
.summary .line { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); }
.summary .line.total { color: var(--ink); font-family: var(--serif); font-size: 21px; padding-top: 8px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line); }
.table td { padding: 5px 6px; border-bottom: 1px solid #f0f1ec; vertical-align: middle; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table input, .table select { padding: 6px 8px; }
.progress { height: 8px; background: #eceee8; border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--studio); }

/* pannelli panoramica */
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.todo { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid #f0f1ec; text-decoration: none; color: inherit; }
.todo:first-of-type { border-top: 0; }
.todo .when { font-size: 11px; color: var(--muted); white-space: nowrap; min-width: 74px; }
.todo.late .when { color: var(--danger); font-weight: 600; }

/* calendario */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.cal > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 96px; padding: 4px; background: #fff; font-size: 12px; min-width: 0; }
.cal .dow { min-height: 0; background: #f0efe9; text-align: center; font-weight: 600; color: var(--muted); }
.cal .out { background: #f8f7f3; color: #b5b9b4; }
.cal .today .dnum { background: var(--studio); color: #fff; border-radius: 99px; padding: 0 6px; }
.cal .conflict { background: var(--danger-bg); }
.chip { display: block; font-size: 11px; padding: 2px 5px; border-radius: 4px; margin-top: 3px; text-decoration: none; color: var(--ink); background: #eef0ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.s-confermato, .chip.s-completato { background: var(--studio); color: #fff; }
.chip.s-preventivo-inviato { background: #e5effa; }
.chip.s-nuova-richiesta, .chip.s-da-contattare { background: #fff3dc; }
.chip.post { background: #f3effa; color: #5b3f8c; }
.year { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.year a { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; text-decoration: none; color: inherit; font-size: 12px; }
.year a strong { display: block; font-family: var(--serif); font-size: 20px; font-weight: 400; }

/* grafici a barre */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 10px; color: var(--muted); min-width: 0; }
.bars .b div { width: 100%; background: var(--studio); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .b span { margin-top: 4px; }

/* modale */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--ink); }
dialog::backdrop { background: rgba(20, 30, 26, .45); }
.modal-body { padding: 22px 22px 8px; overflow: auto; max-height: calc(100vh - 140px); }
.modal-body h2 { margin-bottom: 8px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; }
.sigpad { width: 100%; height: 180px; border: 1px dashed #9aa59f; border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; }

/* notifiche */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 50; width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 9px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.2); animation: tin .2s ease-out; }
.toast.err { background: var(--danger); }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } }

.login { max-width: 360px; margin: 60px auto; }
.link-box { display: flex; gap: 6px; }
.link-box input { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panels { grid-template-columns: 1fr; }
  .grid.g3, .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .year { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  h1 { font-size: 27px; }
  .grid, .grid.g3, .grid.g4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .wrow { grid-template-columns: 48px 1fr; }
  .wrow .badge, .wrow .wmoney { grid-column: 2; justify-self: start; text-align: left; }
  .cal > div { min-height: 64px; padding: 2px; }
  .chip { font-size: 9px; padding: 1px 3px; }
  .card { padding: 14px; }
  .table.responsive thead { display: none; }
  .table.responsive tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .table.responsive td { border: 0; padding: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* contratto mostrato dentro l'area sposi */
.doc-inline { font-size: 13px; }
.doc-inline h1 { font-size: 24px; }
.doc-inline h2 { font-family: var(--sans); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--studio); margin: 18px 0 6px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.doc-inline h4 { margin: 12px 0 2px; font-size: 13px; }
.doc-inline .doc-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 3px solid var(--studio); padding-top: 10px; margin-bottom: 14px; font-size: 12px; color: var(--muted); }
.doc-inline .doc-studio { display: flex; gap: 10px; }
.doc-inline .doc-logo { max-width: 100px; max-height: 50px; }
.doc-inline .doc-mono { display: none; }
.doc-inline .doc-tipo { font-weight: 700; color: var(--studio); text-transform: uppercase; font-size: 11px; letter-spacing: .1em; }
.doc-inline .bozza { display: none; }
.doc-inline .doc-table, .doc-inline .doc-kv { width: 100%; border-collapse: collapse; margin: 6px 0; }
.doc-inline td, .doc-inline th { padding: 5px 4px; border-bottom: 1px solid #f0f1ec; text-align: left; vertical-align: top; }
.doc-inline .num { text-align: right; white-space: nowrap; }
.doc-inline .tot td { font-weight: 700; }
.doc-inline .firme { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 14px 0; }
.doc-inline .firma-img { height: 54px; display: flex; align-items: flex-end; }
.doc-inline .firma-img img { max-height: 54px; max-width: 100%; }
.doc-inline .firma-line { border-top: 1px solid var(--ink); padding-top: 3px; font-size: 11px; }

/* tappe della giornata */
.chi { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.chip-check { border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px 4px 8px; background: var(--field); }
.chip-check:has(input:checked) { border-color: var(--studio); background: var(--studio-soft); }

/* sezioni della scheda: sempre tutte visibili, numerate */
.tabs.steps { flex-wrap: wrap; overflow: visible; gap: 6px; border-bottom: 0; }
.tabs.steps a { border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; background: #fff; }
.tabs.steps a b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #eceee8; font-size: 11px; margin-right: 4px; color: var(--muted); }
.tabs.steps a.active { background: var(--studio); color: #fff; border-color: var(--studio); }
.tabs.steps a.active b { background: rgba(255,255,255,.25); color: #fff; }
.guida { background: var(--studio-soft); color: var(--studio); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.step-nav { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
/* guida iniziale */
.passo { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid #f0f1ec; }
.passo > div { flex: 1; }
.passo .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--studio); color: #fff; font-weight: 700; flex: none; }
.passo.fatto .num { background: var(--ok-bg); color: var(--ok); }
.passo.fatto strong { color: var(--muted); text-decoration: line-through; }

/* sezioni della scheda raggruppate */
.steps-groups { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 14px; }
.sg-tit { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 5px; }
.steps-groups .tabs.steps { margin-bottom: 0; }

/* data del matrimonio: l'informazione più importante */
.dtile { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 84px; padding: 8px 12px; border-radius: 12px; background: var(--studio); color: #fff; line-height: 1.05; text-align: center; flex: none; }
.dtile .dt-w { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; opacity: .9; }
.dtile .dt-d { font-family: var(--serif); font-size: 38px; font-weight: 700; }
.dtile .dt-m { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.dtile.none { background: var(--danger-bg); color: var(--danger); border: 1px dashed var(--danger); }
.dtile.sm { min-width: 62px; padding: 5px 8px; border-radius: 9px; }
.dtile.sm .dt-d { font-size: 24px; }
.dtile.sm .dt-w, .dtile.sm .dt-m { font-size: 9px; }
.dtile.muted-tile { background: #eceee8; color: var(--ink); }
.whead-date { display: flex; gap: 16px; align-items: center; }
.countdown { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--studio); background: var(--studio-soft); border-radius: 99px; padding: 3px 12px; }
.countdown.past { color: var(--muted); background: #eceee8; }
.countdown.none { color: var(--danger); background: var(--danger-bg); }
.date-card { border: 2px solid var(--studio); }
.date-card input[type=date] { font-size: 20px; padding: 10px 12px; max-width: 280px; }
.wrow { grid-template-columns: 70px 1fr auto auto; }

.lav-chip { display: block; margin-top: 8px; text-decoration: none; color: var(--ink); }
.lav-chip .progress { margin: 4px 0; height: 6px; }
tr.passo-fatto input:not([type=checkbox]) { text-decoration: line-through; color: var(--muted); }

/* servizi del preventivo come caselle */
.servizi { display: grid; gap: 10px; }
.servizio { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--field); opacity: .7; }
.servizio.on { border: 2px solid var(--studio); background: #fff; opacity: 1; }
.sv-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sv-head .check { font-size: 15px; font-weight: 700; }
.sv-prezzo { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.sv-prezzo input { width: 120px; font-weight: 700; }
.servizio p { margin: 2px 0 6px 26px; }
.sv-scelta { margin-left: 26px; display: flex; flex-direction: column; gap: 0; }
.check input[type=radio] { width: 18px; height: 18px; accent-color: var(--studio); margin: 0; flex: none; }
.check input[type=radio] { -webkit-appearance: radio; appearance: auto; border: 0; background: none; border-radius: 50%; }
.check input[type=radio]::after { content: none; }
.doc-inline .doc-date { display: flex; gap: 12px; align-items: center; border: 2px solid var(--studio); border-radius: 10px; padding: 8px 12px; margin: 6px 0 12px; }
.doc-inline .dd-lbl { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--studio); font-weight: 700; }
.doc-inline .dd-full { font-family: var(--serif); font-size: 18px; }

details.altre-tappe > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.altre-tappe[open] > summary { margin-bottom: 12px; }
details.altre-tappe .card { box-shadow: none; }

/* Telefono: menu compatto e non fisso, così non ruba spazio mentre si scorre */
@media (max-width: 600px) {
  .nav { position: static; gap: 0 2px; padding: 0 10px; }
  .nav a { padding: 9px 7px; font-size: 13px; }
  .topbar { padding: 8px 12px; }
}

/* Galleria: gestionale e area clienti */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gal-item { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--field); border: 2px solid transparent; }
.gal-item.pref { border-color: #d2425a; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.gal-heart, .gal-nota { position: absolute; top: 6px; left: 8px; color: #d2425a; font-size: 18px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.gal-nota { left: 28px; color: #fff; font-size: 14px; }
.gal-del { position: absolute; top: 4px; right: 4px; border: 0; border-radius: 50%; width: 26px; height: 26px; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; }
.gal-nome { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; font-size: 11px; color: #fff; background: rgba(0,0,0,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-cuore { position: absolute; right: 6px; bottom: 6px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #d2425a; font-size: 22px; cursor: pointer; }
.heart-on { color: #d2425a; }
.filigrana { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; color: rgba(255,255,255,.55); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 1px 2px rgba(0,0,0,.35); transform: rotate(-24deg); text-align: center; }
.filigrana.grande { font-size: clamp(18px, 4vw, 40px); }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(10,12,12,.96); display: flex; flex-direction: column; color: #fff; }
.lb-top, .lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
.lb-bar input { flex: 1; min-width: 180px; }
.lb-foto { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lb-img { position: relative; max-width: calc(100% - 100px); max-height: 100%; display: flex; }
.lb-img img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.lb-nav { width: 44px; height: 64px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 34px; border-radius: 8px; cursor: pointer; }
@media (max-width: 600px) { .gal-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; } .lb-img { max-width: calc(100% - 70px); } .lb-nav { width: 30px; } }

/* Stampe dalla galleria */
.stampe-box { background: var(--field); margin: 10px 0; }
.stampa-mini { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 6px; }
.lb-stampa { border-top: 1px solid rgba(255,255,255,.15); }
.lb-stampa select { width: auto; }
/* Prenotazione online da confermare, in cima alla scheda */
.prenota-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin: 10px 0; border-radius: 10px; background: #fff3dc; color: #5c3d00; border: 1px solid #f0d9a8; }
/* Pagina Prenota */
.pr-servizi { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pr-servizio { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border: 1px solid var(--line, #ddd); border-radius: 10px; background: var(--card, #fff); cursor: pointer; font: inherit; color: inherit; }
.pr-servizio.on, .pr-giorno.on { border-color: var(--studio); box-shadow: 0 0 0 2px var(--studio); }
.pr-giorni { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; }
.pr-giorno { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 8px 6px; border: 1px solid var(--line, #ddd); border-radius: 10px; background: var(--card, #fff); cursor: pointer; font: inherit; color: inherit; }
.pr-giorno strong { font-size: 22px; line-height: 1.1; }
.pr-giorno span { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.pr-orari { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-nascosto { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Da fare: riga con pulsante "Scrivi" per il ricontatto */
.todo-riga { display: flex; align-items: center; gap: 8px; }
.todo-riga .todo { flex: 1; }

/* Elenchi a tendina lunghi (es. listino con descrizioni lunghe): restano dentro la scheda */
select { max-width: 100%; text-overflow: ellipsis; }
.card-head > div, .card-head .row { min-width: 0; max-width: 100%; }
.card-head .row { flex-wrap: wrap; }
.card-head .row select { max-width: min(100%, 460px); }
/* Scelte rapide sotto un campo (es. come viene consegnato) */
.scelte { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.scelte .scelta-btn { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; color: var(--ink); }
.scelte .scelta-btn.on { border-color: var(--studio); background: color-mix(in srgb, var(--studio) 12%, transparent); }
