/* Il Brillo Cantante — il sito (il bancone visto dall'alto) */

:root {
  --notte: #0c0705;
  --legno-buio: #1a0f09;
  --legno: #3b2315;
  --legno-chiaro: #6b4326;
  --verde: #153a2b;         /* verde bottiglia */
  --verde-vivo: #24604a;
  --oro: #c9a24b;
  --oro-chiaro: #edd9a3;
  --mattone: #9c4a31;
  --crema: #f3ead8;
  --carta: #efe4cb;
  --inchiostro: #24170f;
  --rosso: #c8372a;         /* solo sirena e cose del tifo */
  --ardesia: #171a19;
  --gesso: #f5f2e7;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mano: "Caveat Brush", "Segoe Print", "Bradley Hand", cursive;
  --piano-l: min(940px, 100vw);
  --barra-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--notte);
  color: var(--crema);
  font-family: var(--serif);
  font-size: clamp(16px, 0.35vw + 15px, 19px);
  line-height: 1.55;
  font-optical-sizing: auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.in-carica, body.fermo { overflow: hidden; }
img, video { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--oro-chiaro); outline-offset: 3px; border-radius: 4px; }

.gesso { font-family: var(--mano); color: var(--gesso); letter-spacing: .01em; line-height: 1.15;
  text-shadow: 0 0 1px rgba(245,242,231,.55), 1px 1px 0 rgba(0,0,0,.25); }
