/* Classica con delitto — stile dalle linee guida: Nero Teatro, Rosso Delitto, Avorio Carta, Oro Archivio, Seppia Spartiti.
   Playfair Display per i titoli, Lora per i testi da leggere, Inter per istruzioni e microtesti (scelti per la leggibilita').
   I colori si possono cambiare per scena (tema): qui ci sono i valori di base. */
:root {
  --bg: #161519;        /* nero teatro: fondo */
  --panel: #f7f1e7;     /* avorio carta: fogli */
  --ink: #161519;       /* inchiostro sui fogli */
  --text: #f7f1e7;      /* testo sul fondo scuro */
  --muted: #a99f92;     /* testo secondario sul fondo */
  --accent: #5d0c18;    /* rosso delitto */
  --accent2: #bc9b65;   /* oro archivio */
  --sepia: #d7c6ad;     /* seppia spartiti */
  --ink-soft: color-mix(in srgb, var(--ink) 62%, var(--panel));
  --ink-line: color-mix(in srgb, var(--sepia) 85%, var(--ink));
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --font-title: 'Lora', Georgia, 'Times New Roman', serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font: 'Inter', -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
  --spring: cubic-bezier(.2, 1.3, .4, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45;
  background:
    radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%),
    radial-gradient(90% 50% at 50% 110%, #000a, transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
/* righe di pentagramma appena accennate in alto */
body::before {
  content: ''; position: fixed; inset: 0 0 auto 0; height: 220px; pointer-events: none; z-index: 0; opacity: .08;
  background: repeating-linear-gradient(to bottom, transparent 0 13px, var(--accent2) 13px 14px) 0 40px / 100% 70px no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent);
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 .35em; line-height: 1.1; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.55rem; } h3 { font-size: 1.2rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.italic { font-family: var(--font-title); font-style: italic; }

#app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }

/* microtesti: Lato maiuscolo spaziato */
.eyebrow { font-family: var(--font); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent2); }
.card .eyebrow { color: var(--accent); }

/* ornamento: linea - rombo - linea */
.rule { display: flex; align-items: center; gap: 10px; color: var(--accent2); margin: 12px auto; max-width: 240px; }
.rule::before, .rule::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, transparent, currentColor); }
.rule::after { background: linear-gradient(to left, transparent, currentColor); }
.rule i { width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid currentColor; }

/* ---------- foglio d'archivio ---------- */
.card {
  position: relative; color: var(--ink); margin-bottom: 16px; padding: 22px 18px; border-radius: 4px;
  background:
    radial-gradient(140% 90% at 0% 0%, #fff8 0, transparent 45%),
    radial-gradient(120% 100% at 100% 100%, color-mix(in srgb, var(--sepia) 45%, transparent), transparent 60%),
    var(--panel);
  box-shadow: 0 1px 0 #fff6 inset, 0 18px 40px -18px #000c, 0 2px 6px #0006;
}
.card::before { content: ''; position: absolute; inset: 6px; border: 1px solid color-mix(in srgb, var(--accent2) 55%, transparent); border-radius: 2px; pointer-events: none; }
.card .muted { color: var(--ink-soft); }
.card > *:last-child { margin-bottom: 0; }

.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }

label { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 13px 14px; border-radius: 3px; color: var(--ink);
  background: color-mix(in srgb, #fff 55%, var(--panel)); border: 1px solid var(--ink-line);
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--ink) 35%, var(--panel)); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
#code { font-family: var(--font-title); font-size: 1.9rem; letter-spacing: .4em; text-align: center; text-transform: uppercase; padding: 8px 8px 8px calc(8px + .4em); }
#name { font-family: var(--font-title); font-size: 1.3rem; padding: 10px 14px; }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 20px; border-radius: 3px; cursor: pointer;
  font-family: var(--font); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent); background: transparent; color: inherit;
  transition: transform .25s var(--spring), background-color .2s, box-shadow .2s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--panel); box-shadow: 0 10px 22px -12px var(--accent); }
