/* Slide generate: canvas fisso 1920x1080, scalato dal contenitore .stage */
.s {
  --red: #d12031;
  --red-dark: #c00000;
  --gray: #c8c8c8;
  position: relative;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: #fff;
  color: #111;
  font-family: Arial, "Liberation Sans", Helvetica, sans-serif;
}
.s *, .s *::before, .s *::after { box-sizing: border-box; }
.s img { display: block; }
.s h1, .s p, .s figure { margin: 0; }

/* cornice comune */
.s-logo { position: absolute; left: 36px; bottom: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.s-logo img { height: 54px; }
.s-logo span { background: var(--red); color: #fff; font-size: 14px; font-weight: 700; padding: 3px 10px; border-radius: 4px; letter-spacing: .5px; }
.s-corner, .s-corner2 { position: absolute; width: 170px; height: 170px; border-radius: 42px; }
.s-corner2 { right: -18px; bottom: -18px; background: #e4e4e4; }
.s-corner { right: -52px; bottom: -52px; background: var(--red); }

/* barra rossa in alto con ombra grigia */
.s-topbar { position: absolute; left: 0; top: 34px; width: 1000px; height: 54px; background: var(--red); border-radius: 0 27px 27px 0; }
.s-topbar::after { content: ""; position: absolute; left: 0; top: 64px; width: 940px; height: 14px; background: #dcdcdc; border-radius: 0 7px 7px 0; }
.s-sixty { position: absolute; left: 1016px; top: 8px; display: flex; align-items: center; gap: 24px; }
.s-sixty img { height: 118px; }
.s-sixty span { color: var(--red); font-weight: 700; font-size: 36px; line-height: 1.08; }

/* scheda membro / ospite */
.s-card .s-photo { position: absolute; left: 250px; top: 190px; width: 640px; height: 720px; display: flex; align-items: center; justify-content: center; }
.s-card .s-photo img { max-width: 100%; max-height: 100%; box-shadow: 0 14px 40px rgba(0, 0, 0, .2); border-radius: 6px; }
.s-initials { width: 440px; height: 440px; border-radius: 50%; background: var(--red); color: #fff; font-size: 180px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.s-card-text { position: absolute; left: 960px; right: 110px; top: 170px; bottom: 170px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.s-name { color: var(--red-dark); font-weight: 700; font-size: 78px; line-height: 1.1; }
.s-rule { width: 80%; height: 5px; background: var(--red); margin: 20px 0 26px; flex: none; }
.s-prof { font-style: italic; font-size: 64px; line-height: 1.2; }
.s-sub { margin-top: 44px; font-size: 40px; color: #555; }
.s-kicker { font-size: 40px; text-transform: uppercase; letter-spacing: 6px; color: #777; margin-bottom: 14px; }

/* slide titolo di sezione */
.s-title-block { position: absolute; left: 0; top: 150px; bottom: 190px; max-width: 1560px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 44px; }
.s-title.has-side .s-title-block { max-width: 1160px; }
.s-title-bar { background: var(--red); border-radius: 0 100px 100px 0; padding: 36px 110px 40px 130px; box-shadow: 0 18px 0 -4px #dcdcdc; }
.s-title h1 { color: #fff; font-size: 108px; font-weight: 800; line-height: 1.04; }
.s-title-sub { padding-left: 130px; font-size: 54px; line-height: 1.25; color: #444; }
.s-title-sixty { position: absolute; right: 170px; top: 50%; height: 400px; margin-top: -250px; }
.s-people { position: absolute; right: 90px; top: 150px; bottom: 190px; width: 640px; display: flex; flex-direction: column; justify-content: center; gap: 36px; }
.s-people figure { display: flex; align-items: center; gap: 30px; }
.s-people figcaption { display: flex; flex-direction: column; font-size: 34px; color: #444; }
.s-people figcaption b { color: var(--red-dark); font-size: 42px; }

.s-ring { flex: none; width: 300px; height: 300px; border-radius: 50%; border: 12px solid var(--red); overflow: hidden; background: #f1f1f1; display: flex; align-items: center; justify-content: center; }
.s-ring.big { width: 520px; height: 520px; border-width: 16px; }
.s-ring img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.s-ring span { font-size: 130px; font-weight: 700; color: var(--red); }
.s-ring.big span { font-size: 200px; }

/* intestazione per report, premi, tabelle */
.s-headbar { position: absolute; left: 0; top: 60px; display: flex; flex-direction: column; align-items: flex-start; }
.s-headbar h1 { background: var(--red); color: #fff; font-size: 74px; font-weight: 800; padding: 18px 100px 22px 110px; border-radius: 0 64px 64px 0; }
.s-headbar span { margin: 22px 0 0 110px; font-size: 44px; color: #555; }

/* numeri */
.s-kpis { position: absolute; left: 110px; right: 110px; top: 330px; bottom: 190px; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 36px; }
.s-kpi { border: 3px solid #eee; border-radius: 28px; box-shadow: 0 10px 30px rgba(0, 0, 0, .07); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.s-kpi b { color: var(--red); font-size: 104px; line-height: 1; }
.s-kpi span { margin-top: 16px; font-size: 38px; color: #555; text-transform: uppercase; letter-spacing: 2px; }
.s-kpis.single { grid-template-columns: 1fr; }
.s-kpis.single .s-kpi { border: 0; box-shadow: none; }
.s-kpis.single .s-kpi b { font-size: 260px; }
.s-kpis.single .s-kpi span { font-size: 56px; }

/* membro in evidenza */
.s-spot-body { position: absolute; left: 180px; right: 160px; top: 290px; bottom: 170px; display: flex; align-items: center; gap: 90px; }
.s-spot-text { display: flex; flex-direction: column; gap: 10px; }
.s-spot-text .s-name { font-size: 86px; }
.s-caption { margin-top: 30px; font-size: 52px; color: #333; font-weight: 700; text-transform: uppercase; letter-spacing: 3px; }
.s-value { font-size: 200px; font-weight: 800; color: var(--red); line-height: 1; }

/* tabella */
/* ampia: tutta la larghezza, 7 righe (termina sopra logo e angolo) */
.s-table table { position: absolute; left: 110px; right: 110px; top: 300px; width: calc(100% - 220px); border-collapse: collapse; font-size: 38px; }
.s-table th { text-align: left; color: var(--red); border-bottom: 5px solid var(--red); padding: 10px 24px; font-size: 32px; text-transform: uppercase; letter-spacing: 2px; }
.s-table td { padding: 12px 24px; border-bottom: 2px solid #e6e6e6; }
.s-table tr:nth-child(even) td { background: #f8f8f8; }
/* compatta: stretta e centrata (lontana da logo e angolo), 10 righe, ultima colonna a destra */
.s-table.compact table { left: 50%; right: auto; width: 1180px; transform: translateX(-50%); top: 280px; font-size: 36px; }
.s-table.compact th { padding: 8px 28px; font-size: 28px; }
.s-table.compact td { padding: 9px 28px; }
.s-table.compact th:last-child, .s-table.compact td:last-child { text-align: right; white-space: nowrap; }
.s-table.compact td:last-child { color: var(--red-dark); font-weight: 700; }

/* professioni desiderate: categorie in colonne (riga = 53px, 11 righe per colonna, vedi WANTED_* in deck.py);
   "wide" = una sola categoria con la sua slide, professioni su tre colonne */
.s-wanted-cols { position: absolute; left: 110px; right: 110px; top: 325px; bottom: 170px; display: flex; justify-content: center; gap: 70px; }
.s-wanted-col { width: 500px; display: flex; flex-direction: column; gap: 53px; }
.s-wanted h2 { margin: 0 0 12px; padding-bottom: 6px; border-bottom: 5px solid var(--red); color: var(--red); font-size: 40px; line-height: 1.2; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; }
.s-wanted h2 small { font-size: 28px; font-weight: 400; color: #777; text-transform: none; letter-spacing: 0; }
.s-wanted ul { margin: 0; padding: 0; list-style: none; font-size: 38px; line-height: 53px; }
.s-wanted li { position: relative; padding-left: 36px; break-inside: avoid; }
.s-wanted li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); }
.s-wanted.wide .s-wanted-col { width: 100%; }
.s-wanted.wide ul { columns: 3; column-gap: 70px; }

/* copertina */
.s-cover-logo { position: absolute; top: 110px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 40px; }
.s-cover-logo img { height: 230px; }
.s-cover-logo div { width: 520px; color: #808080; font-size: 56px; line-height: 1.02; letter-spacing: 12px; text-transform: uppercase; }
.s-cover-bar { position: absolute; top: 470px; left: 90px; right: 90px; height: 124px; background: var(--red); border-radius: 30px; color: #fff; font-size: 80px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 18px 22px 0 #dcdcdc; }
.s-cover-year { position: absolute; top: 640px; width: 100%; text-align: center; font-size: 210px; font-weight: 800; color: var(--gray); line-height: 1; }
.s-cover-date { position: absolute; top: 860px; width: 100%; text-align: center; font-size: 54px; font-weight: 700; color: #333; }
.s-cover-sub { position: absolute; top: 940px; width: 100%; text-align: center; font-size: 38px; color: #666; }

/* slide multimediali (foto/video caricati) */
.s-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }

/* team di gestione */
.s-team-grid { position: absolute; left: 110px; right: 110px; top: 240px; bottom: 160px; display: grid; grid-template-columns: repeat(3, 1fr);
  align-content: center; justify-items: center; gap: 34px 40px; }
.s-team.n1 .s-team-grid { grid-template-columns: 1fr; }
.s-team.n2 .s-team-grid, .s-team.n4 .s-team-grid { grid-template-columns: repeat(2, 1fr); }
.s-team figure { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.s-team figcaption { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.s-team figcaption b { color: var(--red-dark); font-size: 44px; line-height: 1.1; }
.s-pill { background: var(--red); color: #fff; font-size: 26px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: 6px 20px; border-radius: 999px; }
.s-team.n1 .s-ring { width: 440px; height: 440px; }
.s-team.n4 .s-ring, .s-team.n5 .s-ring, .s-team.n6 .s-ring { width: 210px; height: 210px; border-width: 10px; }
.s-team.n4 figure, .s-team.n5 figure, .s-team.n6 figure { gap: 10px; }
.s-team.n4 figcaption b, .s-team.n5 figcaption b, .s-team.n6 figcaption b { font-size: 36px; }
.s-team.n4 .s-pill, .s-team.n5 .s-pill, .s-team.n6 .s-pill { font-size: 22px; }
.s-team.n2 .s-ring, .s-team.n3 .s-ring { width: 360px; height: 360px; }
.s-team.n2 figcaption b, .s-team.n3 figcaption b { font-size: 50px; }
/* layout compatto: fino a 8 persone su due righe da 4 (chi ha due ruoli ha due etichette) */
.s-team.n7 .s-team-grid, .s-team.n8 .s-team-grid { left: 70px; right: 70px; top: 220px; bottom: 130px; grid-template-columns: repeat(4, 1fr); gap: 24px 24px; }
.s-team.n7 .s-ring, .s-team.n8 .s-ring { width: 190px; height: 190px; border-width: 9px; }
.s-team.n7 .s-ring span, .s-team.n8 .s-ring span { font-size: 80px; }
.s-team.n7 figure, .s-team.n8 figure { gap: 8px; }
.s-team.n7 figcaption, .s-team.n8 figcaption { gap: 6px; }
.s-team.n7 figcaption b, .s-team.n8 figcaption b { font-size: 32px; }
.s-team.n7 .s-pill, .s-team.n8 .s-pill { font-size: 18px; letter-spacing: .5px; padding: 4px 14px; }

/* frase su sfondo (testo a destra, come la slide originale) */
.s-quote { background: #111; }
.s-quote-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s-quote-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.7) 100%); }
.s-quote-text { position: absolute; left: 990px; right: 130px; top: 140px; bottom: 170px; margin: 0; display: flex; flex-direction: column;
  justify-content: center; color: #fff; font-size: 66px; line-height: 1.28; text-shadow: 0 3px 14px rgba(0,0,0,.6); }
.s-quote-text.long { font-size: 52px; }
.s-quote-text cite { display: block; margin-top: 40px; text-align: right; font-style: normal; font-size: 40px; opacity: .9; }

/* ringraziamento finale */
.s-thanks-logo { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); height: 200px; }
.s-thanks-bar { position: absolute; left: 0; right: 0; top: 420px; height: 260px; background: var(--red); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 22px 0 #dcdcdc; }
.s-thanks-bar h1 { color: #fff; font-size: 170px; font-weight: 800; letter-spacing: -2px; }
.s-thanks-sub { position: absolute; top: 760px; width: 100%; text-align: center; font-size: 56px; font-weight: 700; color: #444; text-transform: uppercase; letter-spacing: 6px; }

/* scheda 60 secondi di chi ha la presentazione approfondita: compare in ordine, ma parla più tardi */
.s-mic { width: 1em; height: 1em; flex: none; }
.s-deep-tag { position: absolute; left: 1016px; top: 14px; height: 106px; display: flex; align-items: center; gap: 20px; color: var(--red); }
.s-deep-tag .s-mic { font-size: 92px; }
.s-deep-tag span { font-weight: 700; font-size: 36px; line-height: 1.08; }
.s-card-deep .s-prof { font-size: 52px; }
.s-card-deep .s-name { font-size: 70px; }
.s-later { margin-top: 44px; background: var(--red); color: #fff; border-radius: 28px; padding: 26px 46px 30px; box-shadow: 0 16px 0 -4px #dcdcdc; }
.s-later-head { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 64px; font-weight: 800; line-height: 1.1; }
.s-later-head .s-mic { font-size: 62px; }
.s-later-sub { margin-top: 8px; font-size: 34px; opacity: .95; }
.s-later-sub b { display: block; margin-top: 6px; font-size: 38px; }
/* chi parla più tardi: foto in bianco e nero */
.s-card-deep .s-photo img { filter: grayscale(1) contrast(1.05); }
.s-card-deep .s-initials { background: #8a8a8a; }

/* estrazione door prize */
.s-draw .s-headbar span { color: #555; }
.s-wheel-wrap { position: absolute; left: 170px; top: 225px; width: 760px; height: 760px; }
.s-draw-idle { position: absolute; left: 1050px; right: 110px; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center;
  gap: 18px; font-size: 52px; color: #555; transition: opacity .3s; }
.s-draw-idle b { font-size: 120px; color: var(--red); }
.s-draw.has-result .s-draw-idle { opacity: 0; }
.s-wheel { width: 100%; height: 100%; filter: drop-shadow(0 18px 30px rgba(0,0,0,.25)); }
.s-wheel-pointer { position: absolute; right: -46px; top: 50%; margin-top: -42px; width: 0; height: 0;
  border-top: 42px solid transparent; border-bottom: 42px solid transparent; border-right: 86px solid #222; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.s-wheel-hub { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%;
  background: #fff; border: 10px solid var(--red); display: flex; align-items: center; justify-content: center; font-size: 74px; }
.s-draw-result { position: absolute; left: 1050px; right: 110px; top: 300px; bottom: 200px; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center; opacity: 0; transform: scale(.85); transition: opacity .4s, transform .5s cubic-bezier(.2,1.6,.4,1); }
.s-draw.has-result .s-draw-result { opacity: 1; transform: scale(1); }
.s-draw-kicker { font-size: 44px; color: #555; text-transform: uppercase; letter-spacing: 4px; }
.s-draw-name { margin-top: 20px; font-size: 96px; font-weight: 800; color: var(--red); line-height: 1.05; }
.s-draw-ok { margin-top: 36px; font-size: 38px; font-weight: 700; color: #1b7a2e; visibility: hidden; }
.s-draw.validated .s-draw-ok { visibility: visible; }
.s-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.s-confetti i { position: absolute; top: -40px; width: 18px; height: 30px; border-radius: 3px; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { top: 1120px; transform: rotate(720deg) translateX(120px); } }

/* raccolta entropia prima del giro */
.s-draw-proof { margin-top: 22px; font: 600 26px "DejaVu Sans Mono", "Liberation Mono", Consolas, monospace; color: #555; }
.s-entropy { position: absolute; left: 1030px; right: 90px; top: 210px; bottom: 170px; background: #0b0c0e; border-radius: 26px;
  padding: 30px 34px; display: flex; flex-direction: column; gap: 18px; opacity: 0; transform: scale(.96);
  transition: opacity .35s, transform .35s; box-shadow: 0 20px 50px rgba(0,0,0,.35); pointer-events: none; }
.s-draw.entropy-on .s-entropy { opacity: 1; transform: scale(1); }
.s-draw.entropy-on .s-draw-idle { opacity: 0; }
.s-entropy-head { display: flex; align-items: center; gap: 16px; color: #e8e8e8; font: 700 40px "DejaVu Sans Mono", "Liberation Mono", monospace; }
.s-entropy-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--red); animation: s-blink 0.6s steps(2) infinite; }
.s-entropy.locked .s-entropy-dot { animation: none; background: #3ecf6b; }
.s-entropy-grid { flex: 1; display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 1fr; gap: 6px;
  font: 600 30px "DejaVu Sans Mono", "Liberation Mono", monospace; }
.s-entropy-grid span { display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: background .12s, color .12s; }
.s-entropy-grid .e0 { background: #111316; color: #6b7178; }
.s-entropy-grid .e1 { background: #1d2024; color: #a7adb4; }
.s-entropy-grid .e2 { background: #2b2f35; color: #e2e5e8; }
.s-entropy-grid .e3 { background: #3a3f46; color: #ffffff; }
.s-entropy-grid .lock { background: #2a0d10; color: #ff6b78; }
.s-entropy-bar { height: 10px; background: #24272c; border-radius: 5px; overflow: hidden; }
.s-entropy-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8a8f96, var(--red)); }
.s-entropy-foot { color: #8a8f96; font: 22px "DejaVu Sans Mono", "Liberation Mono", monospace; }
@keyframes s-blink { 50% { opacity: .25; } }