.gesso-scuro { font-family: var(--mano); color: #5a3a1c; font-size: 1.12em; line-height: 1.2; }
.occhiello { font-size: .72em; letter-spacing: .28em; text-transform: uppercase; color: #8a6a35; font-weight: 600; }
.piccolo { font-size: .82em; opacity: .75; }

/* ---------- bottoni ---------- */
.bottone {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .72em 1.25em; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--serif); font-weight: 600; font-size: .92em; letter-spacing: .02em; line-height: 1.1;
  text-decoration: none; text-align: center; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.bottone:hover { transform: translateY(-1px); }
.bottone:active { transform: translateY(1px); }
.bottone-oro { background: linear-gradient(180deg, #f0d894, #c9a24b 55%, #a67f2f); color: #2a1a08; border-color: #f7e7b8;
  box-shadow: 0 2px 0 #7b5c1e, 0 8px 18px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.6); }
.bottone-verde { background: linear-gradient(180deg, #2c6b53, #153a2b); color: var(--oro-chiaro); border-color: #3e7f66;
  box-shadow: 0 2px 0 #0a2117, 0 8px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.14); }
.bottone-rosso { background: radial-gradient(circle at 35% 30%, #f0645a, #c8372a 55%, #8f1f15); color: #fff3ea; border-color: #f08a80;
  box-shadow: 0 3px 0 #5e120b, 0 8px 22px rgba(200,55,42,.45), inset 0 1px 0 rgba(255,255,255,.35); }
.bottone-filo { background: transparent; border-color: currentColor; color: inherit; opacity: .8; }
.fila { display: flex; flex-wrap: wrap; gap: .6em; align-items: center; }
.come-link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- caricamento ---------- */
#carica {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: radial-gradient(ellipse at 50% 40%, #2a180e, var(--notte) 70%);
  transition: opacity .7s ease, visibility .7s;
}
body:not(.in-carica) #carica { opacity: 0; visibility: hidden; pointer-events: none; }
.carica-boccale { width: 124px; height: auto; filter: drop-shadow(0 10px 24px rgba(0,0,0,.6)); }
.carica-birra { transform: translateY(calc(176px - var(--su, 0) * 150px)); transition: transform .5s ease-out; }
.carica-schiuma { transform: translateY(calc(176px - var(--su, 0) * 150px - 26px)); transition: transform .5s ease-out; }
.carica-schiuma circle { animation: bolla 1.6s ease-in-out infinite; }
.carica-schiuma circle:nth-child(odd) { animation-delay: -.8s; }
@keyframes bolla { 50% { transform: translateY(-3px); } }
.carica-testo { font-size: 1.7rem; }

/* ---------- barra ---------- */
.barra {
  position: fixed; inset: 0 0 auto 0; height: var(--barra-h); z-index: 40;
  display: flex; align-items: center; gap: 18px; padding: 0 clamp(12px, 3vw, 28px);
  background: linear-gradient(180deg, rgba(12,7,5,.92), rgba(12,7,5,.55) 70%, rgba(12,7,5,0));
  transition: transform .35s ease;
}
.barra.nascosta { transform: translateY(-110%); }
.marchio { font-weight: 600; font-style: italic; font-size: 1.18rem; color: var(--oro-chiaro); text-decoration: none; white-space: nowrap; letter-spacing: .01em; }
.voci { display: flex; gap: clamp(10px, 1.6vw, 22px); margin-left: auto; }
.voci a { text-decoration: none; font-size: .88rem; letter-spacing: .04em; opacity: .78; padding: 6px 2px; border-bottom: 1px solid transparent; white-space: nowrap; }
.voci a:hover, .voci a.qui { opacity: 1; border-color: var(--oro); color: var(--oro-chiaro); }
.barra-gioca { font-size: .82rem; padding: .6em 1.1em; white-space: nowrap; }
.barra-menu { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; padding: 11px 9px; }
.barra-menu span { display: block; height: 2px; background: var(--oro-chiaro); margin: 5px 0; border-radius: 2px; transition: transform .25s, opacity .25s; }
.barra-menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.barra-menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.barra-menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- lucine ---------- */
.lucine { position: fixed; inset: 0 0 auto 0; height: 62px; z-index: 30; pointer-events: none; transform-origin: 50% 0; }
.lucine svg { width: 100%; height: 100%; overflow: visible; }
.lucine .filo { fill: none; stroke: #120b07; stroke-width: 2; }
.lucine .lampada { fill: #ffd98a; filter: drop-shadow(0 0 7px #ffb84a) drop-shadow(0 0 22px rgba(255,170,60,.65)); animation: brilla 4.5s ease-in-out infinite; }
.lucine .lampada:nth-of-type(3n) { animation-delay: -1.7s; animation-duration: 5.6s; }
.lucine .lampada:nth-of-type(3n+1) { animation-delay: -3.1s; animation-duration: 6.4s; }
@keyframes brilla { 0%, 100% { opacity: 1; } 45% { opacity: .78; } 55% { opacity: .92; } }

/* ---------- tela e lampo ---------- */
#tela { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; }
.lampo { position: fixed; inset: 0; z-index: 35; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(200,55,42,0) 35%, rgba(200,55,42,.55) 100%); }
.lampo.acceso { animation: lampeggia .55s steps(2, jump-none) 9; }
@keyframes lampeggia { 0% { opacity: 1; } 50% { opacity: .08; } 100% { opacity: 1; } }

/* ---------- il bancone ---------- */
/* niente deve sporgere di lato: su telefono allargherebbe tutta la pagina */
#bancone { position: relative; padding-top: 0; overflow-x: hidden; overflow-x: clip;
  background:
    radial-gradient(ellipse 60% 30% at 50% 0%, rgba(255,170,70,.10), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 2px, transparent 2px 86px),
    linear-gradient(180deg, #140c08, #0a0604); }
.piano {
  position: relative; width: var(--piano-l); margin: 0 auto;
  background: #2a180e url("../img/legno.jpg") center top / 100% auto repeat-y;
  box-shadow: 0 0 0 1px #0a0503, 0 0 90px 30px rgba(0,0,0,.7);
}
/* bordo arrotondato del bancone e luce calda */
.piano::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.18) 3.2%, transparent 9%, transparent 91%, rgba(0,0,0,.18) 96.8%, rgba(0,0,0,.72)),
    linear-gradient(90deg, transparent 1.1%, rgba(237,217,163,.28) 1.3%, transparent 1.9%, transparent 98.1%, rgba(237,217,163,.2) 98.7%, transparent 98.9%); }
.piano::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; mix-blend-mode: soft-light;
  background: radial-gradient(ellipse 70% 420px at 30% 600px, rgba(255,196,110,.55), transparent 70%) 0 0 / 100% 1900px repeat-y,
              radial-gradient(ellipse 60% 380px at 72% 1500px, rgba(255,186,96,.5), transparent 70%) 0 0 / 100% 1900px repeat-y;
  animation: luce 16s ease-in-out infinite alternate; }
@keyframes luce { from { background-position: 0 0, 0 0; opacity: .9; } to { background-position: 0 -70px, 0 60px; opacity: 1; } }

.sgabelli { position: absolute; top: 0; bottom: 420px; left: calc(50% + var(--piano-l) / 2 - 62px); width: 190px; pointer-events: none; }
.sgabelli img { position: absolute; left: 0; width: 190px; height: auto; filter: brightness(.6) drop-shadow(0 10px 14px rgba(0,0,0,.7)); }
@media (max-width: 1200px) { .sgabelli { display: none; } }

/* ---------- tappe ---------- */
.tappa {
  position: relative; z-index: 2; display: grid; align-content: center; align-items: center;
  grid-template-columns: [roba] minmax(0, 1fr) [corsia] 31%;
  column-gap: 3%; row-gap: clamp(20px, 3.2vh, 38px);
  min-height: max(112vh, 780px); padding: 13vh 6% 11vh;
}
.tappa.sx { grid-template-columns: [corsia] 31% [roba] minmax(0, 1fr); }
.tappa.centro { grid-template-columns: [roba] minmax(0, 1fr); justify-items: center; }
.tappa > * { grid-column: roba; }
.tappa > .fermata { grid-column: corsia; grid-row: 1 / span 12; justify-self: center; align-self: center; }
/* la fermata sta a un'altezza tale che, quando il boccale ci arriva, il primo oggetto della tappa è intero in cima allo schermo */
.tappa > i.fermata { align-self: start; margin-top: calc(46vh - 86px); }
.tappa.centro > .fermata { grid-column: roba; grid-row: auto; }
i.fermata { width: 2px; height: 2px; display: block; }

.ogg { position: relative; will-change: transform; transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(calc(var(--rot, 0deg) + var(--dr, 0deg))); }
.ogg > img { width: 100%; height: auto; filter: drop-shadow(0 22px 16px rgba(0,0,0,.55)) drop-shadow(0 3px 3px rgba(0,0,0,.5)); user-select: none; -webkit-user-drag: none; }
[data-pannello] { cursor: pointer; }

/* comparsa */
.tappa .ogg, .tappa .targa-gioca { opacity: 0; transition: opacity .8s ease; }
.tappa.vista .ogg, .tappa.vista .targa-gioca { opacity: 1; }
.tappa.vista .ogg:nth-child(2) { transition-delay: .12s; }
.tappa.vista .ogg:nth-child(3) { transition-delay: .24s; }
.tappa.vista .ogg:nth-child(4) { transition-delay: .36s; }

/* carta paglia: il testo sta sugli oggetti */
.carta {
  --rot: -1.2deg;
  background:
    repeating-linear-gradient(0deg, rgba(120,84,40,.05) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 20% 15%, #f7eedb, var(--carta) 60%, #e2d2b0);
  color: var(--inchiostro); padding: clamp(20px, 2.6vw, 30px) clamp(20px, 2.8vw, 34px); border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 18px 30px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.45);
  max-width: 470px; display: grid; gap: .8em; justify-items: start;
}
.carta h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); font-weight: 600; font-style: italic; line-height: 1.05; color: var(--verde); letter-spacing: -.01em; }
.carta p { text-wrap: pretty; }
.carta .nota-skualo { color: #6a3f1c; text-shadow: none; font-size: 1.5em; transform: rotate(-2deg); }
.sx .carta { --rot: 1.1deg; justify-self: end; }

/* ardesia: i commenti di Skualo */
.ardesia {
  --rot: 2.2deg; justify-self: start; max-width: 330px;
  background: radial-gradient(ellipse at 30% 20%, #2a2f2d, var(--ardesia) 70%); border: 9px solid #6b4326; border-radius: 4px;
  outline: 1px solid rgba(0,0,0,.6); padding: 16px 20px; font-size: clamp(1.25rem, 1.9vw, 1.6rem);
  box-shadow: 0 16px 26px rgba(0,0,0,.55), inset 0 0 22px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.05);
}
.sx .ardesia { justify-self: end; --rot: -2deg; }

/* ---------- 1 · home ---------- */
.t-home { padding-top: calc(var(--barra-h) + 5vh); min-height: max(118vh, 860px); }
.lancio { grid-column: corsia !important; grid-row: 1 / span 12; align-self: start; justify-self: end; position: relative;
  width: 205%; aspect-ratio: 1; margin: calc(-1 * (var(--barra-h) + 5vh)) -19% 0 0; pointer-events: none; z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%), linear-gradient(#000, #000);
  -webkit-mask-composite: source-in; mask-image: radial-gradient(ellipse 52% 54% at 50% 46%, #000 60%, transparent 100%);
  transition: opacity 1.4s ease; }
.lancio video { width: 100%; height: 100%; object-fit: cover; }
.lancio.finito { opacity: 0; }
.ogg-cartello { --rot: -2.5deg; width: min(100%, 540px); margin-left: -3%; z-index: 3; }
.sul-cartello { position: absolute; inset: 44% 10.5% 12% 11%; display: grid; place-content: center; text-align: center; gap: .3em; }
.sul-cartello h1 { font-size: clamp(1.7rem, 5.1vw, 3.3rem); font-weight: 600; font-style: italic; line-height: .98; letter-spacing: -.01em;
  background: linear-gradient(180deg, #f8e8b6, #d2a94c 60%, #a57c2c); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,.65)); }
.sul-cartello p { font-size: clamp(.62rem, 1.25vw, .86rem); letter-spacing: .2em; text-transform: uppercase; color: #e3cd95; opacity: .9; }
.carta-benvenuto { --rot: 1.4deg; margin-left: 5%; }
.carta-benvenuto p em { font-style: italic; font-weight: 600; }
.ogg-sottobicchiere { width: clamp(150px, 62%, 210px); }
.ogg-sottobicchiere > img { filter: drop-shadow(0 6px 5px rgba(0,0,0,.6)); }
.ogg-sottobicchiere figcaption { position: absolute; left: 50%; top: 104%; transform: translateX(-50%) rotate(-4deg); width: max-content; max-width: 240px; text-align: center; font-size: 1.45rem;
  animation: su-e-giu 2.4s ease-in-out infinite; }
@keyframes su-e-giu { 50% { transform: translateX(-50%) translateY(7px) rotate(-4deg); } }

/* ---------- 2 · locale ---------- */
.ogg-lanterna { width: clamp(120px, 26%, 190px); justify-self: end; margin: 0 4% -3% 0; --rot: 8deg; }
.ogg-lanterna::after { content: ""; position: absolute; inset: -70%; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255,190,90,.5), rgba(255,160,60,.16) 38%, transparent 66%); animation: fiamma 3.2s ease-in-out infinite; }
@keyframes fiamma { 0%, 100% { opacity: .95; transform: scale(1); } 30% { opacity: .75; transform: scale(.96); } 60% { opacity: 1; transform: scale(1.03); } }
.ogg-cassaforte { width: min(70%, 320px, 40vh); justify-self: end; margin-right: 6%; --rot: -3deg; }
.targhetta { position: absolute; left: 26%; right: 24%; top: 11.5%; height: 15%; display: grid; place-content: center; text-align: center;
  font-size: clamp(.55rem, 1.25vw, .8rem); font-weight: 700; line-height: 1.05; letter-spacing: .04em; text-transform: uppercase; color: #3a2a0c;
  text-shadow: 0 1px 0 rgba(255,240,190,.6); }
.ogg-chiavi { grid-column: corsia !important; grid-row: 1 / span 12; align-self: center; justify-self: end; width: clamp(84px, 46%, 130px);
  margin: 0 -12% 34vh 0; --rot: 24deg; transform-origin: 30% 20%; }
.ogg-chiavi.tintinna { animation: tintinna .9s ease-out; }
@keyframes tintinna { 0% { rotate: 0deg; } 12% { rotate: -19deg; } 26% { rotate: 15deg; } 40% { rotate: -11deg; } 56% { rotate: 8deg; } 72% { rotate: -4deg; } 100% { rotate: 0deg; } }

/* ---------- 3 · menu ---------- */
.ogg-lavagnetta { width: min(96%, 400px, 50vh); --rot: 1.6deg; margin-left: 4%; }
.sulla-lavagna { position: absolute; inset: 10% 13% 11% 13%; display: grid; align-content: start; gap: .5em; font-size: clamp(1rem, 2.5vw, 1.42rem); }
.sulla-lavagna strong { font-weight: 400; font-size: 1.32em; text-align: center; border-bottom: 2px dashed rgba(245,242,231,.5); padding-bottom: .2em; }
.sulla-lavagna ul { display: grid; gap: .42em; }
.sulla-lavagna li { display: flex; justify-content: space-between; gap: .5em; align-items: baseline; opacity: 0; transform: translateX(-8px); transition: opacity .5s ease, transform .5s ease; }
.sulla-lavagna li b { font-weight: 400; color: var(--oro-chiaro); }
.sulla-lavagna li.scritto { opacity: 1; transform: none; }
.sulla-lavagna em { font-style: normal; font-size: .82em; opacity: .65; text-align: center; margin-top: .3em; }
.carta-menu { margin-left: 12%; --rot: -2deg; }

/* ---------- 4 · serate ---------- */
.t-serate { row-gap: 10px; }
.volantino {
  background: #f4efe2; color: #1b1510; padding: 18px 20px 16px; border-radius: 2px; text-align: center; width: min(100%, 330px); justify-self: end;
  box-shadow: 0 10px 16px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.5); transition: transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .6s ease, opacity .8s ease;
  transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--rot, 0deg)) translateY(var(--alza, 0px)) scale(var(--scala, 1));
}
.volantino.su { --alza: -16px; --scala: 1.035; box-shadow: 0 34px 34px rgba(0,0,0,.42), 0 2px 3px rgba(0,0,0,.3); }
.volantino:hover { --scala: 1.03; }
.v-live { --rot: -4deg; background: #f7f3e8; margin-right: 6%; width: min(100%, 360px); padding-bottom: 14px; border: 6px double #1b1510; }
.v-giorno { font-size: 1.05rem; letter-spacing: .5em; text-transform: uppercase; font-weight: 700; padding-left: .5em; }
.v-live-scritta { font-size: clamp(2.8rem, 7vw, 4.2rem); font-weight: 700; font-style: italic; line-height: .9; letter-spacing: -.02em; margin: 2px 0 4px; }
.volantino img { filter: none; }
.v-live img { width: 92%; height: auto; mix-blend-mode: multiply; margin: 2% auto 3%; }
.v-piede { font-size: .86rem; line-height: 1.3; position: relative; }
.v-water { --rot: 3deg; background: #dfe9ea; margin: -34px 44% 0 0; width: min(62%, 230px); padding: 14px 14px 12px; z-index: 2; }
.v-partita { --rot: -2deg; background: #f1e3c0; margin: -110px 0 0 0; width: min(56%, 210px); padding: 16px 12px 14px; border-top: 10px solid var(--rosso);
  background-image: repeating-linear-gradient(90deg, transparent 0 18px, rgba(200,55,42,.09) 18px 36px); }
.v-titolo { font-weight: 700; font-style: italic; font-size: 1.55rem; line-height: 1; color: var(--verde); }
.v-partita .v-titolo { color: #7c1e15; }
.v-sotto { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; margin: 5px 0 9px; }
.giovedi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 0 0 9px; }
.giovedi li { border: 1px solid #54707a; padding: 5px 0 6px; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #54707a; position: relative; background: rgba(255,255,255,.4); }
.giovedi li.si { background: #1e4a5a; color: #fff; border-color: #1e4a5a; font-weight: 700; }
.giovedi li.si::after { content: ""; position: absolute; right: 4px; top: 3px; width: 7px; height: 7px; border-radius: 0 50% 50% 50%; transform: rotate(45deg); background: #9fd6e6; }
.carta-serate { justify-self: end; margin: 22px 3% 0 0; }

/* ---------- 5 · sirena ---------- */
.ogg-sirena { grid-column: corsia !important; grid-row: 1 / span 12; align-self: start; justify-self: start; width: min(140%, 310px); margin: 3vh 0 0 -44%; --rot: -7deg; z-index: 3; }
.ogg-sirena .bagliore { position: absolute; left: 4%; top: -18%; width: 62%; aspect-ratio: 1; border-radius: 50%; pointer-events: none; mix-blend-mode: screen; opacity: .35;
  background: radial-gradient(circle, rgba(255,70,50,.9), rgba(255,40,30,.3) 40%, transparent 68%); animation: respiro 3s ease-in-out infinite; }
@keyframes respiro { 50% { opacity: .18; } }
.ogg-sirena.suona .bagliore { animation: gira .28s linear infinite; opacity: 1; }
@keyframes gira { 0% { opacity: 1; transform: scale(1.5); } 50% { opacity: .25; transform: scale(1); } 100% { opacity: 1; transform: scale(1.5); } }
.carta-sirena { --rot: -1deg; }
.calici { grid-column: 1 / -1 !important; justify-self: center; text-align: center; font-size: clamp(3rem, 12vw, 7.5rem); line-height: .9; color: #fff; pointer-events: none;
  position: fixed; left: 0; right: 0; top: 34vh; z-index: 36; opacity: 0; transform: scale(.6) rotate(-4deg);
  text-shadow: 0 0 2px #fff, 0 0 40px rgba(200,55,42,.9), 0 6px 0 rgba(0,0,0,.4); }
.calici.grida { animation: grida 3.6s ease-out forwards; }
@keyframes grida { 0% { opacity: 0; transform: scale(.4) rotate(-8deg); } 10% { opacity: 1; transform: scale(1.12) rotate(-4deg); } 18% { transform: scale(1) rotate(-3deg); } 80% { opacity: 1; transform: scale(1.03) rotate(-3deg); } 100% { opacity: 0; transform: scale(1.1) rotate(-2deg); } }

/* ---------- 6 · libro ---------- */
.libro { width: min(74%, 300px, 40vh); aspect-ratio: 2 / 3; justify-self: end; margin-right: 8%; --rot: 5deg; perspective: 1400px; }
.libro-copertina, .libro-pagine { position: absolute; inset: 0; border-radius: 3px 6px 6px 3px; }
.libro-pagine { background: linear-gradient(90deg, #d8cdb4, #fbf6ea 9%, #f6efdf); color: var(--inchiostro); padding: 12% 7% 9% 47%; display: grid; align-content: center; gap: .7em; font-size: clamp(.7rem, 1.25vw, .86rem); line-height: 1.35;
  box-shadow: 0 22px 30px rgba(0,0,0,.55), 0 2px 4px rgba(0,0,0,.5), inset -6px 0 8px rgba(0,0,0,.08); }
.libro-pagine .bottone { justify-self: start; font-size: .8em; padding: .5em 1em; }
.libro-copertina { transform-origin: 0 50%; transition: transform 1.1s cubic-bezier(.3,.7,.2,1);
  box-shadow: 4px 0 10px rgba(0,0,0,.35); overflow: hidden; background: #fff; }
.libro-copertina img { width: 100%; height: 100%; object-fit: cover; }
.libro-copertina::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.12) 5%, transparent 12%, transparent 80%, rgba(0,0,0,.08)); }
.libro.aperto .libro-copertina, .libro:hover .libro-copertina { transform: rotateY(-64deg); box-shadow: 18px 0 26px rgba(0,0,0,.45); }
.carta-libro { justify-self: end; }

/* ---------- 7 · gioca ---------- */
.t-gioca { min-height: max(104vh, 760px); padding-bottom: 9vh; row-gap: 26px; }
.carta-gioca { --rot: 1.5deg; justify-self: end; max-width: min(46%, 390px); }
.stato-regalo { font-weight: 600; font-style: italic; color: var(--verde-vivo); border-top: 1px dashed rgba(36,23,15,.35); padding-top: .7em; width: 100%; }
.stato-regalo.preso { color: #8a2b1f; }
.targa-gioca {
  width: clamp(250px, 62vw, 380px); aspect-ratio: 1; border-radius: 50%; border: 0; display: grid; place-content: center; gap: 2px; text-align: center;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.55), transparent 32%),
    radial-gradient(circle, #f3dc98 0 46%, #c9a24b 62%, #8d6a23 70%, #1f4f3c 71%, #153a2b 86%, #0a2117 100%);
  color: #2a1a08; box-shadow: 0 0 0 5px #0a2117, 0 0 0 9px #c9a24b, 0 26px 50px rgba(0,0,0,.7), 0 0 90px rgba(255,190,90,.25);
  transition: transform .2s ease, box-shadow .3s ease, opacity .8s ease; -webkit-tap-highlight-color: transparent;
  position: relative; align-content: start; padding-top: 10%;
}
.targa-posto { position: absolute; left: 50%; top: 77%; width: 32%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  border: 2px dashed rgba(42,26,8,.4); background: radial-gradient(circle, rgba(42,26,8,.16), rgba(42,26,8,.03)); }
.targa-gioca:hover { transform: scale(1.03); }
.targa-gioca.pronta { box-shadow: 0 0 0 5px #0a2117, 0 0 0 9px #f0d894, 0 26px 50px rgba(0,0,0,.7), 0 0 130px rgba(255,200,100,.6); animation: pulsa 1.8s ease-in-out infinite; }
@keyframes pulsa { 50% { transform: scale(1.035); } }
.targa-scritta { font-size: clamp(2.7rem, 8vw, 4.2rem); font-weight: 700; font-style: italic; line-height: .9; letter-spacing: -.02em; }
.targa-sotto { font-size: clamp(.8rem, 2vw, 1rem); letter-spacing: .2em; text-transform: uppercase; font-weight: 600; }
.ardesia-classifica { justify-self: center; --rot: 1.5deg; min-width: 250px; }
.ardesia-classifica strong { font-weight: 400; display: block; text-align: center; margin-bottom: .3em; color: var(--oro-chiaro); }
.ardesia-classifica li { display: flex; justify-content: space-between; gap: 1.2em; font-size: .92em; }
.fine-bancone { height: 46px; position: relative; z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.55) 60%, #0a0503), linear-gradient(180deg, transparent 52%, rgba(237,217,163,.4) 56%, transparent 62%); }

/* ---------- il conto (contatti) ---------- */
.conto-zona { position: relative; z-index: 2; padding: 70px 16px 110px; display: grid; justify-items: center; }
.conto {
  width: min(100%, 430px); background: linear-gradient(180deg, #fbf8f0, #efe9db); color: #1d1712; padding: 30px 30px 26px; transform: rotate(-1.2deg);
  font-size: .95rem; box-shadow: 0 30px 50px rgba(0,0,0,.6);
  --dente: 9px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--dente)), 97.5% 100%, 95% calc(100% - var(--dente)), 92.5% 100%, 90% calc(100% - var(--dente)), 87.5% 100%, 85% calc(100% - var(--dente)), 82.5% 100%, 80% calc(100% - var(--dente)), 77.5% 100%, 75% calc(100% - var(--dente)), 72.5% 100%, 70% calc(100% - var(--dente)), 67.5% 100%, 65% calc(100% - var(--dente)), 62.5% 100%, 60% calc(100% - var(--dente)), 57.5% 100%, 55% calc(100% - var(--dente)), 52.5% 100%, 50% calc(100% - var(--dente)), 47.5% 100%, 45% calc(100% - var(--dente)), 42.5% 100%, 40% calc(100% - var(--dente)), 37.5% 100%, 35% calc(100% - var(--dente)), 32.5% 100%, 30% calc(100% - var(--dente)), 27.5% 100%, 25% calc(100% - var(--dente)), 22.5% 100%, 20% calc(100% - var(--dente)), 17.5% 100%, 15% calc(100% - var(--dente)), 12.5% 100%, 10% calc(100% - var(--dente)), 7.5% 100%, 5% calc(100% - var(--dente)), 2.5% 100%, 0 calc(100% - var(--dente)));
}
.conto-testa { font-size: 1.7rem; font-weight: 600; font-style: italic; text-align: center; line-height: 1.1; color: var(--verde); }
.conto .centro { text-align: center; }
.conto-riga { letter-spacing: .22em; text-transform: uppercase; font-size: .74rem; margin-top: 4px; }
.conto hr { border: 0; border-top: 1px dashed #8d8372; margin: 16px 0; }
.conto h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.conto h3 { font-size: 1.05rem; font-weight: 600; }
.conto dl div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted #b9ae9a; padding: 3px 0; }
.conto dd { font-variant-numeric: tabular-nums; font-weight: 600; }
.conto-nota { font-size: .84rem; font-style: italic; margin-top: 10px; opacity: .8; }
.conto form { display: grid; gap: 10px; }
.conto label { display: grid; gap: 4px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: #5d5446; }
.conto input, .conto textarea { font: inherit; font-family: var(--serif); font-size: 1rem; letter-spacing: 0; text-transform: none; padding: 9px 11px; border: 1px solid #b9ae9a; border-radius: 3px; background: #fffdf7; color: #1d1712; resize: vertical; }
.conto-esito { font-size: 1.25rem; }
.conto-piede { font-size: .76rem; text-align: center; margin-top: 14px; line-height: 1.6; opacity: .85; }

/* ---------- pinta di avanzamento ---------- */
.pinta { position: fixed; right: clamp(10px, 2vw, 22px); bottom: clamp(10px, 2vw, 22px); z-index: 38; display: grid; justify-items: center; gap: 3px; pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.7)); transition: opacity .4s; }
.pinta svg { width: 30px; height: 48px; }
.pinta span { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--oro-chiaro); opacity: .85; max-width: 80px; text-align: center; line-height: 1.1; }
body.in-carica .pinta { opacity: 0; }

/* ---------- pannelli ---------- */
.velo { position: fixed; inset: 0; z-index: 60; background: rgba(8,4,2,.66); backdrop-filter: blur(3px); animation: appare .3s ease; }
@keyframes appare { from { opacity: 0; } }
.pannello {
  position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(600px, 100vw); overflow-y: auto; overscroll-behavior: contain;
  background:
    repeating-linear-gradient(0deg, rgba(120,84,40,.04) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #f7eedb, var(--carta));
  color: var(--inchiostro); padding: clamp(26px, 5vw, 46px) clamp(20px, 5vw, 44px) 60px;
  box-shadow: -30px 0 60px rgba(0,0,0,.6); animation: entra .45s cubic-bezier(.2,.8,.2,1);
  display: grid; align-content: start; gap: 14px;
}
@keyframes entra { from { transform: translateX(100%); } }
.pannello h2 { font-size: clamp(2.1rem, 6vw, 3rem); font-weight: 600; font-style: italic; line-height: 1; color: var(--verde); letter-spacing: -.015em; padding-right: 50px; }
.pannello h3 { font-size: 1.32rem; font-weight: 600; color: var(--verde); margin-top: 16px; border-bottom: 1px solid rgba(21,58,43,.25); padding-bottom: 4px; }
.pannello .sommario { font-size: 1.18rem; font-style: italic; color: #5a4630; }
.pannello ul:not(.listino) { list-style: disc; padding-left: 1.2em; display: grid; gap: .5em; }
.pannello .foto { width: 100%; height: auto; border-radius: 3px; box-shadow: 0 10px 20px rgba(0,0,0,.3); background: #cbb994; }
.pannello a:not(.bottone) { color: var(--verde-vivo); }
.pannello blockquote.gesso { background: radial-gradient(ellipse at 30% 20%, #2a2f2d, var(--ardesia) 70%); border: 8px solid #6b4326; padding: 16px 20px; font-size: 1.5rem; border-radius: 3px; transform: rotate(-.8deg); box-shadow: 0 10px 18px rgba(0,0,0,.35); }
.chiudi { position: sticky; top: 0; justify-self: end; margin: -8px -8px -52px 0; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(36,23,15,.25); background: #f7eedb; font-size: 1.7rem; line-height: 1; z-index: 3; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.lavagna-grande { background: radial-gradient(ellipse at 30% 20%, #2a2f2d, var(--ardesia) 70%); border: 10px solid #6b4326; border-radius: 4px; padding: 22px 24px; text-align: center; box-shadow: 0 12px 22px rgba(0,0,0,.35), inset 0 0 26px rgba(0,0,0,.6); }
.lavagna-grande h2 { color: var(--gesso); font-style: normal; font-weight: 400; font-size: clamp(2.6rem, 9vw, 3.8rem); padding: 0; }
.lavagna-grande p { font-size: 1.4rem; color: var(--oro-chiaro); }
/* la lavagna che si scrive a gesso */
.scrivi { clip-path: inset(0 100% 0 0); }
.pannello.aperto .scrivi { animation: scrive 1.1s steps(22, end) .25s forwards; }
.pannello.aperto p.scrivi { animation-delay: 1.3s; animation-duration: 1.6s; animation-timing-function: steps(34, end); }
@keyframes scrive { to { clip-path: inset(0 0 0 0); } }
.piatto { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; padding: 6px 0; }
.piatto img { width: 132px; height: 132px; object-fit: cover; border-radius: 50%; box-shadow: 0 8px 14px rgba(0,0,0,.35); background: #cbb994; }
.piatto h4, .listino li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.piatto h4 { font-size: 1.16rem; font-weight: 600; line-height: 1.15; }
.piatto h4 b, .listino b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--verde); white-space: nowrap; }
.piatto p { font-size: .95rem; }
.listino { display: grid; gap: 8px; }
.listino li { border-bottom: 1px dotted rgba(36,23,15,.35); padding-bottom: 6px; }
.libro-scheda { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; }
.libro-scheda img { width: 100%; height: auto; border-radius: 2px 5px 5px 2px; box-shadow: 0 14px 22px rgba(0,0,0,.4); }
.libro-scheda .titolone { font-size: 2.3rem; font-weight: 700; line-height: 1; }
.libro-scheda .bottone { margin-top: 12px; }
.citazione { border-left: 4px solid var(--oro); padding: 4px 0 4px 18px; display: grid; gap: .7em; font-size: 1.08rem; font-style: italic; }
.citazione footer { font-style: normal; font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; opacity: .65; }

/* ---------- telefono ---------- */
@media (max-width: 820px) {
  .voci { position: fixed; inset: var(--barra-h) 0 auto 0; flex-direction: column; gap: 0; margin: 0; padding: 6px 0 14px; background: rgba(12,7,5,.97);
    transform: translateY(-130%); transition: transform .3s ease; box-shadow: 0 20px 40px rgba(0,0,0,.6); }
  .voci.aperte { transform: none; }
  .voci a { font-size: 1.15rem; padding: 12px 24px; border: 0; }
  .barra-menu { display: block; margin-left: 0; }
  .barra { gap: 8px; padding: 0 6px 0 12px; }
  .barra-gioca { margin-left: auto; padding: .55em .8em; font-size: .72rem; }
  .barra-menu { width: 40px; flex: none; }
  .marchio { font-size: .95rem; }
  .lucine { height: 74px; }
}
@media (max-width: 640px) {
  .tappa { grid-template-columns: [roba] minmax(0, 1fr) [corsia] 25%; padding: 10vh 4% 9vh; column-gap: 2%; min-height: max(104vh, 700px); }
  .tappa.sx { grid-template-columns: [corsia] 25% [roba] minmax(0, 1fr); }
  .carta { padding: 18px 18px 20px; font-size: .96rem; }
  .carta-gioca { max-width: 100%; justify-self: stretch; }
  .tappa > i.fermata { margin-top: calc(46vh - 70px); }
  .lancio { width: 300%; margin-right: -14%; }
  .ogg-cartello { width: 124%; margin-left: -6%; }
  .carta-benvenuto { margin-left: 0; }
  .ogg-sottobicchiere { width: 104%; }
  .ogg-sottobicchiere figcaption { font-size: 1.2rem; max-width: 120px; width: auto; }
  .ogg-cassaforte { width: 82%; margin-right: 0; }
  .ogg-lanterna { width: 34%; }
  .ogg-chiavi { width: 82%; margin-right: -6%; }
  .ogg-lavagnetta { width: 104%; margin-left: -2%; }
  .carta-menu { margin-left: 0; }
  .v-live { margin-right: 0; }
  .v-water { margin: -6px 36% 0 0; width: 64%; }
  .v-partita { width: 60%; margin-top: -30px; }
  .ogg-sirena { width: 150% !important; margin-left: -114% !important; }
  .libro { width: 78%; margin-right: 4%; }
  .libro:hover .libro-copertina { transform: none; }
  .libro.aperto .libro-copertina { transform: rotateY(-64deg); }
  .carta-sirena { margin-top: 96px; }
  .ardesia { font-size: 1.22rem; padding: 12px 14px; border-width: 7px; }
  .pannello { top: auto; left: 0; width: 100vw; max-height: 90dvh; border-radius: 18px 18px 0 0; animation-name: sale; box-shadow: 0 -20px 50px rgba(0,0,0,.6); }
  .piatto { grid-template-columns: 92px 1fr; gap: 12px; }
  .piatto img { width: 92px; height: 92px; }
  .libro-scheda { grid-template-columns: 110px 1fr; }
  .pinta span { display: none; }
}
@keyframes sale { from { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  .lucine .lampada, .piano::after, .ogg-lanterna::after, .ogg-sottobicchiere figcaption, .targa-gioca.pronta { animation: none; }
  .scrivi { clip-path: none; }
  .pannello.aperto .scrivi { animation: none; }
  .lampo.acceso { animation: none; opacity: .5; }
}

/* solo per le foto di controllo (?foto=1) */
.foto *, .foto *::before, .foto *::after { transition: none !important; animation-delay: 0s !important; animation-duration: 1ms !important; }
