/* Casa di Enrico&Simona · Calasetta — foglio di stile unico (v2) */

/* ── Token ── */
:root {
  --calce: #F6F2EA;
  --carta: #FFFDF8;
  --ink: #14283A;
  --muted: #55616B;
  --line: #D9D2C4;
  --mare: #0E5A78;
  --mare-scuro: #093F55;
  --on-mare: #FFFFFF;
  --ocra: #8A4B08;
  --ok: #1B6B45;
  --mid: #8A4B08;
  --no: #A3261C;
  --range: #DCE6E8;
  --velo: rgba(20, 40, 58, .55);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 3px;
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* alias dei vecchi nomi: li usa il libretto servito dal server */
  --blu: var(--mare);
  --blu-scuro: var(--mare-scuro);
  --blu-chiaro: var(--mare);
  --rosso: var(--no);
  --oro: var(--ocra);
  --verde: var(--ok);
  --turchese: var(--mare);
  --testo: var(--ink);
  --testo-chiaro: var(--muted);
  --bianco: var(--carta);
  --sfondo: var(--calce);
  --sabbia: var(--calce);
  --raggio: var(--r);
  --raggio-g: var(--r);
  --ombra-s: none;
  --ombra: none;
  --ombra-g: none;
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
    --calce: #0F1B26;
    --carta: #16242F;
    --ink: #EDE7DA;
    --muted: #A3AEB6;
    --line: #2B3A46;
    --mare: #7CC4DC;
    --mare-scuro: #A5D8E8;
    --on-mare: #0F1B26;
    --ocra: #E0A65A;
    --ok: #6FCF9B;
    --mid: #E0A65A;
    --no: #F08A80;
    --range: #1F3644;
    --velo: rgba(0, 0, 0, .65);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--calce);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
img, video { max-width: 100%; display: block; }
a { color: var(--mare); text-underline-offset: 3px; }
a:hover { color: var(--mare-scuro); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--mare); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--calce); padding: 10px 16px; border-radius: var(--r); }
.skip:focus { top: 12px; color: var(--calce); }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 64px); }
.eyebrow { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.eyebrow--ocra { color: var(--ocra); }
.display { font-size: clamp(2.2rem, 6.2vw, 4.25rem); line-height: 1.04; letter-spacing: -.02em; text-wrap: balance; }
.display em { color: var(--mare); }
.lede { font-size: clamp(1rem, 1.5vw, 1.0625rem); color: var(--muted); max-width: 34em; }
.sec { padding-block: clamp(40px, 7vw, 72px); }
.sec + .sec { padding-top: 0; }
.rule-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.rule-head h2 { font-size: clamp(1.25rem, 2.6vw, 1.875rem); }
.rule-head .aside { font-size: .8125rem; color: var(--muted); }
.rule-head a.aside { color: var(--mare); font-weight: 500; padding: 12px 0 12px 12px; margin: -12px 0; }

/* ── Testata e navigazione ── */
.top { border-bottom: 1px solid var(--ink); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 32px; min-height: 60px; }
.brand { font-family: var(--serif); font-size: 1.0625rem; color: var(--ink); text-decoration: none; padding: 12px 0; }
.brand span { color: var(--muted); }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom);
  background: var(--calce); border-top: 1px solid var(--line);
  view-transition-name: nav;
}
.nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: .6875rem; color: var(--muted); text-decoration: none;
}
.nav a svg { width: 22px; height: 22px; }
.nav a[aria-current="page"] { color: var(--mare); font-weight: 600; }
@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .top .wrap { min-height: 84px; }
  .brand { font-size: 1.3125rem; }
  .nav { position: static; height: auto; padding: 0; background: none; border: 0; gap: 30px; align-items: center; }
  .nav a { flex: none; flex-direction: row; font-size: .875rem; font-weight: 500; color: var(--ink); padding: 12px 0; border-bottom: 1px solid transparent; transition: border-color .25s; }
  .nav a svg { display: none; }
  .nav a:hover { border-bottom-color: var(--line); color: var(--ink); }
  .nav a[aria-current="page"] { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }
  .nav a.cta, .nav a.cta[aria-current="page"] { background: var(--mare); color: var(--on-mare); padding: 13px 22px; border-radius: var(--r); border: 0; }
  .nav a.cta:hover { background: var(--mare-scuro); color: var(--on-mare); }
}

