/* Marmo, la guida della demo: ancorato in basso a destra. */
.marmo { position: fixed; right: 16px; bottom: 8px; z-index: 2147483000; display: flex; align-items: flex-end; gap: 6px;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif; pointer-events: none; }
.marmo > * { pointer-events: auto; }
.marmo-pg { width: 116px; height: 136px; cursor: pointer; flex: none; transform: translateY(140px); transition: transform .7s cubic-bezier(.2, 1.4, .4, 1); }
.marmo.is-in .marmo-pg { transform: translateY(0); }
.marmo.is-small .marmo-pg { transform: translateY(58px) scale(.8); transform-origin: bottom center; }
.marmo-pg svg { width: 100%; height: 100%; overflow: visible; display: block; }
.marmo-pg { position: relative; }
.marmo-3d { position: absolute; inset: -30px -20px 0 -20px; }
.marmo-3d canvas { width: 100% !important; height: 100% !important; display: block; }
.marmo.is-3d .marmo-pg svg { visibility: hidden; }
.marmo.is-3d .marmo-pg { width: 170px; height: 200px; }
@media (max-width: 560px) { .marmo.is-3d .marmo-pg { width: 110px; height: 135px; } }

/* animazioni del personaggio */
.marmo-body { animation: marmo-bob 2.6s ease-in-out infinite; transform-origin: 60px 130px; }
.marmo-eye { animation: marmo-blink 4.2s infinite; transform-box: fill-box; transform-origin: center; }
.marmo-arm-r { transform-box: fill-box; transform-origin: 20% 10%; }
.marmo.is-wave .marmo-arm-r { animation: marmo-wave .5s ease-in-out 4 alternate; }
.marmo-ball { animation: marmo-dribble 1.3s cubic-bezier(.5, 0, .5, 1) infinite; transform-box: fill-box; transform-origin: center; }
.marmo.is-talk .marmo-mouth { animation: marmo-talk .22s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: top center; }
.marmo-tail { animation: marmo-tail 3s ease-in-out infinite; transform-box: fill-box; transform-origin: 0% 100%; }
@keyframes marmo-bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-3px) } }
@keyframes marmo-blink { 0%, 92%, 100% { transform: scaleY(1) } 95% { transform: scaleY(.1) } }
@keyframes marmo-wave { from { transform: rotate(0) } to { transform: rotate(-38deg) } }
@keyframes marmo-dribble { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(22px) scaleY(.92) } }
@keyframes marmo-talk { from { transform: scaleY(1) } to { transform: scaleY(1.9) } }
@keyframes marmo-tail { 0%, 100% { transform: rotate(0) } 50% { transform: rotate(12deg) } }

/* fumetto */
.marmo-bubble { position: relative; margin-bottom: 96px; width: min(320px, calc(100vw - 150px)); background: #fff; color: #14202e;
  border-radius: 16px 16px 4px 16px; padding: 14px 16px 12px; box-shadow: 0 12px 34px rgba(10, 20, 35, .28), 0 0 0 1px rgba(10, 20, 35, .06);
  font-size: 15px; line-height: 1.45; opacity: 0; transform: translateY(10px) scale(.96); transform-origin: bottom right;
  transition: opacity .25s, transform .25s; }