.btn.gold { background: var(--accent2); border-color: var(--accent2); color: var(--ink); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .64rem; letter-spacing: .12em; }
.btn:disabled { opacity: .4; cursor: default; box-shadow: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.linkbtn { display: block; background: none; border: 0; color: var(--muted); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; padding: 16px; cursor: pointer; width: 100%; }

/* ---------- home ---------- */
.hero { text-align: center; padding: 10px 0 6px; }
/* logo scontornato: niente riquadro, solo un'ombra morbida che lo stacca dal fondo */
.plate { margin: 8px 0 16px; position: relative; }
.plate img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 22px #000c); }
.plate::before { content: ''; position: absolute; inset: -12% -8%; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, #e9c98a 22%, transparent), transparent); z-index: -1; }
.plate { z-index: 0; isolation: isolate; }
.tagline { font-family: var(--font-title); font-style: italic; font-size: 1.35rem; margin: 2px 0 0; }

.scene-list { display: grid; gap: 10px; }
.scene-opt {
  width: 100%; text-align: left; padding: 14px 16px 14px 18px; border-radius: 3px; cursor: pointer; color: var(--ink);
  border: 1px solid var(--ink-line); background: color-mix(in srgb, #fff 45%, var(--panel)); transition: border-color .2s, box-shadow .2s;
}
.scene-opt b { display: block; font-family: var(--font-title); font-weight: 500; font-size: 1.25rem; line-height: 1.15; margin-bottom: 3px; }
.scene-opt span { display: block; font-size: .85rem; color: var(--ink-soft); }
.scene-opt.sel { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }

/* ---------- lobby ---------- */
.tablecode { font-family: var(--font-title); font-size: 3.4rem; line-height: 1; letter-spacing: .16em; padding-left: .28em; color: var(--accent); margin: 8px 0 0; }
.qr { background: #fff; padding: 8px; width: 176px; height: 176px; display: block; margin: 14px auto 10px; border: 1px solid var(--ink-line); }
.story { font-family: var(--font-title); font-size: 1.15rem; line-height: 1.5; }
.victim { border-top: 1px solid var(--ink-line); padding-top: 12px; font-size: .9rem; }
.cover { width: 100%; border-radius: 2px; margin-bottom: 14px; display: block; }
.players { list-style: none; padding: 0; margin: 0; counter-reset: p; }
.players li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--ink-line); counter-increment: p; }
.players li::before { content: counter(p, decimal-leading-zero); font-family: var(--font-title); color: var(--ink-soft); width: 22px; }
.players li:last-child { border-bottom: 0; }
.players .nm { font-family: var(--font-title); font-size: 1.2rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.off { opacity: .45; }
.tag { font-size: .58rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 4px 7px; border-radius: 2px; border: 1px solid var(--ink-line); color: var(--ink-soft); white-space: nowrap; }
.tag.turn { background: var(--accent); color: var(--panel); border-color: var(--accent); }
.tag.red { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.waiting { text-align: center; color: var(--muted); font-family: var(--font-title); font-style: italic; font-size: 1.2rem; margin: 6px 0 16px; }

/* ---------- partita ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5; margin: -16px -16px 16px; padding: 12px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--accent2) 30%, transparent);
}
.topbar .title { font-family: var(--font-title); font-size: 1.25rem; line-height: 1.1; }
.turnline { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 12px; border-radius: 3px; background: color-mix(in srgb, var(--text) 7%, transparent); transition: background .3s; }
.turnline.mine { background: var(--accent); }
.turnline .who { flex: 1; font-family: var(--font-title); font-size: 1.15rem; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: .06em; color: var(--accent2); }
.turnline.mine .timer { color: var(--panel); }
.timer.low { color: #ff9a8a; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .45; } }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center;
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid color-mix(in srgb, var(--accent2) 30%, transparent); padding-bottom: env(safe-area-inset-bottom);
}
.tabs button {
  flex: 1; max-width: 140px; background: none; border: 0; padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-size: .6rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); cursor: pointer; position: relative;
}
.tabs button svg { width: 22px; height: 22px; }
.tabs button.on { color: var(--accent2); }
.tabs button.on::before { content: ''; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px; background: var(--accent2); }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.act {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 124px; padding: 16px; text-align: left;
  border-radius: 4px; cursor: pointer; border: 0; color: var(--ink); background: var(--panel); box-shadow: 0 14px 30px -16px #000c;
  transition: transform .3s var(--spring);
}
.act:active:not(:disabled) { transform: scale(.96); }
.act::before { content: ''; position: absolute; inset: 5px; border: 1px solid color-mix(in srgb, var(--accent2) 50%, transparent); pointer-events: none; }
.act svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: auto; }
.act b { font-family: var(--font-title); font-weight: 500; font-size: 1.4rem; line-height: 1; }
.act span { font-size: .6rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.act.red { background: var(--accent); color: var(--panel); }
.act.red svg, .act.red span { color: color-mix(in srgb, var(--panel) 75%, transparent); }
.act:disabled { opacity: .45; cursor: default; }

.cat { margin-bottom: 18px; }
.cat h3 { display: flex; align-items: baseline; gap: 8px; font-size: 1.15rem; border-bottom: 1px solid var(--ink-line); padding-bottom: 6px; margin-bottom: 10px; }
.cat h3 small { margin-left: auto; font-family: var(--font); font-size: .58rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 2px; cursor: pointer; font-size: .95rem; color: var(--ink);
  border: 1px solid var(--ink-line); background: color-mix(in srgb, #fff 50%, var(--panel)); transition: transform .25s var(--spring), background .15s;
}
.chip:active { transform: scale(.95); }
.chip.sel { background: var(--accent); color: var(--panel); border-color: var(--accent); }
.chip.dim:not(.sel) { color: color-mix(in srgb, var(--ink) 40%, var(--panel)); text-decoration: line-through; text-decoration-color: var(--accent); }
.thumb { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

/* telecomando della partita a casa */
.remote { display: flex; gap: 8px; margin-top: 10px; }
.remote .btn { color: var(--text); }

/* conferma sempre visibile sopra la barra delle schede */
.dock { position: sticky; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 4; margin: 6px -10px -10px; padding: 12px 10px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--panel) 0%, transparent), var(--panel) 22px); }
.dock .btn:not(.primary) { background: var(--panel); }

/* taccuino come un registro */
.notes .item { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--ink-line); cursor: pointer; }
.notes .item:last-child { border-bottom: 0; }
.notes .item .n { flex: 1; min-width: 0; }
.notes .item .nm { font-family: var(--font-title); font-size: 1.15rem; }
.notes .item .why { display: block; font-size: .72rem; color: var(--ink-soft); margin-top: 1px; }
.notes .item.elim .nm { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; }
.mark { width: 30px; height: 30px; flex: none; border: 1px solid var(--ink-soft); border-radius: 2px; display: grid; place-items: center; font-family: var(--font-title); font-size: 1.35rem; line-height: 1; color: var(--accent); background: #fff6; }
.mark.v { border-radius: 50%; border: 2px solid var(--accent); }
.mark.q { color: #8a6a2e; }
.legend { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 0 0 14px; font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.legend b { font-family: var(--font-title); font-size: 1.15rem; color: var(--accent2); letter-spacing: 0; margin-right: 4px; }

/* carte indizio */
.hand { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pcard {
  position: relative; color: var(--ink); text-align: center; padding: 20px 14px 18px; min-height: 176px; border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(120% 80% at 50% 0%, #fff9, transparent 60%), var(--panel); box-shadow: 0 14px 30px -16px #000c;
}
.pcard::before { content: ''; position: absolute; inset: 5px; border: 1px solid var(--accent2); pointer-events: none; }
.pcard::after { content: ''; position: absolute; inset: 9px; border: 1px solid color-mix(in srgb, var(--accent2) 40%, transparent); pointer-events: none; }
.pcard .k { font-size: .58rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.pcard .big { font-size: 2.1rem; line-height: 1.15; }
.pcard img { width: 72%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 2px solid var(--accent2); }
.pcard b { font-family: var(--font-title); font-weight: 500; font-size: 1.2rem; line-height: 1.15; }
.pcard .d { font-family: var(--font-title); font-style: italic; font-size: .9rem; color: var(--ink-soft); line-height: 1.25; }
.pcard.sol { box-shadow: 0 0 0 2px var(--accent), 0 14px 30px -16px #000c; }
.empty { text-align: center; color: var(--muted); font-family: var(--font-title); font-style: italic; font-size: 1.1rem; padding: 18px 0; }
.section-title { margin: 24px 0 12px; }
.section-title h2 { margin: 2px 0 0; }

/* diario */
.log { list-style: none; padding: 0; margin: 0; }
.log li { padding: 12px 0; border-bottom: 1px solid var(--ink-line); line-height: 1.45; font-size: .95rem; }
.log li:last-child { border-bottom: 0; }
.log li.priv { border-left: 3px solid var(--accent2); padding-left: 12px; background: linear-gradient(to right, color-mix(in srgb, var(--accent2) 16%, transparent), transparent 75%); }
.log li.clue { border-left: 3px solid var(--accent); padding-left: 12px; font-family: var(--font-title); font-size: 1.12rem; }
.log .when { font-size: .58rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 3px; }
.log .when .tag { margin-left: 6px; padding: 1px 5px; font-size: .52rem; }

.answer { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--ink-line); }
.answer:last-child { border-bottom: 0; }
.answer .nm { font-family: var(--font-title); font-size: 1.15rem; }
.count { display: inline-flex; align-items: center; gap: 8px; font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.count i { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-style: normal; font-family: var(--font-title); font-size: 1.2rem; letter-spacing: 0; border: 1px solid var(--ink-line); color: var(--ink); }
.n1 i { background: var(--accent2); border-color: var(--accent2); }
.n2 i { background: var(--accent); border-color: var(--accent); color: var(--panel); }
.asked { font-family: var(--font-title); font-size: 1.2rem; margin-bottom: 8px; }

/* fine partita */
.verdict { text-align: center; padding-top: 22px; }
.verdict .seal { width: 104px; height: 104px; margin: 0 auto 6px; display: block; animation: stamp .7s var(--spring) both; }
@keyframes stamp { from { transform: scale(2.2) rotate(-18deg); opacity: 0; } to { transform: none; opacity: 1; } }
.verdict h1 { font-size: 2.3rem; margin-top: 8px; }
.epilogue { font-family: var(--font-title); font-style: italic; font-size: 1.25rem; line-height: 1.45; text-align: center; }

/* conferma */
.sheet-back { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .2s both; }
.sheet { width: 100%; max-width: 480px; margin: 0; animation: rise .5s var(--spring) both; }
.sheet .seal { width: 64px; height: 64px; float: right; margin: -6px -4px 0 8px; }
@keyframes fade { from { opacity: 0; } }
@media (min-width: 600px) { .sheet-back { align-items: center; } }

/* avvisi */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px);
  background: var(--panel); color: var(--ink); padding: 13px 18px; border-radius: 3px; border-left: 4px solid var(--accent);
  box-shadow: 0 16px 40px -10px #000; font-family: var(--font-title); font-size: 1.12rem; animation: toast .45s var(--spring) both;
}
@keyframes toast { from { transform: translate(-50%, 24px); opacity: 0; } }
.conn { position: fixed; top: 0; left: 0; right: 0; background: var(--accent); color: var(--panel); text-align: center; font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 8px; z-index: 60; }

/* entrata dei fogli: frenata a molla, sfalsata in modo irregolare */
.enter > * { animation: rise .6s var(--spring) both; }
.enter > *:nth-child(2) { animation-delay: .05s; } .enter > *:nth-child(3) { animation-delay: .13s; }
.enter > *:nth-child(4) { animation-delay: .17s; } .enter > *:nth-child(5) { animation-delay: .26s; } .enter > *:nth-child(n+6) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ======================= pagina iniziale ======================= */
/* Direzione artistica: maison d'opera. Nero caldo, oro champagne a lamina, filetti sottili con angoli
   incisi, grana di pellicola e carta. Il rosso delitto resta un accento, non un fondo. */
.lp {
  --noir: #0b0a09; --noir-2: #12100e; --ivory: #efe6d5; --mute: #a39a8c;
  --champ: #d9bf86; --hair: color-mix(in srgb, #d9bf86 30%, transparent); --hair-2: color-mix(in srgb, #d9bf86 16%, transparent);
  --foil: linear-gradient(100deg, #7a5c32 0%, #cfb37a 18%, #f5e7c4 34%, #b9965b 52%, #ead5a3 70%, #8b6c3e 88%, #d6bd85 100%);
  --c-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cg %3E%3Cpath d='M1 30V11C1 5.5 5.5 1 11 1h19' fill='none' stroke='%23d9bf86' stroke-width='1.2'/%3E%3Cpath d='M6 30V15c0-5 4-9 9-9h15' fill='none' stroke='%23d9bf86' stroke-opacity='.45'/%3E%3Crect x='9.6' y='9.6' width='4.2' height='4.2' transform='rotate%2845 11.7 11.7%29' fill='%23d9bf86'/%3E%3C/g%3E%3C/svg%3E");
  --c-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cg transform='translate%2830 0%29 scale%28-1 1%29'%3E%3Cpath d='M1 30V11C1 5.5 5.5 1 11 1h19' fill='none' stroke='%23d9bf86' stroke-width='1.2'/%3E%3Cpath d='M6 30V15c0-5 4-9 9-9h15' fill='none' stroke='%23d9bf86' stroke-opacity='.45'/%3E%3Crect x='9.6' y='9.6' width='4.2' height='4.2' transform='rotate%2845 11.7 11.7%29' fill='%23d9bf86'/%3E%3C/g%3E%3C/svg%3E");
  --c-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cg transform='translate%280 30%29 scale%281 -1%29'%3E%3Cpath d='M1 30V11C1 5.5 5.5 1 11 1h19' fill='none' stroke='%23d9bf86' stroke-width='1.2'/%3E%3Cpath d='M6 30V15c0-5 4-9 9-9h15' fill='none' stroke='%23d9bf86' stroke-opacity='.45'/%3E%3Crect x='9.6' y='9.6' width='4.2' height='4.2' transform='rotate%2845 11.7 11.7%29' fill='%23d9bf86'/%3E%3C/g%3E%3C/svg%3E");
  --c-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cg transform='translate%2830 30%29 scale%28-1 -1%29'%3E%3Cpath d='M1 30V11C1 5.5 5.5 1 11 1h19' fill='none' stroke='%23d9bf86' stroke-width='1.2'/%3E%3Cpath d='M6 30V15c0-5 4-9 9-9h15' fill='none' stroke='%23d9bf86' stroke-opacity='.45'/%3E%3Crect x='9.6' y='9.6' width='4.2' height='4.2' transform='rotate%2845 11.7 11.7%29' fill='%23d9bf86'/%3E%3C/g%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29'/%3E%3C/svg%3E");
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.035 .8' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .55  0 0 0 0 .45  0 0 0 0 .3  0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23p%29'/%3E%3C/svg%3E");
}
html { scroll-behavior: smooth; }
#app.wide { max-width: 1180px; }
body:has(.lp) { overflow-x: clip; background: #0b0a09; }
body:has(.lp)::before { display: none; }
/* grana di pellicola su tutta la pagina: toglie la piattezza del digitale */
body:has(.lp)::after { content: ''; position: fixed; inset: -50%; z-index: 60; pointer-events: none; background: var(--grain); opacity: .07; mix-blend-mode: overlay; animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { translate: 0 0; } 20% { translate: -3% 2%; } 40% { translate: 2% -3%; } 60% { translate: -2% -1%; } 80% { translate: 3% 3%; } }
.home section { scroll-margin-top: 76px; }
.lp-full { width: 100vw; margin-left: calc(50% - 50vw); }
.foil, .lp-facts b, .lp-num, .hero-title em, .hero-title em .w > span, .lp-quote em, .lp-quote .q { background: var(--foil); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp .eyebrow { color: var(--champ); font-weight: 500; letter-spacing: .32em; font-size: .7rem; }
.orn { display: block; width: 160px; height: 14px; margin: 14px auto; color: var(--champ); stroke: var(--champ); fill: none; stroke-width: 1; opacity: .85; }

/* cornice incisa: filetto sottile con angoli decorati */
.deco { position: relative; }
.deco::after { content: ''; position: absolute; inset: 10px; pointer-events: none; border: 1px solid var(--hair-2);
  background: var(--c-tl) top left / 26px no-repeat, var(--c-tr) top right / 26px no-repeat, var(--c-bl) bottom left / 26px no-repeat, var(--c-br) bottom right / 26px no-repeat; }

/* pulsanti: lamina d'oro o filetto, angoli vivi */
.lp .btn { border-radius: 0; min-height: 52px; padding: 0 28px; font-weight: 500; letter-spacing: .24em; font-size: .72rem; color: var(--ivory);
  background: transparent; border: 1px solid var(--hair); box-shadow: none; position: relative; overflow: hidden; isolation: isolate; }
.lp .btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--champ) 14%, transparent); scale: 0 1; transform-origin: right; transition: scale .6s var(--spring-calm); }
.lp .btn:hover::before { scale: 1 1; transform-origin: left; }
.lp .btn.primary, .lp .btn.gold { color: #17130e; border: 0; background: var(--foil); background-size: 220% 100%; background-position: 0 0; transition: background-position 1.2s var(--spring-calm), transform .45s var(--spring-pop), box-shadow .4s;
  box-shadow: 0 12px 30px -14px color-mix(in srgb, var(--champ) 60%, transparent), inset 0 1px 0 #fff6; }
.lp .btn.primary::before, .lp .btn.gold::before { display: none; }
.lp .btn.primary:hover, .lp .btn.gold:hover { background-position: 100% 0; filter: none; }
.lp .btn svg { width: 16px; height: 16px; }

/* barra in alto */
.lp-nav { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; gap: 20px; padding: 18px max(18px, calc(50vw - 570px));
  background: linear-gradient(#000c, transparent); transition: background-color .5s, padding .5s, box-shadow .5s; }
.lp-nav.solid { padding-block: 10px; background: color-mix(in srgb, #0b0a09 86%, transparent); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); box-shadow: 0 1px 0 var(--hair-2); }
.lp-brand img { display: block; height: 40px; width: auto; opacity: 0; translate: 0 -6px; transition: opacity .5s, translate .7s var(--spring-soft); }
.lp-nav.solid .lp-brand img { opacity: 1; translate: 0 0; }
.lp-links { display: none; flex: 1; justify-content: center; gap: 34px; }
.lp-links a { position: relative; color: color-mix(in srgb, var(--ivory) 78%, transparent); text-decoration: none; font-size: .68rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; padding: 6px 0; transition: color .3s; }
.lp-links a::after { content: ''; position: absolute; left: 50%; right: 50%; bottom: 0; height: 1px; background: var(--champ); transition: left .5s var(--spring-calm), right .5s var(--spring-calm); }
.lp-links a:hover { color: var(--ivory); } .lp-links a:hover::after { left: 0; right: 0; }
.lp-nav > .btn { margin-left: auto; min-height: 40px; padding: 0 18px; font-size: .64rem; }
@media (min-width: 900px) { .lp-links { display: flex; } .lp-nav > .btn { margin-left: 0; } }

/* apertura */
.lp-hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; margin-top: -16px; padding: 96px 0 100px; isolation: isolate;
  background: radial-gradient(55% 50% at 50% 44%, #2a1214 0%, #160c0c 45%, #0b0a09 80%); }
.lp-hero::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(560px 420px at var(--mx, 50%) var(--my, 44%), color-mix(in srgb, #f3dfb0 10%, transparent), transparent 70%); }
.lp-hero::after { content: ''; position: absolute; inset: auto 0 0; height: 32%; z-index: 4; pointer-events: none; background: linear-gradient(transparent, #0b0a09 92%); }
.lp-curtain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.lp-beam { position: absolute; left: 50%; top: -12%; width: 80%; height: 125%; translate: -50% 0; z-index: 0; pointer-events: none; transform-origin: 50% 0; mix-blend-mode: screen;
  background: conic-gradient(from 180deg at 50% 0%, transparent 165deg, color-mix(in srgb, #f6e3b4 6%, transparent) 175deg, color-mix(in srgb, #f6e3b4 10%, transparent) 180deg, color-mix(in srgb, #f6e3b4 6%, transparent) 185deg, transparent 195deg);
  animation: beam-sway 14s ease-in-out infinite alternate; }
@keyframes beam-sway { from { rotate: -4deg; } to { rotate: 4deg; } }
.lp-hero-in { position: relative; z-index: 5; text-align: center; max-width: 920px; padding: 0 max(22px, 13vw); --intro: 0s; }
.lp-hero.opening .lp-hero-in { --intro: 1.7s; }
.hero-logo .plate { margin: 0 auto 2px; max-width: min(340px, 70vw); animation: logo-in 1.6s var(--spring-soft) calc(var(--intro) + .1s) both, float 9s ease-in-out calc(var(--intro) + 1.8s) infinite; }
.hero-logo .plate::before { background: radial-gradient(closest-side, color-mix(in srgb, #e9c98a 16%, transparent), transparent); }
@keyframes logo-in { from { opacity: 0; transform: scale(.88) translateY(16px); filter: blur(14px); } }
@keyframes float { 50% { transform: translateY(-6px); } }
.logo-shine::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, #fff4d6cc 50%, transparent 60%) no-repeat; background-size: 300% 100%; background-position: 150% 0;
  -webkit-mask: url(/brand/logo.webp) center / 100% 100% no-repeat; mask: url(/brand/logo.webp) center / 100% 100% no-repeat;
  mix-blend-mode: overlay; animation: shine 8s cubic-bezier(.55, 0, .3, 1) calc(var(--intro, 0s) + 1.8s) infinite; }
@keyframes shine { 0% { background-position: 150% 0; } 28%, 100% { background-position: -60% 0; } }
.lp-hero-in > .eyebrow { margin: 10px 0 18px; }
.hero-title { font-weight: 500; font-size: clamp(2.6rem, 6.4vw, 5.6rem); line-height: 1.02; letter-spacing: -.02em; margin: 0 auto 22px; max-width: 15ch; color: var(--ivory); text-shadow: 0 8px 40px #000; }
.hero-title em { font-style: italic; font-weight: 500; }
.hero-title em .w > span { text-shadow: none; filter: drop-shadow(0 4px 18px #0009); }
.hero-sub { font-family: var(--font-title); font-size: clamp(1.05rem, 1.7vw, 1.22rem); line-height: 1.65; color: color-mix(in srgb, var(--ivory) 80%, transparent); max-width: 34em; margin: 0 auto; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 34px; }
.hero-cta .btn { min-width: 210px; }
.lp-scroll { position: absolute; left: 50%; bottom: 30px; z-index: 6; translate: -50% 0; width: 1px; height: 54px; background: linear-gradient(var(--hair), transparent); }
.lp-scroll span { position: absolute; left: -2px; top: 0; width: 5px; height: 5px; rotate: 45deg; background: var(--champ); animation: scroll-cue 2.4s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes scroll-cue { 0% { opacity: 0; translate: 0 0; } 25% { opacity: 1; } 80% { opacity: 0; translate: 0 44px; } 100% { opacity: 0; } }

/* numeri chiave: una riga incisa, senza scatole */
.lp-facts { position: relative; z-index: 5; display: grid; grid-template-columns: 1fr 1fr; max-width: 1080px; margin: -40px auto 0; border-top: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2); }
.lp-facts > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 26px 14px; }
.lp-facts > div + div { border-left: 1px solid var(--hair-2); }
.lp-facts > div:nth-child(3) { border-left: 0; }
.lp-facts b { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.4rem, 4.4vw, 3.4rem); line-height: 1; }
.lp-facts b small { font-size: .5em; }
.lp-facts span { font-size: .68rem; line-height: 1.6; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
@media (max-width: 899px) { .lp-facts > div:nth-child(n+3) { border-top: 1px solid var(--hair-2); } }
@media (min-width: 900px) { .lp-facts { grid-template-columns: repeat(4, 1fr); } .lp-facts > div:nth-child(3) { border-left: 1px solid var(--hair-2); } .lp-facts > div { padding: 34px 20px; } }

/* sezioni */
.lp-sec { padding-top: clamp(84px, 11vw, 140px); }
.lp-head { text-align: center; max-width: 680px; margin: 0 auto 46px; }
.lp-head .orn { margin: 12px auto 16px; }
.lp-head h2 { font-weight: 500; font-size: clamp(2.2rem, 4.8vw, 3.5rem); line-height: 1.04; letter-spacing: -.01em; margin: 0 0 14px; color: var(--ivory); }
.lp-head p { font-family: var(--font-title); color: var(--mute); font-size: 1.08rem; line-height: 1.65; margin: 0; }

/* cartellone: locandine nere con filetti e angoli incisi */
.posters { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 16px 22px; margin: 0 -16px; scrollbar-width: none; }
.posters::-webkit-scrollbar { display: none; }
.poster { scroll-snap-align: center; aspect-ratio: 3 / 4.3; border: 0; padding: 0; border-radius: 0; cursor: pointer; color: var(--ivory); text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(85% 55% at 50% 0%, color-mix(in srgb, var(--p-accent) 38%, transparent), transparent 70%), linear-gradient(180deg, #15110f, #0c0a09);
  box-shadow: 0 30px 50px -28px #000, 0 0 0 1px var(--hair-2); transition: box-shadow .5s, transform .6s var(--spring-soft), opacity .6s, translate 1.1s var(--spring-soft) var(--rv-d, 0s), scale 1.1s var(--spring-soft) var(--rv-d, 0s); }
.poster::before { content: ''; position: absolute; inset: 10px; pointer-events: none; border: 1px solid var(--hair-2);
  background: var(--c-tl) top left / 24px no-repeat, var(--c-tr) top right / 24px no-repeat, var(--c-bl) bottom left / 24px no-repeat, var(--c-br) bottom right / 24px no-repeat; opacity: .7; transition: opacity .5s; }
.poster::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--paper); opacity: .25; mix-blend-mode: overlay; border: 0; }
.poster:hover::before, .poster.sel::before { opacity: 1; border-color: var(--hair); }
.poster-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 34px 24px; }
.poster-n { position: absolute; top: 26px; left: 0; right: 0; font-size: .6rem; font-weight: 500; letter-spacing: .3em; color: var(--mute); }
.poster-tag { position: absolute; bottom: 26px; left: 0; right: 0; font-size: .58rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--champ); }
.poster-who { font-size: .66rem; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; color: var(--champ); }
.poster-emblem { width: 34%; height: auto; fill: none; stroke: var(--champ); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--champ) 35%, transparent)); margin: 8px 0 4px; }
.poster b { font-family: var(--font-display); font-weight: 500; font-size: 1.62rem; line-height: 1.08; letter-spacing: -.01em; }
.poster-where { font-family: var(--font-title); font-style: italic; font-size: .95rem; color: var(--mute); }
.poster.sel { box-shadow: 0 34px 60px -28px #000, 0 0 0 1px var(--champ), 0 0 60px -18px color-mix(in srgb, var(--champ) 55%, transparent); }
@media (min-width: 900px) { .posters { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 10px 0 12px; gap: 22px; } }

/* il caso scelto: un invito su carta avorio */
.feature { display: grid; margin-top: 30px; overflow: hidden; color: #1b1612; background: var(--paper), linear-gradient(160deg, #f5ecdc, #e9dcc3); box-shadow: 0 40px 70px -40px #000, 0 0 0 1px var(--hair); }
.feature.deco::after { inset: 12px; border-color: color-mix(in srgb, #9c7c46 40%, transparent); }
.feature-art { position: relative; display: grid; place-items: center; align-content: center; gap: 14px; min-height: 200px; padding: 30px; color: var(--champ);
  background: radial-gradient(70% 60% at 50% 35%, color-mix(in srgb, var(--p-accent) 45%, transparent), transparent 75%), #0e0b0a; }
.feature-art svg { width: 104px; height: 104px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--champ) 40%, transparent)); }
.feature-art span { font-size: .64rem; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; }
.feature-body { position: relative; z-index: 1; padding: 34px 28px 36px; }
.feature-body .eyebrow { color: #8a6a3c; }
.feature-body h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.9rem, 3.4vw, 2.6rem); letter-spacing: -.01em; margin: 8px 0 14px; color: #17120e; }
.feature-story { font-family: var(--font-title); font-size: 1.08rem; line-height: 1.7; color: #3b322a; margin: 0 0 24px; }
.feature-name { max-width: 420px; margin-bottom: 20px; }
.feature-name label, .lp-join label { color: #6f5a3e; }
.feature input, .lp-join input { background: #fffaf0; border: 1px solid color-mix(in srgb, #9c7c46 35%, transparent); border-radius: 0; }
.feature-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.feature-cta .btn { flex: 1 1 230px; }
.feature .btn:not(.primary), .lp-join .btn:not(.primary) { color: #1b1612; border-color: color-mix(in srgb, #1b1612 30%, transparent); }
@media (min-width: 900px) { .feature { grid-template-columns: 320px 1fr; } .feature-body { padding: 46px 52px 48px; } }

/* due modi di giocare */
.lp-modes { display: grid; gap: 22px; }
@media (min-width: 900px) { .lp-modes { grid-template-columns: 1fr 1fr; gap: 28px; } }
.lp-mode { padding: 26px 26px 36px; background: linear-gradient(180deg, #14110f, #0e0c0b); box-shadow: 0 0 0 1px var(--hair-2), 0 40px 60px -40px #000; }
.lp-mode .eyebrow { margin-top: 4px; }
.lp-mode h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 2.8vw, 2.2rem); letter-spacing: -.01em; margin: 8px 0 12px; color: var(--ivory); }
.lp-mode p { font-family: var(--font-title); color: var(--mute); line-height: 1.7; margin: 0; font-size: 1.02rem; }
.lp-mock { position: relative; z-index: 1; height: clamp(230px, 28vw, 300px); margin-bottom: 26px; overflow: hidden;
  background: radial-gradient(60% 70% at 40% 30%, color-mix(in srgb, var(--champ) 10%, transparent), transparent 70%), #090807; box-shadow: inset 0 0 0 1px var(--hair-2); }
.mk-wall, .mk-tv { position: absolute; left: 6%; top: 12%; width: 62%; aspect-ratio: 16 / 9; }
.mk-wall { padding: 4% 5%; background: linear-gradient(180deg, #13100f, #0c0a09); box-shadow: 0 0 0 3px #050404, 0 0 0 4px #2a2622, 0 30px 40px -18px #000; display: flex; flex-direction: column; gap: 5%; }
.mk-wall::after, .mk-tv::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, #ffffff10, transparent 40%); }
.mk-wall small, .mk-card small { font-size: .46rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--champ); }
.mk-wall b { font-family: var(--font-display); font-weight: 500; font-size: clamp(.9rem, 1.6vw, 1.2rem); color: var(--ivory); margin-bottom: 2%; }
.mk-bar { position: relative; display: flex; align-items: center; justify-content: space-between; height: 16%; padding: 0 4%; background: #ffffff0a; overflow: hidden; font-size: clamp(.55rem, .95vw, .72rem); color: var(--ivory); }
.mk-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: #ffffff14; transition: width 1.8s var(--spring-soft) .5s; }
.mk-bar.win i { background: var(--foil); background-size: 220% 100%; opacity: .9; }
.mk-bar.win span, .mk-bar.win em { color: #17130e; }
.in .mk-bar i { width: var(--w); }
.mk-bar span, .mk-bar em { position: relative; font-style: normal; font-family: var(--font-title); }
.mk-tv { background: #050404; padding: 5px; box-shadow: 0 0 0 1px #2a2622, 0 30px 40px -18px #000; }
.mk-tv::after { content: ''; position: absolute; left: 40%; right: 40%; bottom: -14px; height: 9px; background: linear-gradient(#1c1a18, #080707); }
.mk-stage { position: relative; height: 100%; overflow: hidden; background: radial-gradient(55% 70% at 50% 40%, #2b1712, #0c0807 80%); }
.mk-drape { position: absolute; top: 0; bottom: 0; width: 16%; background: repeating-linear-gradient(90deg, #22030a 0 6px, #5c0d1a 10px, #2e0510 14px); box-shadow: inset 0 -30px 30px -10px #000c; }
.mk-drape.l { left: 0; border-radius: 0 0 60% 0; } .mk-drape.r { right: 0; border-radius: 0 0 0 60%; }
.mk-actors { position: absolute; left: 0; right: 0; top: 15%; display: flex; justify-content: center; gap: 10%; }
.mk-actors .cameo { width: 15%; height: auto; aspect-ratio: 46 / 56; box-shadow: 0 0 0 1.5px #b39463; }
.mk-actors .cameo:first-child { box-shadow: 0 0 0 1.5px var(--champ), 0 0 24px #f3dfb066; }
.mk-actors .cameo:last-child { opacity: .45; filter: saturate(.3); }
.mk-sub { position: absolute; left: 0; right: 0; bottom: 0; padding: 4% 16% 5%; text-align: center; background: linear-gradient(transparent, #000e 45%); font-family: var(--font-title); color: var(--ivory); font-size: clamp(.55rem, 1vw, .78rem); }
.mk-sub small { display: block; font-family: var(--font); font-size: .78em; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--champ); }
.mk-phone { position: absolute; right: 6%; bottom: -10%; width: clamp(104px, 12vw, 136px); aspect-ratio: 9 / 18.5; padding: 16px 7px 8px; border-radius: 20px; background: #0e0c0b;
  box-shadow: 0 0 0 3px #050404, 0 0 0 4px #3a342d, 0 34px 50px -12px #000; animation: phone-float 7s ease-in-out infinite; display: flex; flex-direction: column; gap: 6px; }
.lp-mode:nth-child(2) .mk-phone { animation-delay: -3.5s; }
@keyframes phone-float { 50% { translate: 0 -7px; rotate: -1deg; } }
.mk-notch { position: absolute; top: 6px; left: 50%; width: 32%; height: 5px; translate: -50% 0; border-radius: 4px; background: #000; }
.mk-clock { display: flex; align-items: center; gap: 6px; padding: 5px 6px; background: #1a1613; box-shadow: inset 0 0 0 1px var(--hair-2); font-size: .4rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--champ); }
.mk-clock span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--champ); font-family: var(--font-title); font-size: .5rem; letter-spacing: 0; color: var(--ivory); }
.mk-card { flex: 1; padding: 7px 6px; background: var(--paper), #f1e7d4; color: #1b1612; display: flex; flex-direction: column; gap: 4px; }
.mk-card small { color: #8a6a3c; font-size: .36rem; }
.mk-card b { font-family: var(--font-display); font-weight: 500; font-size: .64rem; line-height: 1.1; margin-bottom: 2px; }
.mk-opt { display: flex; align-items: center; gap: 5px; padding: 3px 4px; border: 1px solid color-mix(in srgb, #9c7c46 35%, transparent); font-family: var(--font-title); font-size: .46rem; line-height: 1.1; }
.mk-opt .cameo { width: 15px; height: 18px; box-shadow: 0 0 0 1px #b39463; }
.mk-opt.on { background: #17120e; color: var(--champ); border-color: #17120e; }

/* tre gesti: numeri romani in lamina, filetti verticali */
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.lp-steps li { position: relative; padding: 34px 26px 36px; text-align: center; border-top: 1px solid var(--hair-2); }
.lp-num { display: block; font-family: var(--font-display); font-weight: 500; font-style: italic; font-size: 3.4rem; line-height: 1; margin-bottom: 18px; }
.lp-steps svg { width: 30px; height: 30px; color: var(--champ); margin: 0 auto 14px; display: block; stroke-width: 1.4; }
.lp-steps b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; color: var(--ivory); margin-bottom: 10px; }
.lp-steps p { font-family: var(--font-title); color: var(--mute); line-height: 1.7; margin: 0 auto; max-width: 26em; }
@media (min-width: 900px) { .lp-steps { grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2); }
  .lp-steps li { border-top: 0; padding: 48px 34px 50px; } .lp-steps li + li { border-left: 1px solid var(--hair-2); } }

/* il motto, in grande, su nero */
.lp-quote { position: relative; margin-top: clamp(84px, 11vw, 140px); padding: clamp(80px, 11vw, 130px) 22px; text-align: center; overflow: hidden;
  background: radial-gradient(60% 80% at 50% 50%, #1a1311, #0b0a09 75%); border-top: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2); }
.lp-quote::before { content: ''; position: absolute; left: 50%; top: 50%; width: min(560px, 80vw); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; border: 1px solid var(--hair-2); pointer-events: none; }
.lp-quote::after { content: ''; position: absolute; left: 50%; top: 50%; width: min(620px, 88vw); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--champ) 10%, transparent); pointer-events: none; }
.lp-quote blockquote { position: relative; z-index: 1; margin: 0 auto; max-width: 940px; }
.lp-quote p { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(2.2rem, 5.6vw, 4.4rem); line-height: 1.1; letter-spacing: -.015em; color: var(--ivory); }
.lp-quote em { font-style: italic; }
.lp-quote .q { font-size: .9em; padding: 0 .08em; }
.lp-quote cite { display: block; margin-top: 26px; font-family: var(--font); font-style: normal; font-size: .66rem; font-weight: 500; letter-spacing: .36em; text-transform: uppercase; color: var(--champ); }

/* entra con il codice: un altro invito */
.lp-join { display: grid; gap: 30px; align-items: center; max-width: 960px; margin: 0 auto; padding: 38px 30px; color: #1b1612; background: var(--paper), linear-gradient(160deg, #f5ecdc, #e9dcc3); box-shadow: 0 40px 70px -40px #000, 0 0 0 1px var(--hair); }
.lp-join.deco::after { inset: 12px; border-color: color-mix(in srgb, #9c7c46 40%, transparent); }
.lp-join > * { position: relative; z-index: 1; }
.lp-join .eyebrow { color: #8a6a3c; }
.lp-join h2 { font-weight: 500; font-size: clamp(2rem, 3.6vw, 2.7rem); letter-spacing: -.01em; margin: 8px 0 12px; color: #17120e; }
.lp-join p { font-family: var(--font-title); color: #4a3f34; line-height: 1.6; }
.lp-join .code-boxes { margin: 0 auto 16px; }
.lp-join .code-boxes .cb { border-radius: 0; background: #fffaf0; border: 1px solid color-mix(in srgb, #9c7c46 35%, transparent); border-bottom: 2px solid #9c7c46; box-shadow: none; }
@media (min-width: 900px) { .lp-join { grid-template-columns: 1.1fr 1fr; gap: 50px; padding: 56px 60px; } }

.lp-foot { text-align: center; padding: clamp(80px, 10vw, 120px) 0 44px; }
.lp-foot img { width: 170px; height: auto; margin: 0 auto 4px; }
.lp-foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px; margin: 4px 0 16px; }
.lp-foot a { color: var(--champ); font-size: .64rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 500; text-decoration: none; }
.lp-foot p { color: var(--mute); font-size: .78rem; letter-spacing: .06em; }

.lp .live-card { max-width: 760px; margin: 0 auto; border-radius: 0; background: var(--paper), linear-gradient(160deg, #f5ecdc, #e9dcc3); box-shadow: 0 40px 70px -40px #000, 0 0 0 1px var(--hair); }
.lp .live-card::before { border-color: color-mix(in srgb, #9c7c46 40%, transparent); }

@media (max-width: 600px) {
  .lp-scroll { display: none; }
  .mk-wall, .mk-tv { width: 60%; left: 5%; }
  .mk-phone { width: 96px; right: 5%; padding: 13px 5px 6px; gap: 4px; }
  .mk-opt { font-size: .4rem; } .mk-card b { font-size: .58rem; }
  .lp-facts span { letter-spacing: .1em; }
}
@media (prefers-reduced-motion: reduce) { .lp-beam, .hero-logo .plate, .logo-shine::after, .mk-phone, .lp-scroll span, body:has(.lp)::after { animation: none; } }

/* codice a quattro caselle */
.code-boxes { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 300px; margin: 8px auto; }
.code-boxes .cb { display: grid; place-items: center; aspect-ratio: 4 / 5; border-radius: 4px; font-family: var(--font-display); font-size: 2.3rem; line-height: 1;
  background: color-mix(in srgb, #fff 65%, var(--panel)); border-bottom: 2px solid var(--ink-line); box-shadow: 0 6px 14px -10px #0006; transition: border-color .25s, transform .4s var(--spring-pop), box-shadow .25s; }
.code-boxes .cb:not(:empty) { animation: letter-in .45s var(--spring-pop); }
@keyframes letter-in { from { transform: scale(.7); } }
.code-boxes:focus-within .cb.cur { border-color: var(--accent); box-shadow: 0 6px 14px -8px var(--accent); }
.code-boxes:focus-within .cb.cur:empty::after { content: ''; width: 2px; height: 1.1em; background: var(--accent); animation: pulse 1s steps(2) infinite; }
.code-card .code-boxes #code { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; font-size: 16px; cursor: text; }

.live-card { box-shadow: 0 0 0 2px var(--accent), 0 18px 40px -18px #000c; max-width: 720px; margin: 0 auto; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; font-size: .64rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--accent); }
.live-badge span { width: 9px; height: 9px; border-radius: 50%; background: #d1283a; box-shadow: 0 0 0 0 #d1283a88; animation: livepulse 1.6s infinite; }
@keyframes livepulse { 70% { box-shadow: 0 0 0 9px #d1283a00; } 100% { box-shadow: 0 0 0 0 #d1283a00; } }

@media (prefers-reduced-motion: reduce) { .lp-beam, .hero-notes, .hero-logo .plate, .logo-shine::after, .mk-phone, .lp-scroll span { animation: none; } .hero-notes { display: none; } }

/* ======================= schermate di gioco ======================= */
/* ritratti a cammeo */
.cameo { display: inline-grid; place-items: end center; flex: none; width: 46px; height: 56px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 35%, #fffaf0, #e6d7bc); box-shadow: 0 0 0 2px var(--accent2), 0 0 0 3px #5a4526, 0 6px 14px -6px #000a; }
.cameo svg { width: 92%; height: auto; margin-bottom: -2px; }
.cameo.big { width: 92px; height: 112px; margin: 6px auto 10px; box-shadow: 0 0 0 3px var(--accent2), 0 0 0 5px #5a4526, 0 12px 26px -10px #000c; }
.cameo.big-icon { place-items: center; font-size: 1.6rem; }
.opt { display: flex; align-items: center; gap: 14px; }
.opt .opt-t { flex: 1; min-width: 0; }
.opt.sel .cameo { box-shadow: 0 0 0 2px var(--accent), 0 0 0 4px var(--accent2), 0 6px 14px -6px #000a; }

/* conto alla rovescia ad anello */
.vote-clock { position: relative; display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 14px; margin: 0 0 14px; padding: 10px 14px;
  border-radius: 4px; background: var(--accent); color: var(--panel); box-shadow: 0 12px 24px -14px var(--accent); }
.vote-clock svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.vote-clock circle { fill: none; stroke-width: 8; }
.vote-clock .bg { stroke: color-mix(in srgb, var(--panel) 25%, transparent); }
.vote-clock .fg { stroke: var(--accent2); stroke-linecap: round; transition: stroke-dashoffset .5s linear; }
.vc-t { position: absolute; left: 14px; top: 10px; width: 64px; height: 64px; display: grid; place-items: center; font-family: var(--font-title); font-size: 1.25rem; }
.vc-t.low { color: #ffb3a8; }
.vc-l { align-self: center; font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }

/* risultati con barre e ritratti */
.results { display: grid; gap: 10px; margin-top: 6px; }
.res { display: flex; align-items: center; gap: 12px; }
.res-t { flex: 1; min-width: 0; }
.res .nm { font-family: var(--font-title); font-size: 1.1rem; }
.res b { font-family: var(--font-title); font-weight: 500; font-size: 1.2rem; }
.res-bar { height: 8px; margin-top: 5px; border-radius: 4px; background: var(--ink-line); overflow: hidden; }
.res-bar i { display: block; height: 100%; border-radius: 4px; background: var(--ink-soft); animation: grow 1s var(--spring) both; }
.res.win .res-bar i { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.res.win .nm { color: var(--accent); }
@keyframes grow { from { width: 0; } }

/* "chi ha mentito?" e dichiarazioni: ritratto accanto al titolo */
.liar { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.liar h2, .liar h3 { margin: 2px 0 0; }

/* verdetto: i sospettati come galleria di ritratti */
.suspects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.suspect { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 4px; cursor: pointer; color: var(--ink);
  border: 1px solid var(--ink-line); background: color-mix(in srgb, #fff 45%, var(--panel)); font-size: .8rem; line-height: 1.15; text-align: center; transition: transform .3s var(--spring); }
.suspect:active { transform: scale(.95); }
.suspect.sel { background: var(--accent); color: var(--panel); border-color: var(--accent); }
.suspect.sel .cameo { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent2); }

/* fascicolo: schede d'archivio con la graffetta */
.file-card { transform: rotate(var(--tilt, 0deg)); }
.clip { position: absolute; top: -10px; right: 26px; width: 16px; height: 38px; border: 2px solid #9a9a9a; border-radius: 10px; border-bottom-color: transparent; background: transparent; box-shadow: inset 0 0 0 2px transparent; }
.clip::after { content: ''; position: absolute; left: 3px; top: 6px; width: 6px; height: 24px; border: 2px solid #9a9a9a; border-radius: 6px; border-top-color: transparent; }

.scene-opt .letter, .letter { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-title); font-size: 1.2rem;
  color: var(--panel); background: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent2) 70%, transparent); }
.scene-opt.opt.sel .letter { background: var(--accent2); color: var(--ink); }
.scene-opt .opt-t > span { display: block; }
.scene-opt .opt-t b { font-size: 1.15rem; }

/* titoli grandi in Playfair, testi da leggere in Lora un po' piu' corposa */
.hero-title, .poster b, .verdict h1, .chosen, .big, .mid { font-family: var(--font-display); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ======================= movimento ======================= */
:root { --spring-pop: cubic-bezier(.2, 1.4, .4, 1); --spring-soft: cubic-bezier(.16, 1.15, .3, 1); --spring-calm: cubic-bezier(.16, 1, .3, 1); }

/* comparsa allo scorrimento, sfalsata */
[data-rv] { opacity: 0; translate: 0 34px; scale: .97; transition: opacity .6s cubic-bezier(.2, .7, .3, 1) var(--rv-d, 0s), translate 1.1s var(--spring-soft) var(--rv-d, 0s), scale 1.1s var(--spring-soft) var(--rv-d, 0s); }
[data-rv].in { opacity: 1; translate: 0 0; scale: 1; }
.settled [data-rv] { transition: none; }

/* titolo che sale parola per parola */
.hero-title .w { display: inline-block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; vertical-align: top; }
.hero-title .w > span { display: inline-block; animation: word-up 1.1s var(--spring-soft) both; }
.hero-title.static .w > span, .settled .hero-title .w > span { animation: none; }
@keyframes word-up { from { transform: translateY(105%) rotate(4deg); opacity: 0; } 30% { opacity: 1; } }
.lp-hero-in > .eyebrow, .hero-sub, .hero-cta { animation: rise 1s var(--spring-soft) both; }
.lp-hero-in > .eyebrow { animation-delay: calc(var(--intro) + .35s); } .hero-sub { animation-delay: calc(var(--intro) + .95s); } .hero-cta { animation-delay: calc(var(--intro) + 1.15s); }
.settled .lp-hero-in > *, .settled .hero-logo .plate { animation-name: none; }
.settled .hero-logo .plate { animation: float 8s ease-in-out infinite; }

/* disegni a tratto che si tracciano */
.draw * { stroke-dasharray: 1; stroke-dashoffset: 1; }
.in .draw *, .draw.static *, .enter .draw *, .settled .draw * { animation: trace 1.6s cubic-bezier(.65, 0, .35, 1) calc(var(--rv-d, 0s) + .25s) forwards; }
.settled .draw *, .draw.static * { animation: none; stroke-dashoffset: 0; }
@keyframes trace { to { stroke-dashoffset: 0; } }

/* locandine: inclinazione 3D e riflesso */
.poster { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--spring-soft), box-shadow .3s, opacity .6s, translate 1.1s var(--spring-soft) var(--rv-d, 0s), scale 1.1s var(--spring-soft) var(--rv-d, 0s); }
.poster.sel { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-8px); }
.poster-glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(60% 45% at var(--gx, 50%) var(--gy, 30%), #fff2, transparent 70%); }
.poster:hover .poster-glare { opacity: 1; }
.poster-emblem { transition: transform .6s var(--spring-pop); }
.poster:hover .poster-emblem, .poster.sel .poster-emblem { transform: scale(1.08) rotate(-3deg); }

/* pulsanti: pressione con rimbalzo */
.btn { transition: transform .45s var(--spring-pop), box-shadow .3s, background-color .3s, filter .3s; }
.btn:active:not(:disabled) { transform: scale(.955); transition-duration: .08s; }
@media (hover: hover) { .btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); } }
.opt, .suspect, .scene-opt { transition: transform .45s var(--spring-pop), background-color .25s, box-shadow .25s; }
.opt:active, .scene-opt:active { transform: scale(.975); transition-duration: .08s; }

/* entrata delle schermate di gioco: piu' morbida e con molla vera */
.enter > * { animation: rise .9s var(--spring-soft) both; }
@keyframes rise { from { transform: translateY(26px) scale(.98); opacity: 0; } 40% { opacity: 1; } }

/* cambio schermata */
::view-transition-old(root) { animation: vt-out .26s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in .7s var(--spring-soft) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px) scale(.99); filter: blur(3px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px) scale(.99); } }

@media (prefers-reduced-motion: reduce) { [data-rv] { opacity: 1; translate: none; scale: none; } .draw * { stroke-dasharray: none; } }
.settled .code-boxes .cb { animation: none; }