.theme-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.theme-btn:hover { background: var(--carta); }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn .sun, [data-theme="dark"] .theme-btn .moon { display: none; }
[data-theme="dark"] .theme-btn .sun { display: block; }
.top .wrap > .brand { margin-right: auto; }
.foot { border-top: 1px solid var(--ink); margin-top: clamp(40px, 7vw, 72px); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-block: 22px 30px; font-size: .8125rem; color: var(--muted); }
.foot a { color: var(--muted); }

/* ── Bottoni, chip, campi ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border: 1px solid var(--mare); border-radius: var(--r); background: var(--mare); color: var(--on-mare);
  font-weight: 600; font-size: .9375rem; text-decoration: none; cursor: pointer; transition: background .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--mare-scuro); border-color: var(--mare-scuro); color: var(--on-mare); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--calce); border-color: var(--ink); }
.btn--block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 12px 0; color: var(--mare); font-weight: 600; font-size: .875rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * clamp(20px, 5vw, 64px)); padding: 2px clamp(20px, 5vw, 64px); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: .8125rem; font-weight: 500; cursor: pointer; transition: background .2s, color .2s; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--calce); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .fg label { font-size: .8125rem; font-weight: 500; }
.field input, .fg input, .fg select, .fg textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--ink); border-radius: var(--r);
  background: var(--carta); color: var(--ink); font-size: 1rem;
}
.fg textarea { min-height: 96px; resize: vertical; }
.fg { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Stato spiagge ── */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.verde { color: var(--ok); }
.status.giallo { color: var(--mid); }
.status.rosso { color: var(--no); }
.rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); column-gap: 40px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.row .name { font-family: var(--serif); font-size: 1.125rem; line-height: 1.2; }
.row .sub { display: block; font-family: var(--sans); font-size: .75rem; color: var(--muted); margin-top: 2px; }
.fineprint { font-size: .75rem; color: var(--muted); margin-top: 14px; }

