/* ===========================================================================
   L'ALBUM DI FAMIGLIA — edizione a cartoncini colorati.
   Ogni sezione è un foglio di cartoncino tinto a tutta pagina: giallo,
   turchese, corallo, viola, bianco. Le stampe fotografiche ci si montano
   sopra con gli angolini. Palette e caratteri sono quelli storici del
   marchio: cambia soltanto chi comanda la pagina.
   Una mossa decisa per sezione; tutto il resto tace perché quella si legga.
   =========================================================================== */

:root {
    --yellow: #FFD93D;
    --coral: #FF6B6B;
    --turq: #4ECDC4;
    --purple: #C77DFF;
    --green: #2DCE89;
    --green-deep: #24B374;
    --ink: #1A1A2E;
    --cream: #FFF9F0;
    --white: #FFFFFF;

    /* impostati da ogni foglio: il colore del cartoncino e l'angolino che
       ci si stacca sopra (sul foglio giallo l'angolino diventa inchiostro) */
    --sheet: var(--yellow);
    --corner-color: var(--ink);
    --soft: rgba(26, 26, 46, .72);   /* testo secondario: inchiostro velato,
                                        mai grigio, così tiene il colore del foglio */
    --rule: rgba(26, 26, 46, .22);

    --page: 1180px;
    --corner: 30px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--yellow);
    color: var(--ink);
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    line-height: 1.6;
}
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* --- Il foglio ------------------------------------------------------------
   Ogni sezione è un cartoncino appoggiato sul precedente: bordo netto,
   ombra corta sotto il taglio. La pila è la struttura della pagina. */
.leaf {
    background: var(--sheet);
    padding: clamp(64px, 11vh, 132px) 0;
    position: relative;
    /* grana appena percettibile del cartoncino */
    background-image: repeating-linear-gradient(0deg, rgba(26, 26, 46, .022) 0 1px, transparent 1px 3px);
}
.leaf::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 14px;
    background: linear-gradient(180deg, rgba(26, 26, 46, .16), transparent);
    pointer-events: none;
}
/* I titoli non sono neri: sono inchiostro schiarito verso il colore del
   proprio foglio, così ogni testata tiene la tinta del cartoncino su cui sta.
   Restano sopra 3,5:1, oltre la soglia del testo grande. */