.marmo.is-open .marmo-bubble { opacity: 1; transform: none; }
.marmo:not(.is-open) .marmo-bubble { pointer-events: none; }
.marmo-bubble:after { content: ""; position: absolute; right: -9px; bottom: 14px; border: 10px solid transparent; border-left-color: #fff; border-right: 0; }
.marmo-bubble b { color: #0a2540; }
.marmo-name { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #e8590c; margin-bottom: 2px; }
.marmo-text p { margin: 0 0 6px; }
.marmo-text code { background: #f1f4f8; border-radius: 5px; padding: 1px 5px; font-size: 13px; user-select: all; }
.marmo-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.marmo-acts button, .marmo-acts a { font: inherit; font-size: 14px; font-weight: 700; border-radius: 999px; padding: 7px 13px; cursor: pointer;
  border: 2px solid #0a2540; background: #fff; color: #0a2540; text-decoration: none; line-height: 1.1; }
.marmo-acts .is-main { background: #e8590c; border-color: #e8590c; color: #fff; }
.marmo-acts button:hover, .marmo-acts a:hover { transform: translateY(-1px); }
.marmo-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 18px; line-height: 1; color: #8a96a6; cursor: pointer; padding: 4px; }
.marmo-steps { display: flex; gap: 4px; margin-top: 10px; }
.marmo-steps i { width: 7px; height: 7px; border-radius: 50%; background: #d5dce6; }
.marmo-steps i.on { background: #e8590c; }

/* evidenzia l'elemento di cui Marmo sta parlando */
.marmo-spot { outline: 3px solid #e8590c !important; outline-offset: 4px; border-radius: 6px; animation: marmo-pulse 1.4s ease-in-out infinite; }
@keyframes marmo-pulse { 0%, 100% { outline-color: #e8590c } 50% { outline-color: rgba(232, 89, 12, .25) } }

@media (max-width: 560px) {
  .marmo { right: 6px; }
  .marmo-pg { width: 84px; height: 100px; }
  .marmo-bubble { margin-bottom: 70px; font-size: 14px; width: calc(100vw - 104px); }
}
@media (prefers-reduced-motion: reduce) {
  .marmo-body, .marmo-eye, .marmo-ball, .marmo-tail, .marmo.is-wave .marmo-arm-r, .marmo.is-talk .marmo-mouth, .marmo-spot { animation: none; }
  .marmo-pg, .marmo-bubble { transition: none; }
}
@media print { .marmo { display: none; } }

/* ---- barra «demo» sopra l'intestazione, con i tasti a cartone animato ---- */
.demo-bar { background: repeating-linear-gradient(-45deg, #ffd23f 0 14px, #ffc61a 14px 28px); border-bottom: 3px solid #1a1a1a; position: relative; z-index: 50; }
.demo-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 7px; padding-bottom: 9px; }
.demo-bar-txt { font: 700 15px/1.2 "Source Sans 3", "Segoe UI", system-ui, sans-serif; color: #1a1a1a; min-width: 0; }
.demo-bar-txt b { font-family: "Bebas Neue", Impact, sans-serif; font-size: 22px; letter-spacing: .06em; background: #1a1a1a; color: #ffd23f; padding: 1px 8px 0; border-radius: 6px; margin-right: 4px; display: inline-block; transform: rotate(-3deg); }
.demo-bar-btns { display: flex; gap: 10px; flex: none; }
.demo-btn { font: 800 16px/1 "Source Sans 3", "Segoe UI", system-ui, sans-serif; text-decoration: none; color: #1a1a1a; background: #fff;
  border: 3px solid #1a1a1a; border-radius: 14px; padding: 8px 14px 9px; box-shadow: 4px 4px 0 #1a1a1a; display: inline-flex; align-items: center; gap: 6px;
  transition: transform .12s, box-shadow .12s; white-space: nowrap; }
.demo-btn-prezzi { background: #ff7a1a; color: #fff; text-shadow: 1px 1px 0 #1a1a1a; transform: rotate(-2deg); }
.demo-btn-gest { background: #39c0ff; color: #fff; text-shadow: 1px 1px 0 #1a1a1a; transform: rotate(1.5deg); }
.demo-btn-tut { background: #ef4444; color: #fff; text-shadow: 1px 1px 0 #1a1a1a; transform: rotate(-1deg); }
@media (max-width: 640px) { .demo-btn-tut { display: none; } }
.demo-btn:hover { transform: translate(-2px, -2px) rotate(0); box-shadow: 6px 6px 0 #1a1a1a; }
.demo-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #1a1a1a; }
@media (prefers-reduced-motion: no-preference) { .demo-btn-prezzi { animation: demo-wiggle 4s ease-in-out infinite; } }
@keyframes demo-wiggle { 0%, 88%, 100% { transform: rotate(-2deg) } 91% { transform: rotate(4deg) scale(1.06) } 94% { transform: rotate(-5deg) scale(1.06) } 97% { transform: rotate(2deg) } }
@media (max-width: 640px) {
  .demo-bar-txt span { display: none; }
  .demo-btn { font-size: 14px; padding: 7px 10px 8px; box-shadow: 3px 3px 0 #1a1a1a; border-width: 2.5px; }
  .demo-bar-btns { gap: 8px; }
}
@media (max-width: 360px) { .demo-bar-txt { display: none; } .demo-bar-in { justify-content: center; } }

/* ---- pagina Gestionale ---- */
.gest-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1100px) { .gest-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gest-grid { grid-template-columns: 1fr; } }
.gest-card { background: #fff; border-radius: 16px; padding: 22px 20px; box-shadow: 0 6px 22px rgba(10, 30, 60, .08); border: 1px solid rgba(10, 30, 60, .06); }
.gest-card { display: flex; flex-direction: column; }
.gest-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.05rem; line-height: 1.25; min-height: 44px; }
.gest-title .gest-ic { flex: none; width: 44px; height: 44px; font-size: 24px; border-radius: 12px; }
.gest-card p { margin: 0; color: #4a5566; line-height: 1.5; }
.gest-ic { font-size: 30px; display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 14px; background: #fff3e6; }
.gest-soon { text-align: center; margin-top: 22px; }
/* titoli dei temi (Segreteria, Squadre e partite…) sopra ogni griglia di funzioni */
.gest-theme { margin: 46px 0 18px; }
.gest-theme:first-child { margin-top: 0; }
/* Schermata del pannello in una cornice da telefono, in cima a ogni scheda */
.gest-phone { margin: 0 auto 16px; max-width: 220px; padding: 8px; border-radius: 30px; background: #0f1724; box-shadow: 0 14px 30px rgba(10, 30, 60, .22); }
.gest-phone img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 844; border-radius: 22px; background: #f2f2f7; }
.gest-phone { position: relative; }
/* più schermate per funzione: scorrono di lato dentro la cornice, una alla volta */
.gest-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 22px; }
.gest-strip::-webkit-scrollbar { display: none; }
.gest-shot { flex: 0 0 100%; scroll-snap-align: center; cursor: zoom-in; }
.gest-dots { position: absolute; left: 0; right: 0; bottom: -18px; display: flex; justify-content: center; gap: 6px; }
.gest-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #c9d1dc; cursor: pointer; transition: background .2s, transform .2s; }
.gest-dots button.on { background: #0f1724; transform: scale(1.25); }
.gest-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(15, 23, 36, .82); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); display: flex; align-items: center; justify-content: center; padding: 0 0 3px; }
.gest-nav.prev { left: -14px; } .gest-nav.next { right: -14px; }
.gest-nav:disabled { opacity: 0; pointer-events: none; }
.gest-phone:has(.gest-dots) { margin-bottom: 34px; }
.gest-more { margin-top: 8px !important; font-size: .85rem; color: #6b7785 !important; }
/* foto grande: si sfogliano tutte le schermate della pagina */
.lb { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 12, 20, .92); display: grid; grid-template-rows: 1fr auto; align-items: center; justify-items: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); touch-action: pan-y; }
.lb[hidden] { display: none; }
.lb img { max-width: min(92vw, 520px); max-height: calc(100vh - 120px); width: auto; height: auto; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lb-cap { color: #fff; text-align: center; font-size: .95rem; padding-top: 12px; max-width: 520px; }
.lb-cap small { display: block; opacity: .65; margin-top: 2px; }
.lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.lb button:hover { background: rgba(255, 255, 255, .26); }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 16px; top: 16px; }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: 70px; transform: none; } }

/* telefono: il fumetto sta sopra Marmo, a tutta larghezza (Marmo resta in basso a destra) */
@media (max-width: 560px) {
  .marmo { left: 8px; right: 8px; justify-content: flex-end; }
  .marmo-bubble { position: absolute; left: 0; right: 0; bottom: 128px; width: auto; margin: 0; border-radius: 16px; }
  .marmo-bubble:after { right: 46px; bottom: -9px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
  .marmo.is-3d .marmo-bubble { bottom: 132px; }
  .marmo-acts button, .marmo-acts a { font-size: 13px; padding: 7px 11px; }
}

/* Prezzi: posti fondatori rimasti e contatti diretti */
.founders-badge { display: inline-block; margin: 0 0 12px; padding: 6px 14px; border-radius: 999px; background: var(--red, #ed413d); color: #fff; font-weight: 700; font-size: .95rem; }
.founders-badge b { font-size: 1.15rem; }
.founders-contact { display: flex; flex-wrap: wrap; gap: 8px; }
.prose mark { background: #fff3bf; padding: 0 3px; border-radius: 3px; }

/* ---- tasti dei temi nella testata della home (solo demo, assets/temi.js) ---- */
.demo-skins { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 18px; padding: 8px 10px 10px; width: fit-content; max-width: 100%; box-sizing: border-box;
  background: repeating-linear-gradient(-45deg, #ffd23f 0 14px, #ffc61a 14px 28px); border: 3px solid #1a1a1a; border-radius: 16px; box-shadow: 5px 5px 0 #1a1a1a;
  position: relative; z-index: 5; grid-column: 1 / -1; transform: rotate(-.6deg); }
.demo-skins[hidden] { display: none; }
.demo-skins-lbl { font: 800 15px/1 "Source Sans 3", "Segoe UI", system-ui, sans-serif; color: #1a1a1a; white-space: nowrap; }
.demo-skins-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-skin-btn { font: 800 14px/1 "Source Sans 3", "Segoe UI", system-ui, sans-serif; color: #1a1a1a; background: #fff; cursor: pointer;
  border: 2.5px solid #1a1a1a; border-radius: 12px; padding: 7px 12px 8px; box-shadow: 3px 3px 0 #1a1a1a; transition: transform .12s, box-shadow .12s; }
.demo-skin-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #1a1a1a; }
.demo-skin-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #1a1a1a; }
.demo-skin-btn[aria-pressed="true"] { background: #1a1a1a; color: #ffd23f; transform: translate(2px, 2px); box-shadow: 1px 1px 0 #1a1a1a; cursor: default; }
.demo-skin-btn:focus-visible { outline: 3px solid #39c0ff; outline-offset: 2px; }
.demo-skins.busy { cursor: progress; }
.demo-skins.busy .demo-skin-btn { pointer-events: none; opacity: .7; }
@media (max-width: 640px) { .demo-skins { transform: none; } .demo-skin-btn { font-size: 13px; padding: 6px 9px 7px; } }

/* le schede sono bianche anche col sito in «maglia trasferta», che fa bianchi i titoli delle sezioni */
:root .section .gest-card h3 { color: #0b1150; }

/* Pagina Tutorial: un player grande («la tv») e sotto le puntate, cliccabili */
/* la tv esce dal contenitore della pagina: larga quanto lo schermo, ma mai più alta della finestra.
   Più è grande, più YouTube sceglie da solo una qualità alta (la qualità non si può imporre dal 2019) */
.tut-tv { width: min(100vw - 32px, (100vh - 150px) * 16 / 9); position: relative; left: 50%; transform: translateX(-50%); margin: 0 0 36px; }
.tut-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000 center / cover no-repeat;
  border: 6px solid #1a1a1a; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); display: grid; place-items: center; }
.tut-screen:not(.playing)::before { content: ""; position: absolute; inset: 0; background: rgba(5, 10, 20, .35); }
.tut-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tut-play { position: relative; width: 86px; height: 86px; border-radius: 50%; border: 0; background: #ef4444; color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); transition: transform .15s; }
.tut-play:hover { transform: scale(1.08); }
.tut-play svg { width: 38px; height: 38px; margin-left: 5px; }
.tut-now { margin: 14px 4px 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 1.15rem; }
.tut-now-guide { font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #ef4444; }
.tut-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .tut-lists { grid-template-columns: 1fr; } }
.tut-guide { margin: 0 0 4px; }
.tut-intro { margin: 0 0 14px; }
.tut-eps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tut-ep { width: 100%; display: flex; gap: 14px; align-items: center; text-align: left; cursor: pointer; padding: 10px; border-radius: 14px;
  background: #fff; color: #0b1150; border: 2px solid transparent; box-shadow: 0 4px 16px rgba(10, 30, 60, .1); font: inherit; transition: border-color .15s, transform .15s; }
.tut-ep:hover { transform: translateY(-2px); border-color: rgba(239, 68, 68, .45); }
.tut-ep.on { border-color: #ef4444; }
.tut-thumb { flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 10px; background: #0b1150 center / cover no-repeat; }
.tut-ep-txt { display: grid; gap: 3px; min-width: 0; }
.tut-ep-txt b { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; }
.tut-ep-desc { color: #4a5566; font-size: .9rem; line-height: 1.4; }
.tut-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #ef4444; color: #fff; display: grid; place-items: center; font-size: 14px; }
.tut-len { color: #8a94a6; font-size: .82rem; }
@media (max-width: 520px) { .tut-thumb { width: 96px; } .tut-ep-desc { display: none; } .tut-play { width: 68px; height: 68px; } }