/* ── Oggi ── */
.meteo-now { display: flex; align-items: flex-end; gap: 18px; }
.temp { font-family: var(--serif); font-size: clamp(5.5rem, 21vw, 11rem); line-height: .8; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.meteo-meta { display: flex; flex-direction: column; gap: 2px; font-size: .875rem; color: var(--muted); padding-bottom: .5em; }
.meteo-meta strong { color: var(--ink); font-weight: 600; }
.hero2 { display: flex; flex-direction: column; margin-bottom: clamp(40px, 7vw, 72px); }
.hero2-fig { position: relative; margin: 0; height: clamp(300px, 56svh, 520px); background: var(--line); overflow: hidden; }
.hero2-fig img { width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
.hero2-fig figcaption { position: absolute; right: 0; bottom: 0; background: var(--calce); font-size: .8125rem; padding: 8px 0 6px 14px; }
.hero2-text { display: flex; flex-direction: column; gap: 28px; min-width: 0; padding: 24px clamp(20px, 5vw, 64px) 0; }
.hero2-top { display: flex; flex-direction: column; gap: 16px; }
.hero2-spiagge { border-top: 1px solid var(--ink); }
.hero2-spiagge .row { padding: 12px 0; }
.hero2-spiagge .go { display: inline-block; padding: 12px 0; font-weight: 600; font-size: .875rem; text-decoration: none; }
@media (min-width: 860px) {
  /* foto dentro i margini della pagina, alta quanto la colonna di testo; la sorgente è 1280×720, quindi non viene mai ingrandita */
  .hero2 { display: grid; grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.4fr); gap: 56px; align-items: stretch; max-width: 1240px; margin-inline: auto; padding: clamp(32px, 4vw, 48px) clamp(20px, 5vw, 64px) 0; }
  .hero2-fig { order: 2; height: auto; min-height: 520px; max-height: 720px; border-radius: var(--r); }
  .hero2-fig img { object-position: 55% center; }
  .hero2 .meteo-meta span { white-space: nowrap; }
  .hero2-fig figcaption { left: 0; right: auto; padding: 10px 18px 8px 0; }
  .hero2-text { order: 1; justify-content: space-between; gap: 40px; padding: 8px 0 0; }
}
.hours { display: flex; gap: 0; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--line); }
.hour { flex: none; width: 76px; padding: 16px 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .8125rem; color: var(--muted); border-right: 1px solid var(--line); }
.hour:last-child { border-right: 0; }
.hour b { font-family: var(--serif); font-weight: 400; font-size: 1.375rem; color: var(--ink); }
.hour svg, .day svg { width: 22px; height: 22px; color: var(--ink); }
.days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.day { padding: 16px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .8125rem; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.day:last-child { border-right: 0; }
.day b { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; color: var(--ink); }
.duo { display: grid; gap: 48px 56px; }
@media (min-width: 860px) { .duo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ── Eventi ── */
.ev { display: flex; gap: 18px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ev-date { flex: none; width: 58px; height: 58px; border: 1px solid var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ev-date b { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }
.ev-date span { font-size: .5625rem; letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
.ev-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ev-title { font-size: 1.0625rem; font-weight: 500; line-height: 1.3; }
.ev-meta { font-size: .8125rem; color: var(--muted); }
.ev-desc { font-size: .875rem; color: var(--muted); margin-top: 4px; max-width: 62em; }
.empty { padding: 28px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
details.past { margin-top: 32px; }
details.past > summary { cursor: pointer; padding: 14px 0; font-weight: 500; border-bottom: 1px solid var(--ink); list-style: none; display: flex; justify-content: space-between; }
details.past > summary::-webkit-details-marker { display: none; }
details.past > summary::after { content: '+'; font-family: var(--serif); font-size: 1.25rem; line-height: 1; }
details.past[open] > summary::after { content: '–'; }
details.past .ev { opacity: .75; }

/* ── Carta "La Casa" ── */
.casa-card { display: flex; flex-direction: column; gap: 16px; color: var(--ink); text-decoration: none; }
.casa-card .ph { border-radius: var(--r); overflow: hidden; height: clamp(200px, 30vw, 300px); }
.casa-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.casa-card:hover img { transform: scale(1.04); }
.casa-card .t { font-family: var(--serif); font-size: clamp(1.375rem, 2.4vw, 1.75rem); line-height: 1.12; }
.casa-card .go { color: var(--mare); font-weight: 600; font-size: .875rem; }

/* ── Intestazione pagina ── */
.page-head { padding-block: clamp(24px, 5vw, 56px) clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 14px; }

/* ── Esplora ── */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; padding-top: 24px; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 24px; } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; gap: 10px; padding: 0; border: 0; background: none; text-align: left; color: var(--ink); cursor: pointer; }
.card .ph { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--carta); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover .ph img { transform: scale(1.05); }
.card .ph--type { border: 1px solid var(--line); display: flex; align-items: flex-end; padding: clamp(12px, 2vw, 18px); transition: border-color .3s; }
.card:hover .ph--type { border-color: var(--ink); }
.card .ph--type .nome { font-size: clamp(1.125rem, 2.4vw, 1.5rem); line-height: 1.1; }
.card .tipo { font-size: .625rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ocra); }
.card .nome { font-family: var(--serif); font-size: clamp(1.0625rem, 1.8vw, 1.25rem); line-height: 1.15; }
.card .dist { font-size: .75rem; color: var(--muted); }
.card .txt { display: flex; flex-direction: column; gap: 3px; }
.borgo { display: grid; gap: 20px 56px; padding-bottom: clamp(32px, 5vw, 56px); }
@media (min-width: 860px) { .borgo { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; } }
.borgo p { color: var(--muted); max-width: 40em; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; border-top: 1px solid var(--ink); padding-top: 14px; }
.fact { display: flex; flex-direction: column; }
.fact b { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; }
.fact span { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ── Scheda di dettaglio e lightbox ── */
dialog { color: var(--ink); }
dialog::backdrop { background: var(--velo); }
.sheet {
  border: 0; padding: 0; background: var(--calce); width: min(100%, 720px); max-width: 100%; max-height: 92dvh;
  margin: auto auto 0; border-radius: 14px 14px 0 0; overflow: auto; overscroll-behavior: contain;
}
@media (min-width: 760px) { .sheet { margin: auto; border-radius: var(--r); max-height: 88dvh; } }
.sheet[open] { animation: sheet-in .45s var(--ease); }
.sheet[open]::backdrop { animation: fade-in .3s ease; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
.sheet .ph { aspect-ratio: 16 / 9; background: var(--carta); }
.sheet .ph img { width: 100%; height: 100%; object-fit: cover; }
.credit { margin: 0; padding: 8px clamp(20px, 5vw, 36px) 0; font-size: .6875rem; color: var(--muted); }
.credit a { color: var(--muted); }
.sheet .body { padding: 22px clamp(20px, 5vw, 36px) 32px; display: flex; flex-direction: column; gap: 16px; }
.sheet h2 { font-size: clamp(1.625rem, 4vw, 2.25rem); }
.sheet .desc { color: var(--muted); }
.sheet .tags { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .8125rem; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.sheet h3 { font-family: var(--sans); font-size: .6875rem; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.itin { list-style: none; margin: 0; padding: 0; }
.itin li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.itin time { font-family: var(--serif); color: var(--ocra); }
.tips { background: var(--carta); border-left: 2px solid var(--ocra); padding: 14px 16px; font-size: .9375rem; }
.sheet .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.x { position: sticky; top: 12px; float: right; margin: 12px 12px -56px 0; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--calce); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }

.lb { border: 0; padding: 0; background: transparent; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; overflow: hidden; }
.lb::backdrop { background: rgba(8, 14, 20, .94); }
.lb-stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 56px 12px 24px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: calc(100dvh - 130px); object-fit: contain; border-radius: var(--r); }
.lb-cap { color: #EDE7DA; font-size: .875rem; text-align: center; }
.lb-btn { position: absolute; z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(8, 14, 20, .5); color: #fff; font-size: 1.375rem; cursor: pointer; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ── La Casa ── */
.casa-hero { display: grid; gap: 28px 56px; padding-bottom: clamp(32px, 5vw, 56px); }
@media (min-width: 860px) { .casa-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: end; } }
.casa-hero .ph { border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 10; }
.casa-hero .ph img { width: 100%; height: 100%; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; gap: 8px; padding-top: 24px; }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.gallery button { position: relative; padding: 0; border: 0; background: var(--carta); border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; }
.gallery button.wide { grid-column: span 2; aspect-ratio: auto; }
.gallery img, .gallery video { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.gallery button:hover img { transform: scale(1.05); }
.gallery .play { position: absolute; left: 12px; bottom: 12px; background: var(--calce); color: var(--ink); font-size: .75rem; font-weight: 600; padding: 6px 10px; border-radius: var(--r); }
.amen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); column-gap: 40px; }
.amen li { padding: 14px 0; border-bottom: 1px solid var(--line); }

/* ── Libretto ── */
.lock { max-width: 520px; padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.lock form { display: flex; flex-direction: column; gap: 12px; }
.lock .err { color: var(--no); font-size: .875rem; font-weight: 600; }
.lib-tools { position: sticky; top: 0; z-index: 5; background: var(--calce); padding: 16px 0 12px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); }
.lib-tools .field { flex-direction: row; gap: 10px; }
.lib-tools input { flex: 1; }
#regole-content { padding-top: 20px; }
#regole-content .container { max-width: none; padding: 0; }
#regole-content .container > div:first-child button { min-height: 44px; background: transparent !important; border: 1px solid var(--ink) !important; color: var(--ink) !important; border-radius: var(--r) !important; }
.regole-wrap { display: flex; flex-direction: column; }
details.regola { border-bottom: 1px solid var(--line); }
details.regola > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 0; font-family: var(--serif); font-size: 1.25rem; }
details.regola > summary::-webkit-details-marker { display: none; }
details.regola > summary .rg-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-size: .875rem; }
details.regola > summary .rg-chevron { margin-left: auto; color: var(--muted); font-size: .875rem; transition: transform .3s; }
details.regola[open] > summary .rg-chevron { transform: rotate(180deg); }
.regola-body { padding: 4px 0 24px; color: var(--muted); font-size: .9375rem; }
.regola-body p { margin-bottom: .7rem; }
.regola-body ul { margin: .3rem 0 .8rem; padding-left: 1.2rem; }
.regola-body li { margin-bottom: .5rem; }
.regola-body strong { color: var(--ink); font-weight: 600; }
.regola-body h4 { font-size: 1.125rem; color: var(--ink) !important; }
.regola-body img { cursor: zoom-in; border-radius: var(--r) !important; box-shadow: none !important; }
.regola-body video { border-radius: var(--r) !important; box-shadow: none !important; }
.regola-body .rg-alert { display: flex; gap: .6rem; align-items: flex-start; background: var(--carta); border-left: 2px solid var(--ocra); padding: .7rem .9rem; margin: .6rem 0; color: var(--ink); }
.regola-body .rg-alert i { color: var(--ocra); margin-top: .2rem; }
.regola-subtitle { font-weight: 600; color: var(--ink); margin: .9rem 0 .3rem; }
.lib-hit { outline: 2px solid var(--ocra); outline-offset: 4px; }
[data-theme="dark"] #regole-content [style*="background:rgba(0,0,0"], [data-theme="dark"] #regole-content [style*="background: rgba(0,0,0"] { background: var(--carta) !important; border-color: var(--line) !important; }
[data-theme="dark"] #regole-content [style*="background:#fff"], [data-theme="dark"] #regole-content [style*="background: #fff"], [data-theme="dark"] #regole-content [style*="background:white"] { background: var(--carta) !important; color: var(--ink) !important; }

/* ── Prenota ── */
.prenota { display: grid; gap: 36px 56px; padding-top: 8px; }
@media (min-width: 900px) { .prenota { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.cal-head h3 { font-size: 1.25rem; }
.cal-nav { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 1.25rem; }
.cal-nav:first-child { margin-left: -12px; }
.cal-nav:last-child { margin-right: -12px; }
.cal-dnames { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 10px 0 4px; text-align: center; font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cal-dates { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; }
.cal-d { height: 46px; display: flex; align-items: center; justify-content: center; font-size: .9375rem; cursor: pointer; user-select: none; transition: background .15s; }
.cal-d.empty { cursor: default; border: 0; padding: 0; }
.cal-d:not(.empty):not(.past):not(.booked):hover { background: var(--range); }
.cal-d.today { font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
.cal-d.past { color: var(--line); cursor: not-allowed; }
.cal-d.booked { color: var(--muted); text-decoration: line-through; cursor: not-allowed; opacity: .7; }
.cal-d.in-range, .cal-d.in-range-hover { background: var(--range); }
.cal-d.sel-start, .cal-d.sel-end, .cal-d.hover-end { background: var(--ink) !important; color: var(--calce); border-radius: 23px; font-weight: 600; text-decoration: none; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; padding-top: 12px; font-size: .75rem; color: var(--muted); }
.leg-item { display: flex; align-items: center; gap: 6px; }
.leg-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--ink); }
.leg-dot.se { background: var(--ink); }
.leg-dot.bo { border: 0; width: auto; height: auto; border-radius: 0; }
.leg-dot.bo::before { content: '12'; text-decoration: line-through; }
.dates-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); padding: 12px 0; margin-bottom: 20px; }
.date-box { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.date-box label { font-size: .625rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.date-input { border: 0; background: transparent; padding: 0; min-height: 32px; font-family: var(--serif); font-size: 1.0625rem; color: var(--ink); width: 100%; min-width: 0; }
.date-val { font-family: var(--serif); font-size: 1.0625rem; min-height: 32px; display: flex; align-items: center; white-space: nowrap; }
.btn-invia { width: 100%; min-height: 52px; border: 0; border-radius: var(--r); background: var(--mare); color: var(--on-mare); font-weight: 600; font-size: .9375rem; cursor: pointer; }
.btn-invia:hover { background: var(--mare-scuro); }
.btn-invia[disabled] { opacity: .6; cursor: progress; }
.nota-form { font-size: .75rem; color: var(--muted); text-align: center; margin-top: 10px; }
.success-box { display: none; padding: 28px 0; border-top: 1px solid var(--ink); }
.success-box h3 { font-size: 1.75rem; margin-bottom: 8px; }
.success-box p { color: var(--muted); }

/* ── Admin (solo proprietario) ── */
#adminOverlay { display: none; position: fixed; inset: 0; z-index: 300; background: var(--velo); overflow-y: auto; padding: 24px 12px 96px; }
.admin-box { max-width: 640px; margin: 0 auto; background: var(--calce); border-radius: var(--r); padding: 24px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--ink); padding-bottom: 12px; margin-bottom: 20px; }
.admin-header h2 { font-size: 1.375rem; }
.admin-close { width: 44px; height: 44px; border: 0; background: none; font-size: 1.25rem; cursor: pointer; color: var(--ink); }
.admin-section { margin-bottom: 24px; }
.admin-section-title { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.req-badge:not(:empty) { background: var(--no); color: #fff; border-radius: 10px; padding: 1px 7px; margin-left: 6px; letter-spacing: 0; }
.admin-booking-row, .admin-req-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.admin-booking-info strong { display: block; }
.admin-booking-dates, .admin-req-details { font-size: .8125rem; color: var(--muted); line-height: 1.55; }
.admin-req-actions { display: flex; gap: 8px; }
.admin-confirm-btn, .admin-del-btn, .admin-add-btn { min-height: 40px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: .8125rem; font-weight: 600; cursor: pointer; }
.admin-confirm-btn, .admin-add-btn { background: var(--mare); border-color: var(--mare); color: var(--on-mare); }
.admin-del-btn { border-color: var(--no); color: var(--no); }
.admin-add-btn { width: 100%; min-height: 48px; margin-top: 12px; }
.admin-add-box { border-top: 1px solid var(--ink); padding-top: 16px; }
.admin-add-box h3 { font-size: 1.125rem; margin-bottom: 12px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.admin-field label { display: block; font-size: .8125rem; font-weight: 500; margin-bottom: 4px; }
.admin-field input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ink); border-radius: var(--r); background: var(--carta); }
.admin-empty { font-size: .875rem; color: var(--muted); font-style: italic; padding: 6px 0; }
#adminTrigger { background: none; border: 0; padding: 12px 0; color: var(--muted); font-size: .8125rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ── Avvisi ── */
.toasts { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
@media (min-width: 860px) { .toasts { bottom: 28px; } }
.toast { background: var(--ink); color: var(--calce); padding: 14px 18px; border-radius: var(--r); font-size: .9375rem; animation: sheet-in .35s var(--ease); pointer-events: auto; }

/* ── Movimento ── */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s ease both; }
::view-transition-new(root) { animation: vt-in .5s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
::view-transition-group(shot) { animation-duration: .5s; animation-timing-function: var(--ease); }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.kb img { animation: kb 22s ease-out both; }
@keyframes kb { from { transform: scale(1.09); } to { transform: scale(1); } }
.skel { color: var(--line); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}