.leaf-yellow { --sheet: var(--yellow); --corner-color: var(--ink); --title: #817035; }
.leaf-turq   { --sheet: var(--turq);   --title: #2F626B; }
/* corallo e viola sono i cartoncini più scuri: il testo secondario
   si stringe sull'inchiostro per restare sopra 4,5:1 */
.leaf-coral  { --sheet: var(--coral);  --title: #663542; --soft: rgba(26, 26, 46, .86); }
.leaf-purple { --sheet: var(--purple); --title: #523A72; --soft: rgba(26, 26, 46, .86); }
.leaf-white  { --sheet: var(--white);  --title: #663542; }

.page { max-width: var(--page); margin: 0 auto; padding: 0 clamp(18px, 5vw, 56px); position: relative; }

/* --- Testa di sezione ----------------------------------------------------- */
.leaf-no {
    display: inline-block;
    font-family: 'Fredoka One', cursive; font-size: 12px; letter-spacing: 2.4px;
    background: var(--ink); color: var(--cream);
    padding: 5px 12px; border-radius: 999px;
    margin-bottom: 18px;
}
.leaf-title {
    font-family: 'Fredoka One', cursive; font-weight: 400;
    font-size: clamp(2.2rem, 6vw, 4.6rem);
    line-height: 1.02; letter-spacing: -.01em;
    margin: 0 0 .6rem; max-width: 17ch;
    color: var(--title, var(--ink));
}
.leaf-lead { max-width: 58ch; font-size: 1.1rem; color: var(--soft); margin: 0 0 2.8rem; }

/* --- La stampa fotografica e i suoi angolini ------------------------------ */
.print {
    position: relative;
    background: var(--white);
    padding: 12px 12px 0;
    box-shadow: 0 10px 0 rgba(26, 26, 46, .1), 0 22px 40px rgba(26, 26, 46, .28);
    transform: rotate(var(--tilt, -1.4deg));
    transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.print:hover { transform: rotate(0deg) translateY(-5px); }
.print .frame {
    aspect-ratio: 4 / 3; background: #ECE7DC;
    display: grid; place-items: center; overflow: hidden; position: relative;
}
.print .frame img { width: 100%; height: 100%; object-fit: cover; }
.print .cap {
    font-weight: 800; font-size: 13.5px; color: #55503f;
    padding: 11px 4px 13px; text-align: center;
}
.print::before, .print::after,
.print .frame::before, .print .frame::after {
    content: ''; position: absolute; width: var(--corner); height: var(--corner);
    background: var(--corner-color, var(--yellow)); z-index: 3; pointer-events: none;
}
.print::before { top: -1px; left: -1px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.print::after { top: -1px; right: -1px; clip-path: polygon(100% 0, 100% 100%, 0 0); }
.print .frame::before { bottom: -1px; left: -1px; clip-path: polygon(0 0, 0 100%, 100% 100%); }
.print .frame::after { bottom: -1px; right: -1px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }

/* ===========================================================================
   1. COPERTINA — la mossa: il titolo a scala piena che scavalca le stampe.
   =========================================================================== */
.cover { padding-top: clamp(32px, 6vh, 64px); }
.brandline {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: 'Fredoka One', cursive; font-size: 1.05rem; color: var(--ink);
    text-decoration: none; margin-bottom: clamp(24px, 5vh, 52px);
}
.brandline img { width: 36px; height: 36px; border-radius: 9px; }
.brandline span { color: var(--coral); }
.cover-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(24px, 4vw, 40px); align-items: center; }
.cover h1 {
    font-family: 'Fredoka One', cursive; font-weight: 400;
    font-size: clamp(2.7rem, 7.4vw, 5.6rem);
    /* Interlinea: sotto 1 i blocchi di sfondo del <mark> si sovrappongono e
       la riga sotto copre le parole di quella sopra. 1.12 e' il minimo che
       tiene separati i blocchi anche quando il titolo va a capo. */
    line-height: 1.12; letter-spacing: -.015em;
    margin: 0 0 1.3rem;
    position: relative; z-index: 2;
    color: var(--title, var(--ink));
}
.cover h1 mark {
    background: var(--ink); color: var(--yellow);
    padding: .04em .18em .1em; border-radius: 8px;
    /* stacco fra le righe evidenziate, del colore del foglio */
    box-shadow: 0 0 0 4px var(--sheet);
    box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.cover .lead { font-size: 1.16rem; color: var(--soft); max-width: 44ch; margin: 0 0 2rem; }
@media (min-width: 980px) {
    .cover-col-a { position: relative; z-index: 2; }
    .cover h1 { width: 118%; }         /* il titolo scavalca la colonna delle stampe */
}

.mount { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mount .print:nth-child(1) { --tilt: -2.4deg; }
.mount .print:nth-child(2) { --tilt: 2deg; }
.mount .print:nth-child(3) { --tilt: 1.4deg; }
.mount .print:nth-child(4) { --tilt: -1.8deg; }

.slot .frame {
    background: repeating-linear-gradient(45deg, #E4DED1 0 11px, #DBD4C4 11px 22px);
    cursor: pointer; flex-direction: column; gap: 8px; text-align: center; padding: 14px;
}
.slot .frame .plus {
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--ink); color: var(--yellow);
    display: grid; place-items: center;
    font-family: 'Fredoka One', cursive; font-size: 26px; line-height: 1;
}
.slot .frame small { color: #4a4636; font-size: 12.5px; font-weight: 800; max-width: 21ch; }
.slot.dragover .frame { background: #D6CEBC; }
.slot input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.card-face { position: absolute; inset: 0; backface-visibility: hidden; }
.card-back { background: var(--ink); display: grid; place-items: center; }
.card-back .mark { font-family: 'Fredoka One', cursive; font-size: 30px; color: var(--yellow); }
.flipper { position: absolute; inset: 0; transition: transform .5s cubic-bezier(.22, 1, .36, 1); transform-style: preserve-3d; }
.print.flipped .flipper { transform: rotateY(180deg); }
.card-front { transform: rotateY(180deg); }
.print.matched .frame { box-shadow: inset 0 0 0 5px var(--green); }
.mount.is-game .print { cursor: pointer; }
.mount-note { margin-top: 16px; font-size: 13.5px; font-weight: 800; color: var(--soft); min-height: 20px; text-align: center; }
.mount-note b { color: var(--ink); }

/* --- Azioni --------------------------------------------------------------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
    display: inline-flex; align-items: center; gap: .55rem;
    font-family: 'Fredoka One', cursive; font-weight: 400; font-size: 1.06rem;
    text-decoration: none; cursor: pointer; border: 0;
    padding: 1rem 2.1rem; border-radius: 999px;
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s cubic-bezier(.22, 1, .36, 1);
}
/* Sul cartoncino colorato l'azione è inchiostro: massimo contrasto su ogni foglio */
.btn-go { background: var(--ink); color: var(--cream); box-shadow: 0 6px 0 rgba(26, 26, 46, .28); }
.btn-go:hover { transform: translateY(-4px); box-shadow: 0 12px 0 rgba(26, 26, 46, .24); }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2.5px var(--ink); }
.btn-quiet:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 2.5px var(--ink), 0 8px 0 rgba(26, 26, 46, .2); }
.btn:active { transform: translateY(0); }
.under-actions { font-size: 13.5px; color: var(--soft); margin-top: 14px; font-weight: 700; }

/* ===========================================================================
   2. I GIOCHI — la mossa: un vero spezzone di pellicola, con le perforazioni,
      che attraversa il foglio turchese da bordo a bordo.
   =========================================================================== */
.strip-wrap { margin: 0 calc(50% - 50vw); padding: 0 clamp(10px, 3vw, 40px); overflow: hidden; }
.strip {
    background: var(--ink);
    padding: 26px 18px;
    position: relative;
    transform: rotate(-1.1deg);
    box-shadow: 0 26px 50px rgba(26, 26, 46, .35);
}
/* le perforazioni: due nastri di fori sopra e sotto */
.strip::before, .strip::after {
    content: ''; position: absolute; left: 0; right: 0; height: 18px;
    background-image: radial-gradient(circle at 12px 50%, var(--sheet) 0 5.5px, transparent 6px);
    background-size: 30px 18px; background-repeat: repeat-x;
}
.strip::before { top: 4px; }
.strip::after { bottom: 4px; }
.contact { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(158px, 1fr); gap: 10px; overflow-x: auto; padding: 4px 0; scrollbar-width: thin; }
.frame-cell {
    position: relative; aspect-ratio: 1;
    background: #24243c;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 12px; overflow: hidden;
    color: var(--cream);
    transition: background .25s cubic-bezier(.22, 1, .36, 1);
}
.frame-cell:hover { background: #313152; }
.frame-cell .no { position: absolute; top: 9px; left: 11px; font-family: 'Fredoka One', cursive; font-size: 12px; color: var(--yellow); }
/* Il segno disegnato di ogni gioco: un solo tratto, uno spessore, nessuna
   emoji. Vive dentro il fotogramma come il soggetto di quello scatto. */
.frame-cell .ico {
    position: absolute; top: 50%; left: 50%;
    width: 54px; height: 54px;
    transform: translate(-50%, -64%);
    color: rgba(255, 249, 240, .82);
    transition: color .3s cubic-bezier(.22, 1, .36, 1), transform .3s cubic-bezier(.22, 1, .36, 1);
}
.frame-cell:hover .ico { color: var(--yellow); transform: translate(-50%, -68%) scale(1.06); }
.frame-cell.is-group .ico { color: rgba(255, 107, 107, .95); }
.frame-cell.is-group:hover .ico { color: var(--coral); }
.frame-cell.is-bonus .ico { color: var(--yellow); }
.frame-cell .who { font-family: 'Fredoka One', cursive; font-size: 1rem; line-height: 1.15; }
.frame-cell .kind { font-size: 11.5px; font-weight: 800; color: rgba(255, 249, 240, .72); margin-top: 4px; }
.frame-cell.is-group .kind { color: var(--coral); }
.frame-cell.is-bonus .kind { color: var(--yellow); }
.strip-legend i { font-style: normal; width: 12px; height: 12px; display: inline-block; margin-right: 8px; border-radius: 3px; box-shadow: 0 0 0 1.5px rgba(26,26,46,.35); }
.strip-legend { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 22px; font-size: 13px; font-weight: 800; color: var(--soft); }
.strip-hint { font-size: 12.5px; font-weight: 800; color: var(--soft); margin-top: 10px; }

/* ===========================================================================
   3. I PACCHETTI — la mossa: il prezzo alla scala del titolo.
   =========================================================================== */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; align-items: start; }
.pack {
    background: var(--white); color: #23201a;
    padding: 30px 26px 26px; position: relative;
    box-shadow: 0 10px 0 rgba(26, 26, 46, .12), 0 24px 44px rgba(26, 26, 46, .3);
    display: flex; flex-direction: column;
    transform: rotate(var(--tilt, -.8deg));
    transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.pack:nth-child(2) { --tilt: .9deg; }
.pack:hover { transform: rotate(0) translateY(-6px); }
.pack::before {
    content: ''; position: absolute; top: -1px; left: -1px;
    width: 38px; height: 38px; background: var(--ink);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}
.pack .tag {
    position: absolute; top: 16px; right: 16px;
    background: var(--coral); color: var(--white);
    font-size: 11px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase;
    padding: 6px 12px; border-radius: 999px;
}
.pack h3 { font-family: 'Fredoka One', cursive; font-weight: 400; font-size: 1.55rem; margin: 10px 0 6px; color: #1b1810; }
.pack .sub { font-size: .97rem; color: #574f3f; margin: 0 0 18px; font-weight: 700; }
.pack .inside { border-top: 2px dashed rgba(35, 32, 26, .2); padding-top: 15px; margin-bottom: 20px; }
.pack .inside h4 { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: #6a6151; margin: 0 0 10px; }
.pack .inside ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pack .inside li { font-size: 12px; font-weight: 800; background: #F0EADC; color: #37322a; padding: 5px 11px; border-radius: 999px; }
.pack .inside li.bonus { background: var(--yellow); }
.pack .cost {
    font-family: 'Fredoka One', cursive; font-size: clamp(3.4rem, 7vw, 4.6rem); line-height: .92;
    /* bruno caldo invece del nero: 8,9:1 sulla scheda bianca,
       resta il numero più leggibile della pagina */
    color: #5A4632; margin-top: auto; letter-spacing: -.02em;
}
.pack .cost small {
    display: block; font-family: 'Nunito', sans-serif; font-size: .8rem; font-weight: 800;
    color: #6a6151; margin-top: 8px; letter-spacing: 0;
}
.pack .btn { margin-top: 20px; justify-content: center; background: var(--green); color: #05271c; box-shadow: 0 6px 0 var(--green-deep); }
.pack .btn:hover { transform: translateY(-4px); box-shadow: 0 10px 0 var(--green-deep); }
.reassure { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }
.reassure span {
    font-size: .92rem; font-weight: 700; color: var(--ink);
    background: rgba(255, 255, 255, .55);
    padding: .55rem 1.1rem; border-radius: 999px;
}
.reassure b { font-weight: 900; }

/* ===========================================================================
   4. COME FUNZIONA — tre istantanee appese a un filo, come le foto stese
      ad asciugare in camera oscura. Il numero è timbrato sulla stampa.
   =========================================================================== */
.steps {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(26px, 3.6vw, 44px);
    position: relative; padding-top: 26px;
}
/* il filo che le tiene: passa dietro le stampe, non sotto il testo */
.steps::before {
    content: ''; position: absolute; top: 8px; left: 4%; right: 4%; height: 2px;
    background: repeating-linear-gradient(90deg, var(--ink) 0 9px, transparent 9px 17px);
    opacity: .45;
}
.step {
    background: var(--white);
    padding: 14px 14px 18px;
    position: relative;
    box-shadow: 0 8px 0 rgba(26, 26, 46, .12), 0 20px 36px rgba(26, 26, 46, .26);
    transform: rotate(var(--tilt, -1.6deg));
    transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.step:nth-child(2) { --tilt: 1.4deg; margin-top: 16px; }
.step:nth-child(3) { --tilt: -.8deg; }
.step:hover { transform: rotate(0) translateY(-6px); }
/* la molletta che appende la stampa al filo */
.step::before {
    content: ''; position: absolute; top: -16px; left: 50%; margin-left: -7px;
    width: 14px; height: 30px; border-radius: 4px;
    background: var(--yellow); box-shadow: inset 0 0 0 2px rgba(26, 26, 46, .55);
    z-index: 2;
}
.step .shot {
    aspect-ratio: 5 / 3; background: #F2EDE2;
    display: grid; place-items: center; position: relative; overflow: hidden;
}
.step .shot .n {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(3.6rem, 7vw, 5.2rem); line-height: 1;
    color: var(--sheet); opacity: .9;
}
.step .shot .ico { position: absolute; right: 12px; bottom: 10px; width: 34px; height: 34px; color: #B9AF9B; }
.step h4 { font-family: 'Fredoka One', cursive; font-weight: 400; font-size: 1.22rem; margin: 14px 0 .4rem; color: #241f17; }
.step p { color: #574f3f; font-size: .96rem; margin: 0; font-weight: 600; }

/* ===========================================================================
   5. DOMANDE — la mossa: il silenzio. Foglio bianco, filetti sottili,
      domande grandi. È la pagina che fa respirare tutte le altre.
   =========================================================================== */
.qa { max-width: 780px; }
.qa details { border-top: 1px solid var(--rule); padding: 22px 0; }
.qa details:last-child { border-bottom: 1px solid var(--rule); }
.qa summary {
    font-family: 'Fredoka One', cursive; font-weight: 400;
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    cursor: pointer; list-style: none; display: flex; gap: 16px; align-items: baseline;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before { content: '+'; color: var(--coral); font-size: 1.5rem; flex: none; line-height: 1; }
.qa details[open] summary::before { content: '–'; }
.qa p { color: var(--soft); margin: .8rem 0 0 32px; font-size: 1.02rem; max-width: 62ch; }

/* ===========================================================================
   6. CHIUSURA — bookend: l'album si chiude sul colore con cui si è aperto.
   =========================================================================== */
.close-leaf { text-align: center; }
.close-leaf .leaf-title { max-width: 15ch; margin-inline: auto; font-size: clamp(2.4rem, 7vw, 5rem); }
.close-leaf .leaf-lead { margin-inline: auto; text-align: center; }
.talk {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--ink); text-decoration: none;
    box-shadow: inset 0 0 0 2.5px var(--ink);
    padding: .9rem 1.6rem; border-radius: 999px; font-weight: 800; font-size: .98rem;
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s;
}
.talk:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 2.5px var(--ink), 0 8px 0 rgba(26, 26, 46, .2); }

footer { background: var(--ink); color: var(--cream); padding: 34px 0 44px; }
footer .page { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: space-between; }
footer a { color: rgba(255, 249, 240, .78); text-decoration: none; font-size: .9rem; font-weight: 800; }
footer a:hover { color: var(--yellow); }
footer .motto { color: rgba(255, 249, 240, .7); font-size: .88rem; }

/* --- Le linguette di sezione = la navigazione ----------------------------- */
.tabs { position: fixed; z-index: 40; right: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.tabs a {
    display: block; background: var(--ink); color: var(--cream); text-decoration: none;
    font-size: 11.5px; font-weight: 800; letter-spacing: .6px;
    padding: 13px 11px; border-radius: 10px 0 0 10px;
    box-shadow: -3px 4px 14px rgba(26, 26, 46, .3);
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), background .3s, color .3s;
    writing-mode: vertical-rl;
}
.tabs a:hover, .tabs a.on { transform: translateX(-8px); background: var(--tab); color: var(--ink); }
.tabs a:nth-child(1) { --tab: var(--turq); }
.tabs a:nth-child(2) { --tab: var(--coral); }
.tabs a:nth-child(3) { --tab: var(--purple); }
.tabs a:nth-child(4) { --tab: var(--white); }

/* --- Entrata: un solo momento autoriale, il montaggio delle stampe -------- */
@keyframes mountIn {
    from { opacity: 0; transform: rotate(var(--tilt, -1.4deg)) translateY(30px) scale(.93); }
    to   { opacity: 1; transform: rotate(var(--tilt, -1.4deg)) translateY(0) scale(1); }
}
.js .mount .print { opacity: 0; animation: mountIn .72s cubic-bezier(.16, 1, .3, 1) forwards; }
.js .mount .print:nth-child(1) { animation-delay: .10s; }
.js .mount .print:nth-child(2) { animation-delay: .22s; }
.js .mount .print:nth-child(3) { animation-delay: .34s; }
.js .mount .print:nth-child(4) { animation-delay: .46s; }

/* --- Adattamento ---------------------------------------------------------- */
@media (max-width: 980px) {
    .cover-grid { grid-template-columns: 1fr; gap: 34px; }
    .cover h1 { width: 100%; }
}
@media (max-width: 900px) {
    .tabs {
        top: auto; bottom: 0; right: 0; left: 0; transform: none;
        flex-direction: row; gap: 0;
        background: var(--ink);
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    }
    .tabs a {
        writing-mode: horizontal-tb; border-radius: 8px; box-shadow: none;
        padding: 11px 10px; flex: 1; text-align: center; font-size: 11px;
    }
    .tabs a:hover, .tabs a.on { transform: none; }
    body { padding-bottom: 60px; }
    .strip { transform: rotate(0); }
}
@media (max-width: 700px) {
    /* a una colonna il filo non appende più niente: sparisce */
    .steps::before { display: none; }
    .steps { padding-top: 8px; }
    .step:nth-child(2) { margin-top: 0; }
}
@media (max-width: 560px) {
    .mount { gap: 12px; }
    .print, .pack, .step { --tilt: 0deg !important; }
    .actions .btn { width: 100%; justify-content: center; }
    .leaf-title { font-size: clamp(1.9rem, 8vw, 2.6rem); }
    .step .n { -webkit-text-stroke-width: 2px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .mount .print { opacity: 1; animation: none; }
    .print, .pack, .btn, .frame-cell, .flipper, .tabs a, .talk { transition: none !important; }
}

/* ===========================================================================
   IL DORSO — navigazione del sito, sopra la copertina.
   Serve i link alle altre pagine e il selettore lingua: sono funzioni, non
   decorazione, e non possono vivere solo nelle linguette di sezione.
   =========================================================================== */
.spine { background: var(--ink); color: var(--cream); position: relative; z-index: 30; }
.spine-in {
    max-width: var(--page); margin: 0 auto;
    padding: 14px clamp(18px, 5vw, 56px);
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.spine-brand {
    font-family: 'Fredoka One', cursive; font-size: 1.4rem;
    color: var(--yellow); text-decoration: none; letter-spacing: .3px;
    display: inline-flex; align-items: center; gap: 9px; margin-right: auto;
}
.spine-brand span { color: var(--coral); }
.spine-brand img { width: 34px; height: 34px; border-radius: 9px; }
.spine-menu { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.spine-menu a {
    color: rgba(255, 249, 240, .84); text-decoration: none;
    font-weight: 800; font-size: .93rem;
    padding: .45rem .8rem; border-radius: 999px;
    transition: color .3s cubic-bezier(.22, 1, .36, 1), background .3s;
}
.spine-menu a:hover { color: var(--yellow); background: rgba(255, 249, 240, .08); }
.spine-toggle { display: none; background: transparent; border: 0; cursor: pointer; padding: 8px; }
.spine-toggle span { display: block; width: 24px; height: 2.5px; background: var(--cream); border-radius: 2px; margin: 5px 0; }

/* il selettore lingua montato da i18n.js vive qui dentro */
#langHost { display: inline-flex; margin-left: 6px; }
.lang-switch { display: inline-flex; border: 2px solid rgba(255, 249, 240, .4); border-radius: 999px; overflow: hidden; }
.lang-switch button {
    background: transparent; border: 0; color: rgba(255, 249, 240, .82);
    font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 11px;
    padding: 5px 9px; cursor: pointer; letter-spacing: .5px;
}
.lang-switch button.on { background: var(--yellow); color: var(--ink); }

/* l'ancora dei pacchetti è il bersaglio dell'upsell della demo */
#acquista { scroll-margin-top: 20px; }
#per-te, #dentro, #come-funziona, #domande { scroll-margin-top: 12px; }

/* il piè di pagina raccoglie gli stessi link, con le icone */
footer .page span:last-child { display: flex; flex-wrap: wrap; gap: 10px 18px; }

@media (max-width: 860px) {
    .spine-toggle { display: block; }
    .spine-menu {
        display: none; width: 100%; flex-direction: column; align-items: stretch;
        gap: 2px; padding-top: 10px; margin-top: 10px;
        border-top: 1px solid rgba(255, 249, 240, .16);
    }
    .spine-menu.open { display: flex; }
    .spine-menu a { padding: .7rem .6rem; font-size: 1rem; }
    #langHost { margin: 8px 0 0 6px; }
}

/* --- Gli slot riempiti e il bottone per rifare la partita ----------------- */
.slot.filled .frame { padding: 0; background: #ECE7DC; }
.slot.filled .frame img { width: 100%; height: 100%; object-fit: cover; }
.mount-note .again {
    display: inline-block; margin-left: 8px;
    background: transparent; color: var(--ink);
    border: 0; box-shadow: inset 0 0 0 2px rgba(26, 26, 46, .35);
    border-radius: 999px; padding: 5px 13px;
    font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 12.5px;
    cursor: pointer;
    transition: box-shadow .3s cubic-bezier(.22, 1, .36, 1), transform .3s cubic-bezier(.22, 1, .36, 1);
}
.mount-note .again:hover { box-shadow: inset 0 0 0 2px var(--ink); transform: translateY(-2px); }


/* --- Piè di pagina: chi siamo, dove scrivere, cosa c'è nel sito ---------- */
footer { background: var(--ink); color: var(--cream); padding: 44px 0 0; }
.foot-top {
    display: grid; gap: 32px 28px; padding-bottom: 34px;
    grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(130px, 1fr));
}
.foot-logo {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: 'Fredoka One', cursive; font-size: 1.25rem;
    color: var(--yellow); text-decoration: none;
}
.foot-logo span { color: var(--coral); }
.foot-logo img { width: 32px; height: 32px; border-radius: 8px; }
.foot-payoff { color: rgba(255, 249, 240, .72); font-size: .93rem; margin: 12px 0 14px; max-width: 42ch; line-height: 1.55; }
.foot-mail {
    display: inline-block; color: var(--yellow); font-weight: 800; font-size: 1rem;
    text-decoration: none; border-bottom: 2px solid rgba(255, 217, 61, .35);
}
.foot-mail:hover { border-bottom-color: var(--yellow); }
.foot-reply { color: rgba(255, 249, 240, .55); font-size: .84rem; margin: 8px 0 0; }
.foot-col { display: flex; flex-direction: column; gap: 9px; }
.foot-col h4 {
    margin: 0 0 4px; font-size: 11.5px; letter-spacing: .8px; text-transform: uppercase;
    color: rgba(255, 249, 240, .55); font-weight: 900;
}
.foot-col a { color: rgba(255, 249, 240, .84); text-decoration: none; font-size: .93rem; font-weight: 700; }
.foot-col a:hover { color: var(--yellow); }
.foot-bottom {
    display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: space-between;
    padding: 18px 0 26px; border-top: 1px solid rgba(255, 249, 240, .16);
    color: rgba(255, 249, 240, .6); font-size: .85rem; font-weight: 700;
}
.foot-legal:empty { display: none; }
@media (max-width: 820px) {
    .foot-top { grid-template-columns: 1fr 1fr; }
    .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .foot-top { grid-template-columns: 1fr; gap: 26px; }
    .foot-bottom { justify-content: flex-start; }
}
