/* Confess · il giallo all'italiana, pensato per il telefono.
   Nero, giallo da copertina, una fascetta rossa per i colpi di scena, carta per i verbali.
   Bricolage Grotesque per titoli, nomi e voci, IBM Plex Mono per verbali ed etichette. */
:root {
  --ink: #111111;
  --ink-2: #1a1a1a;
  --ink-3: #242424;
  --line: #303030;
  --fog: #a39b8b;
  --chalk: #f4efe2;
  --sodium: #f5c518;
  --alarm: #d62828;
  --paper: #f1ead8;
  --paper-ink: #151515;
  --paper-mute: #6b6252;
  --title: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --title-w: 800;
  --title-wd: 88%;
  --name: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --type: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --body: "Bricolage Grotesque", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --r-xs: 10px;
  --r-sm: 14px;
  --r: 20px;
  --r-lg: 28px;
  --glass: rgba(22, 22, 22, .88);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--ink); }
body {
  color: var(--chalk); font-family: var(--body); font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; overscroll-behavior-y: none;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .1; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--sodium); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Sul telefono l'app occupa tutto lo schermo; su un computer diventa un telefono al centro della scena. */
#app { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; background: var(--ink); }
@media (min-width: 640px) {
  body { background: radial-gradient(ellipse at 50% 0%, #2a2208, var(--ink) 60%); }
  #app { box-shadow: 0 0 0 1px var(--line), 0 40px 120px rgba(0, 0, 0, .7); }
}

/* ---------- Tipografia ---------- */
.label { font-family: var(--type); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--fog); }
.title { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); letter-spacing: -.01em; line-height: .95; margin: 0; }
.name { font-family: var(--name); font-weight: var(--title-w); font-stretch: var(--title-wd); letter-spacing: -.005em; line-height: .98; margin: 0; }
.muted { color: var(--fog); }
p { margin: 0; }

/* ---------- Bottoni e campi ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
  min-height: 56px; padding: 8px 24px; border: 0; border-radius: 999px; text-align: center; line-height: 1.25;
  background: var(--sodium); color: var(--ink); font-family: var(--type); font-weight: 500; font-size: 15px; letter-spacing: .1em; text-transform: uppercase;
  transition: transform .35s var(--spring), filter .2s, background .2s;
}
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--chalk); box-shadow: inset 0 0 0 1px var(--line); }
.btn.alarm { background: var(--alarm); color: var(--chalk); }
.btn.wa { background: #1fa855; color: #fff; }
.btn.block { width: 100%; }
.field { display: flex; flex-direction: column; gap: 8px; }
.input {
  width: 100%; min-height: 56px; padding: 0 20px; border-radius: var(--r-sm); font-size: 18px;
  background: var(--ink-2); border: 1px solid var(--line); color: var(--chalk);
}
.input::placeholder { color: #6f6a60; font-style: italic; }
.input:focus { border-color: var(--sodium); outline: none; box-shadow: 0 0 0 4px rgba(245, 197, 24, .16); }
.input { transition: border-color .2s, box-shadow .2s; }
.input.code { font-family: var(--type); font-size: 26px; letter-spacing: .3em; text-transform: uppercase; text-align: center; }
.iconbtn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: rgba(17, 17, 17, .55); backdrop-filter: blur(8px); border: 1px solid rgba(242, 237, 229, .16); color: var(--chalk);
}
.iconbtn[aria-pressed="true"] { border-color: var(--sodium); color: var(--sodium); }
.iconbtn svg { width: 20px; height: 20px; }

/* ---------- Ritratti ---------- */
.portrait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.sil { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 45% at 50% 40%, color-mix(in srgb, var(--tint) 32%, transparent), transparent 70%), linear-gradient(180deg, #1d1d1d, #0d0d0d); }
.sil svg { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 86%; }
.face { position: relative; overflow: hidden; background: #111; flex: none; }
.face.round { border-radius: 50%; }

/* ---------- Pagina iniziale ---------- */
.home { min-height: 100dvh; display: flex; flex-direction: column; }
.hero { position: relative; height: 62dvh; min-height: 420px; overflow: hidden; }
.hero .strip { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.hero .strip .face { height: 100%; filter: grayscale(.35) contrast(1.05); }
.hero .strip .face:nth-child(2) { transform: translateY(-4%); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 17, 17, .55), rgba(17, 17, 17, .1) 35%, rgba(17, 17, 17, .85) 78%, var(--ink)); }
.hero .over { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 2; }
.wordmark { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: clamp(64px, 22vw, 108px); line-height: .85; letter-spacing: -.02em; margin: 6px 0 0; }
.wordmark span { color: var(--sodium); }
.home .body { padding: 6px 20px calc(36px + var(--safe-b)); display: flex; flex-direction: column; gap: 24px; }
.tagline { font-size: 21px; line-height: 1.35; font-style: italic; }
.tagline em { font-style: normal; color: var(--sodium); }
.casecard { position: relative; overflow: hidden; padding: 22px 20px 20px; border-radius: var(--r-lg); background: var(--sodium); color: var(--paper-ink); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.casecard::after { content: ""; position: absolute; right: -46px; bottom: 22px; width: 190px; height: 26px; background: var(--alarm); transform: rotate(-32deg); }
.casecard > * { position: relative; z-index: 1; }
.casecard .label { color: #5c4a00; }
.casecard h2 { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 42px; line-height: .95; margin: 10px 0 10px; }
.casecard p { font-size: 16px; color: #2a2412; }
.casecard .meta { margin-top: 12px; font-family: var(--type); font-size: 12px; color: #5c4a00; }
.stamp { position: absolute; right: 14px; top: 30px; transform: rotate(8deg); font-family: var(--type); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--alarm); border: 2px solid var(--alarm); border-radius: 8px; padding: 4px 8px; }
.split { display: flex; align-items: center; gap: 12px; color: var(--fog); font-family: var(--type); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.split::before, .split::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.howto { display: grid; gap: 14px; padding: 0; margin: 0; counter-reset: s; }
.howto li { list-style: none; display: grid; grid-template-columns: 34px 1fr; gap: 10px; color: var(--fog); font-size: 16px; }
.howto li::before { counter-increment: s; content: "0" counter(s); font-family: var(--type); color: var(--sodium); }

/* ---------- Apertura cinematografica ---------- */
.intro { position: fixed; inset: 0; z-index: 85; background: #000; display: flex; flex-direction: column; justify-content: center; padding: 32px 26px calc(32px + var(--safe-b)); gap: 18px; }
.intro .line { font-family: var(--type); font-size: 19px; line-height: 1.5; color: var(--chalk); opacity: 0; animation: rise .9s var(--ease) forwards; }
.intro .line.big { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: clamp(50px, 15vw, 72px); line-height: .95; color: var(--sodium); }
.intro .skip { position: absolute; top: calc(16px + var(--safe-t)); right: 16px; background: none; border: 0; color: var(--fog); font-family: var(--type); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.intro .btn { opacity: 0; animation: rise .8s var(--ease) forwards; align-self: flex-start; margin-top: 10px; }

/* ---------- Barra alta della partita ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; padding: calc(10px + var(--safe-t)) 16px 10px;
  background: linear-gradient(var(--ink) 65%, rgba(17, 17, 17, 0));
  display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center;
}
.topbar .t { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 26px; line-height: 1; }
.meter { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.ticks { flex: 1; display: grid; gap: 2px; height: 8px; }
.ticks i { background: var(--sodium); border-radius: 2px; transition: background .4s; }
.ticks i.used { background: var(--line); }
.meter b { font-family: var(--type); font-size: 13px; font-weight: 400; color: var(--fog); white-space: nowrap; }

.screen { flex: 1; padding: 4px 16px calc(110px + var(--safe-b)); display: flex; flex-direction: column; gap: 18px; }
/* Barra delle sezioni sospesa, di vetro, con una pillola che scivola sulla sezione aperta. */
.tabbar {
  position: fixed; bottom: calc(10px + var(--safe-b)); left: 50%; transform: translateX(-50%); z-index: 40; width: calc(100% - 24px); max-width: 456px;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 0 0 1px rgba(244, 239, 226, .09), 0 18px 40px rgba(0, 0, 0, .55);
}
.tabbar .pill { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 4); border-radius: 999px; background: rgba(245, 197, 24, .14); box-shadow: inset 0 0 0 1px rgba(245, 197, 24, .35); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .5s var(--spring); }
.tabbar button { position: relative; z-index: 1; background: none; border: 0; padding: 8px 4px 7px; color: var(--fog); display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: var(--type); font-size: 10.5px; letter-spacing: .04em; border-radius: 999px; transition: color .25s, transform .35s var(--spring); }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button[aria-current="page"] { color: var(--sodium); }
.tabbar button[aria-current="page"] svg { animation: nudge .5s var(--spring); }
.dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--alarm); box-shadow: 0 0 0 3px var(--ink-2); }
.tabbar .dot { top: 5px; left: calc(50% + 9px); box-shadow: 0 0 0 3px #181818; }

/* ---------- Sospettati: carte a tutto schermo da sfogliare ---------- */
.deck { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
.deck::-webkit-scrollbar { display: none; }
.card {
  position: relative; flex: 0 0 86%; height: max(400px, calc(100dvh - 330px - var(--safe-b))); scroll-snap-align: center; overflow: hidden; border-radius: var(--r-lg);
  background: var(--ink-2); border: 1px solid var(--line); color: var(--chalk); text-align: left; padding: 0;
}
.card > .face { position: absolute; inset: 0; }
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(17, 17, 17, 0) 38%, rgba(17, 17, 17, .7) 66%, rgba(17, 17, 17, .97)); }
.card .tag { position: absolute; top: 14px; left: 14px; z-index: 2; font-family: var(--type); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; background: var(--paper); color: var(--paper-ink); padding: 5px 10px; border-radius: 999px; }
.card .typing { position: absolute; top: 14px; right: 14px; z-index: 2; font-family: var(--type); font-size: 12px; color: var(--ink); background: var(--tint, var(--sodium)); padding: 5px 10px; border-radius: 999px; animation: blink 1.4s infinite; }
.card .info { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2; display: flex; flex-direction: column; gap: 8px; }
.card .name { font-size: 42px; }
.card .name::after { content: ""; display: block; width: 46px; height: 4px; border-radius: 2px; margin-top: 10px; background: var(--tint, var(--sodium)); }
.card .role { font-family: var(--type); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--fog); }
.card .emerged { font-size: 15px; font-style: italic; color: var(--chalk); }
.card .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.card .actions .btn { min-height: 50px; padding: 0 12px; font-size: 17px; }
.card .actions .btn.ghost { background: rgba(17, 17, 17, .5); backdrop-filter: blur(6px); }
.card .dot { top: 12px; right: 12px; z-index: 3; width: 12px; height: 12px; }
.card.room .trio { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.card.room .trio .face { height: 100%; }
.pager { display: flex; justify-content: center; gap: 6px; }
.pager i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: .3s; }
.pager i.on { width: 20px; border-radius: 3px; background: var(--sodium); }
.brief { font-size: 16px; font-style: italic; color: var(--fog); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; background: none; border: 0; padding: 0; text-align: left; }
.brief.open { -webkit-line-clamp: unset; }

/* ---------- Scheda profilo ---------- */
.profile { min-height: 100dvh; padding-bottom: calc(96px + var(--safe-b)); }
.profile .hero { height: 66dvh; min-height: 440px; }
.profile .hero::after { background: linear-gradient(180deg, rgba(17, 17, 17, .5), rgba(17, 17, 17, 0) 22%, rgba(17, 17, 17, .2) 55%, var(--ink)); }
.profile .hero > .face { position: absolute; inset: 0; }
.profile .top { position: absolute; top: calc(12px + var(--safe-t)); left: 12px; right: 12px; z-index: 3; display: flex; justify-content: space-between; }
.profile .over .name { font-size: clamp(54px, 17vw, 76px); }
.profile .over .label { color: var(--chalk); }
.profile .over .label b { color: var(--tint); font-weight: 400; }
.sheet { padding: 6px 16px 0; display: flex; flex-direction: column; gap: 26px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 0; }
.facts div { background: var(--ink); padding: 14px; }
.facts div.wide { grid-column: 1 / -1; }
.facts dt { font-family: var(--type); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--fog); }
.facts dd { margin: 4px 0 0; font-size: 17px; line-height: 1.35; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.section-h h3 { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 26px; margin: 0; }
.claims { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
.claims li { list-style: none; font-family: var(--type); font-size: 15px; line-height: 1.5; padding-left: 18px; position: relative; color: var(--chalk); }
.claims li::before { content: "«"; position: absolute; left: 0; color: var(--tint); }
.timeline { position: relative; display: flex; flex-direction: column; gap: 16px; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline div { position: relative; font-size: 17px; line-height: 1.4; animation: rise .4s var(--ease) both; }
.timeline div::before { content: ""; position: absolute; left: -22px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--alarm); box-shadow: 0 0 0 4px rgba(226, 57, 46, .18); }
.timeline .tw::before { background: var(--sodium); box-shadow: 0 0 0 4px rgba(245, 197, 24, .18); }
.empty { font-style: italic; color: var(--fog); }
.minis { display: flex; flex-direction: column; gap: 10px; }
.mini { background: var(--paper); color: var(--paper-ink); padding: 14px 16px; border-radius: var(--r); }
.mini .label { color: var(--paper-mute); font-size: 11px; }
.mini b { display: block; font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 22px; margin: 2px 0 2px; }
.mini p { font-family: var(--type); font-size: 14px; color: #3c362e; }
.cta { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 40; width: 100%; max-width: 480px; padding: 18px 16px calc(12px + var(--safe-b)); background: linear-gradient(rgba(17, 17, 17, 0), var(--ink) 35%); }

/* ---------- Chat ---------- */
.chatview { position: relative; min-height: 100dvh; display: flex; flex-direction: column; }
.chatbg { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: 56dvh; z-index: 0; pointer-events: none; opacity: .3; }
.chatbg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 17, 17, .2), var(--ink)); }
.chatbg > .face, .chatbg > .trio { position: absolute; inset: 0; filter: grayscale(.4); }
.chatbg > .trio { display: grid; grid-template-columns: repeat(3, 1fr); }
.chatbg > .trio .face { height: 100%; }
.chathead { position: sticky; top: 0; z-index: 30; display: flex; gap: 10px; align-items: center; padding: calc(10px + var(--safe-t)) 12px 10px; background: rgba(17, 17, 17, .72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid rgba(244, 239, 226, .08); }
.chathead .who { flex: 1; min-width: 0; text-decoration: none; text-align: left; background: none; border: 0; padding: 0; color: var(--chalk); display: flex; gap: 10px; align-items: center; }
.chathead .who .face { width: 44px; height: 44px; border: 1.5px solid var(--tint, var(--line)); }
.chathead b { display: block; font-family: var(--name); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 21px; line-height: 1.05; }
.chathead small { display: block; font-family: var(--type); font-size: 11px; letter-spacing: .06em; color: var(--fog); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chathead .who > span:last-child { min-width: 0; }
.messages { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px 12px; }
.msg { max-width: 82%; padding: 10px 15px; font-size: 17px; line-height: 1.42; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.new { animation: bubble .45s var(--spring) both; }
.msg .who { display: block; font-family: var(--type); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 3px; opacity: .75; }
.msg.them { align-self: flex-start; background: rgba(38, 38, 38, .92); border-radius: var(--r) var(--r) var(--r) 6px; transform-origin: 0 100%; }

.msg.them.tinted { box-shadow: inset 3px 0 0 var(--tint); }
.msg.them.tinted .who { color: var(--tint); opacity: 1; }
.msg.me { align-self: flex-end; background: var(--sodium); color: var(--ink); border-radius: var(--r) var(--r) 6px var(--r); transform-origin: 100% 100%; }
.msg.other { align-self: flex-end; background: rgba(26, 26, 26, .94); border: 1px solid var(--line); border-radius: var(--r) var(--r) 6px var(--r); transform-origin: 100% 100%; }
.msg.approach { background: rgba(70, 14, 14, .8); box-shadow: inset 0 0 0 1px var(--alarm); }
.msg.typing { align-self: flex-start; background: transparent; color: var(--fog); font-style: italic; padding-left: 2px; }
.msg.typing::after { content: "…"; animation: blink 1.2s infinite; }
.note { align-self: center; max-width: 92%; text-align: center; font-family: var(--type); font-size: 12px; letter-spacing: .04em; color: var(--fog); padding: 8px 0; }
.note.red { color: var(--alarm); }
.voice { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; margin-top: 8px; padding: 6px 10px 6px 6px; background: rgba(0, 0, 0, .3); border-radius: 20px; border: 0; width: 100%; color: inherit; }
.voice .play { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--chalk); color: var(--ink); }
.voice .play svg { width: 14px; height: 14px; }
.wave { display: flex; align-items: center; gap: 2px; height: 26px; }
.wave i { flex: 1; background: rgba(242, 237, 229, .5); border-radius: 2px; min-height: 3px; }
.voice.playing .wave i { animation: pulse .9s infinite ease-in-out; background: var(--sodium); }
.voice small { font-family: var(--type); font-size: 11px; color: var(--fog); }
.starters { position: relative; z-index: 1; display: flex; gap: 8px; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; }
.starters::-webkit-scrollbar { display: none; }
.chip { flex: none; background: rgba(26, 26, 26, .92); border: 1px solid var(--line); color: var(--chalk); border-radius: 999px; padding: 9px 14px; font-size: 15px; font-style: italic; }
.composer { position: sticky; bottom: 0; z-index: 30; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b)); background: rgba(17, 17, 17, .78); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-top: 1px solid rgba(244, 239, 226, .08); }
.composer .input { min-height: 50px; border-radius: 999px; font-size: 17px; }
.composer .send { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--ink-3); color: var(--fog); display: grid; place-items: center; transition: transform .4s var(--spring), background .2s, color .2s; }
.composer .send.ready { background: var(--sodium); color: var(--ink); transform: rotate(-12deg) scale(1.04); }
.composer .send:disabled { opacity: .35; }
.composer .send svg { width: 20px; height: 20px; }
.composer .why, .composer .attached { grid-column: 1 / -1; }
.composer .why { font-family: var(--type); font-size: 12px; color: var(--fog); text-align: center; }

/* ---------- Fascicolo ---------- */
.dossier { display: flex; flex-direction: column; gap: 16px; }
.ticket { position: relative; padding: 18px 18px 20px; border-radius: var(--r); background: var(--paper); color: var(--paper-ink); box-shadow: 0 10px 24px rgba(0, 0, 0, .4); animation: rise .35s var(--ease) both; }
.ticket:nth-child(odd) { transform: rotate(-.7deg); }
.ticket:nth-child(even) { transform: rotate(.5deg); }
.ticket .top { display: flex; justify-content: space-between; gap: 12px; font-family: var(--type); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--paper-mute); }
.ticket h3 { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 27px; line-height: 1; margin: 8px 0 8px; }
.ticket p { font-size: 16px; line-height: 1.45; color: #2e2a22; }
.ticket.new::after { content: "Nuova"; position: absolute; top: -11px; right: 10px; transform: rotate(8deg); font-family: var(--type); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--chalk); background: var(--alarm); padding: 4px 10px; border-radius: 999px; }
.notes textarea { width: 100%; min-height: 150px; resize: vertical; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); font-family: var(--type); font-size: 15px; background: repeating-linear-gradient(var(--ink-2) 0 27px, var(--line) 27px 28px); line-height: 28px; color: var(--chalk); }

/* ---------- Squadra ---------- */
.players { display: flex; flex-wrap: wrap; gap: 8px; }
.player { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line); font-size: 16px; }
.player i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); background: var(--ink-3); }
.player.me { border-color: var(--sodium); }
.player small { color: var(--sodium); font-family: var(--type); font-size: 11px; }
.secret { position: relative; overflow: hidden; padding: 22px; min-height: 170px; border-radius: var(--r-lg); background: linear-gradient(135deg, #1d1d1d, #121212); border: 1px solid var(--line); }
.secret .cover { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; border: 0; color: var(--chalk); background: repeating-linear-gradient(45deg, #1f1f1f 0 12px, #191919 12px 24px); }
.secret .cover b { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 32px; }
.secret.complice { border-color: var(--alarm); }
.secret h3 { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 32px; margin: 4px 0 8px; }
.secret ul { margin: 12px 0 0; padding-left: 18px; color: var(--fog); }
.badge { display: inline-block; background: var(--alarm); color: var(--chalk); font-family: var(--type); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.feed { display: flex; flex-direction: column; gap: 12px; }
.feed div { display: grid; grid-template-columns: 50px 1fr; gap: 10px; font-size: 16px; color: var(--fog); }
.feed time { font-family: var(--type); font-size: 12px; color: #6f6a60; padding-top: 3px; }
.feed .tw { color: var(--alarm); }

/* ---------- Sala d'attesa ---------- */
.lobby { padding: calc(24px + var(--safe-t)) 20px calc(40px + var(--safe-b)); display: flex; flex-direction: column; gap: 24px; }
.bigcode { font-family: var(--type); font-weight: 500; font-size: 46px; letter-spacing: .26em; text-align: center; padding: 18px 0 14px; border: 1px dashed var(--line); border-radius: var(--r); color: var(--sodium); background: rgba(245, 197, 24, .04); }
.switch { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--alarm); margin: 3px 0 0; }
.switch b { display: block; font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 22px; }
.switch small { color: var(--fog); font-size: 15px; }

/* ---------- Accusa e verdetto ---------- */
.accuse { display: grid; gap: 10px; }
.pick { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; text-align: left; padding: 10px; background: var(--ink-2); border: 1px solid var(--line); color: var(--chalk); border-radius: var(--r); transition: transform .35s var(--spring), border-color .2s, background .2s; }
.pick .face { width: 64px; height: 80px; border-radius: var(--r-sm); }
.pick .name { font-size: 26px; }
.pick[aria-pressed="true"] { border-color: var(--alarm); box-shadow: inset 0 0 0 1px var(--alarm); background: rgba(70, 14, 14, .5); }
.verdict { padding: 24px 20px; border-radius: var(--r-lg); background: var(--paper); color: var(--paper-ink); display: flex; flex-direction: column; gap: 14px; transform: rotate(-.4deg); }
.verdict .big { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 56px; line-height: .92; }
.verdict .ok { color: #1f6b46; }
.verdict .ko { color: var(--alarm); }
.verdict ul { margin: 0; padding-left: 18px; }
.epilogue { padding: 22px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--ink-2); }
.epilogue p { font-style: italic; font-size: 21px; line-height: 1.4; }

/* ---------- Colpo di scena ---------- */
.twist { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 40px 26px calc(40px + var(--safe-b)); background: #070707; overflow: hidden; }
.twist .tape { position: absolute; left: -20%; right: -20%; top: 14%; height: 56px; transform: rotate(-7deg); background: repeating-linear-gradient(90deg, var(--alarm) 0 160px, #b8261d 160px 168px); display: flex; align-items: center; overflow: hidden; animation: tape .7s var(--ease) both; }
.twist .tape span { white-space: nowrap; font-family: var(--type); font-weight: 500; letter-spacing: .24em; font-size: 16px; color: var(--chalk); animation: scroll 14s linear infinite; }
.twist h2 { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: clamp(46px, 14vw, 66px); line-height: .95; margin: 40px 0 0; color: var(--sodium); animation: rise .6s .35s var(--ease) both; }
.twist p { font-size: 21px; line-height: 1.45; color: var(--chalk); max-width: 34ch; animation: rise .6s .6s var(--ease) both; }
.twist .btn { animation: rise .6s .9s var(--ease) both; align-self: flex-start; }

/* ---------- Notifiche ---------- */
/* Notifica a isola: nasce come una pillola nera in alto e si allarga con un rimbalzo. */
.banner { position: fixed; top: calc(8px + var(--safe-t)); left: 50%; z-index: 75; width: calc(100% - 20px); max-width: 460px; transform: translate(-50%, -30%) scale(.32, .4); opacity: 0; transition: transform .55s var(--spring), opacity .25s, border-radius .4s; display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 10px 16px 10px 10px; background: #000; border: 0; border-radius: 999px; color: var(--chalk); box-shadow: 0 0 0 1px rgba(244, 239, 226, .08), 0 22px 44px rgba(0, 0, 0, .65); pointer-events: none; }
.banner.show { transform: translate(-50%, 0) scale(1); opacity: 1; border-radius: 30px; pointer-events: auto; }
.banner::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--alarm); box-shadow: 0 0 0 0 rgba(214, 40, 40, .6); animation: ping 1.6s infinite; }
.banner .face { width: 48px; height: 48px; }
.banner b { display: block; font-family: var(--name); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 18px; }
.banner small { color: var(--fog); font-size: 14px; filter: blur(3.5px); }
.toast { position: fixed; left: 50%; bottom: calc(104px + var(--safe-b)); z-index: 76; transform: translate(-50%, 24px) scale(.9); opacity: 0; transition: transform .45s var(--spring), opacity .25s; max-width: min(440px, calc(100% - 32px)); width: max-content; padding: 12px 20px; background: var(--chalk); color: var(--ink); font-size: 16px; border-radius: 999px; box-shadow: 0 14px 30px rgba(0, 0, 0, .5); pointer-events: none; }
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
.loading { flex: 1; min-height: 100dvh; display: grid; place-items: center; font-family: var(--type); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: transparent; background: linear-gradient(100deg, var(--fog) 40%, var(--sodium) 50%, var(--fog) 60%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; animation: shine 2.2s linear infinite; }


/* ---------- Gesti da chat: reazioni, sospettometro, striscia live ---------- */
.ticker { grid-column: 1 / -1; overflow: hidden; margin: 2px -16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0c0c0c; }
.ticker .run { display: flex; width: max-content; animation: scroll 38s linear infinite; }
.ticker span { display: inline-flex; gap: 14px; padding: 6px 7px; font-family: var(--type); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fog); white-space: nowrap; }
.ticker b { color: var(--sodium); font-weight: 500; }
.ticker i { font-style: normal; color: #444; }
.sus { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.flags { display: flex; align-items: center; gap: 10px; }
.flags .label { margin-right: 4px; color: var(--chalk); }
.flags .scale { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.flags button { min-height: 34px; padding: 0 6px; white-space: nowrap; border-radius: 999px; border: 1px solid rgba(244, 239, 226, .2); background: rgba(17, 17, 17, .55); color: var(--fog); font-family: var(--type); font-size: 11px; letter-spacing: .04em; transition: transform .35s var(--spring), background .2s, color .2s, border-color .2s; }
.flags button.on { color: var(--chalk); border-color: var(--alarm); background: rgba(214, 40, 40, .55); }
.flags button.on:last-child { background: var(--alarm); }
.team { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.team .bar { height: 6px; background: rgba(244, 239, 226, .14); border-radius: 3px; overflow: hidden; }
.team .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sodium), var(--alarm)); transition: width .6s var(--ease); }
.sticker { position: absolute; top: 58px; right: -6px; z-index: 3; transform: rotate(9deg); background: var(--alarm); color: var(--chalk); font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 22px; line-height: .95; text-align: center; padding: 10px 14px; border-radius: 16px; box-shadow: 0 8px 18px rgba(0, 0, 0, .45); animation: pop .6s var(--spring) both; }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0 -4px; }
.reacts button { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); background: rgba(17, 17, 17, .7); border-radius: 999px; padding: 2px 8px; font-size: 14px; animation: pop .35s var(--ease) both; }
.reacts button.mine { border-color: var(--sodium); background: rgba(245, 197, 24, .16); }
.reacts small { font-family: var(--type); font-size: 11px; color: var(--chalk); }
.picker { position: fixed; z-index: 95; display: flex; gap: 2px; padding: 6px; background: rgba(30, 30, 30, .97); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 16px 36px rgba(0, 0, 0, .6); animation: pop .25s var(--ease) both; }
.picker button { width: 46px; height: 46px; border: 0; background: none; font-size: 26px; border-radius: 50%; transition: transform .15s; }
.picker button:active { transform: scale(1.3); }
.msg.typing { display: inline-flex; align-items: center; gap: 8px; }
.msg.typing::after { content: none; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--sodium); animation: hop 1s infinite var(--ease); }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }


/* ---------- Colpo di scena in formato storia ---------- */
.twist { justify-content: flex-start; padding-top: calc(28px + var(--safe-t)); cursor: pointer; }
.twist .bars { display: flex; gap: 4px; position: relative; z-index: 2; }
.twist .bars i { flex: 1; height: 3px; background: rgba(244, 239, 226, .25); border-radius: 2px; overflow: hidden; }
.twist .bars i b { display: block; height: 100%; width: 0; background: var(--chalk); }
.twist .bars i.done b { width: 100%; }
.twist .bars i.on b { animation: fill 6s linear forwards; }
.twist .tape { top: 11%; }
.twist .stage { margin-top: 30dvh; display: flex; flex-direction: column; gap: 18px; }
.twist .stage > * { animation: rise .5s var(--ease) both; }
.twist .stage h2 { margin: 0; }
.twist .stage .big { font-size: 24px; line-height: 1.4; }
.twist .stage .ticket { transform: rotate(-2deg); }
.twist .stage .ticket p { color: #2e2a22; font-size: 16px; max-width: none; }
.twist .stage .ticket h3 { color: var(--paper-ink); }
.twist .hint { position: absolute; bottom: calc(18px + var(--safe-b)); left: 0; right: 0; text-align: center; font-family: var(--type); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #6f6a60; }
.twist .btn { margin-top: 26px; }

.confetti { position: fixed; inset: 0; z-index: 96; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; animation: fall linear forwards; }

/* ---------- Tocco, movimento e piccoli gesti ---------- */
/* Tutto ciò che si preme risponde con un piccolo rimbalzo. */
.btn:not(:disabled):active, .chip:active, .pick:active, .iconbtn:active, .tabbar button:active, .flags button:active, .composer .send:not(:disabled):active { transform: scale(.94); }
.chip, .iconbtn { transition: transform .35s var(--spring), border-color .2s, background .2s; }
.chip:hover { border-color: var(--sodium); }

/* Il sospettato al centro è a fuoco, quelli ai lati restano un passo indietro. */
.card { transform: scale(.93); filter: brightness(.62) saturate(.8); transition: transform .5s var(--spring), filter .4s; }
.card.on { transform: none; filter: none; }
.card.on:active { transform: scale(.985); }
.pager i { transition: width .45s var(--spring), background .3s; }

/* Codice della partita: cinque caselle come i codici di verifica. */
.otp { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.otp input { width: 100%; aspect-ratio: 1 / 1.15; min-height: 0; padding: 0; text-align: center; border-radius: var(--r-sm); font-family: var(--type); font-weight: 500; font-size: 28px; text-transform: uppercase; caret-color: var(--sodium); }
.otp input.full { border-color: rgba(245, 197, 24, .55); color: var(--sodium); animation: pop .35s var(--spring); }
.otp.shake { animation: shake .4s; }

/* "Visualizzato" sotto la tua ultima domanda, mentre il sospettato scrive. */
.seen { align-self: flex-end; margin: -2px 4px 2px 0; font-family: var(--type); font-size: 11px; letter-spacing: .06em; color: var(--fog); animation: rise .3s var(--ease) both; }
.seen b { color: var(--sodium); font-weight: 500; }

/* Bottone che conferma: cambia testo e lampeggia. */
.btn.done { background: var(--sodium); color: var(--ink); box-shadow: none; animation: pop .4s var(--spring); }
.player.new { animation: pop .5s var(--spring) both; }
.player.me::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #32d074; box-shadow: 0 0 0 3px rgba(50, 208, 116, .2); }

/* Passaggio tra le schermate (dove il browser lo permette). */
::view-transition-old(root) { animation: vt-out .18s ease both; }
::view-transition-new(root) { animation: vt-in .32s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes nudge { 0% { transform: translateY(0); } 40% { transform: translateY(-4px) scale(1.12); } 100% { transform: none; } }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ---------- Payoff e bottone sempre a portata ---------- */
/* Payoff come una chat: visualizzato, sta scrivendo, poi compare la verità. */
.payoff { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-family: var(--type); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.payoff > span { display: inline-flex; align-items: center; gap: 6px; }
.p-seen { color: var(--fog); }
.p-seen i { font-style: normal; color: #4fb3ff; letter-spacing: -.1em; }
.p-typing { color: var(--chalk); }
.p-typing .dots i { width: 4px; height: 4px; }
.p-lying { color: var(--sodium); font-weight: 500; opacity: 0; animation: lie .5s 1.6s var(--spring) forwards; }
@keyframes lie { from { opacity: 0; transform: translateY(6px) scale(.8); } to { opacity: 1; transform: none; } }
.dock { position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); z-index: 40; width: calc(100% - 32px); max-width: 448px; transform: translateX(-50%); transition: transform .45s var(--spring), opacity .25s; }
.dock .btn { box-shadow: 0 16px 36px rgba(0, 0, 0, .6); }
.dock.away { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
.home .body { padding-bottom: calc(100px + var(--safe-b)); }

/* ---------- Sta cedendo ---------- */
.crack { display: flex; align-items: center; gap: 10px; }
.crack .label { color: var(--chalk); white-space: nowrap; }
.crack .segs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.crack .segs i { height: 6px; border-radius: 3px; background: rgba(244, 239, 226, .16); transition: background .5s; }
.crack .segs i.on { background: linear-gradient(90deg, var(--sodium), var(--alarm)); }
.crack.full .label { color: var(--alarm); }

/* ---------- Mostra una prova ---------- */
.composer .clip { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--ink-2); color: var(--chalk); display: grid; place-items: center; transition: transform .35s var(--spring), border-color .2s; }
.composer .clip svg { width: 20px; height: 20px; }
.composer .clip:disabled { opacity: .35; }
.attached { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; border-radius: var(--r-sm); background: var(--paper); color: var(--paper-ink); font-size: 14px; animation: bubble .4s var(--spring); }
.attached > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attached svg { width: 16px; height: 16px; flex: none; }
.attached button { width: 30px; height: 30px; flex: none; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .08); color: inherit; display: grid; place-items: center; }
.attached button svg { width: 14px; height: 14px; }
.msg.proof { display: flex; flex-direction: column; gap: 2px; }
.msg.proof .tag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--type); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.msg.proof .tag svg { width: 12px; height: 12px; }
.msg.proof b { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 19px; line-height: 1.1; }
.msg.proof small { font-family: var(--type); font-size: 11px; opacity: .7; margin-bottom: 4px; }
.sheet-pick { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0); transition: background .25s; }
.sheet-pick.open { background: rgba(0, 0, 0, .6); }
.sheet-pick .panel { width: 100%; max-width: 480px; max-height: 72dvh; overflow-y: auto; padding: 10px 16px calc(18px + var(--safe-b)); border-radius: var(--r-lg) var(--r-lg) 0 0; background: #181818; box-shadow: 0 -20px 40px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 12px; transform: translateY(100%); transition: transform .45s var(--spring); }
.sheet-pick.open .panel { transform: none; }
.sheet-pick .grab { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.picks { display: flex; flex-direction: column; gap: 8px; }
.proofpick { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; text-align: left; padding: 12px; border-radius: var(--r-sm); border: 0; background: var(--paper); color: var(--paper-ink); transition: transform .35s var(--spring); }
.proofpick:active { transform: scale(.97); }
.proofpick .n { font-family: var(--type); font-size: 12px; color: var(--paper-mute); }
.proofpick b { display: block; font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 18px; line-height: 1.1; }
.proofpick small { font-family: var(--type); font-size: 11px; color: var(--paper-mute); }
.proofpick.done { opacity: .62; }

/* ---------- Lavagna della notte ---------- */
.board { border-radius: var(--r); border: 1px solid var(--line); background: #0d0d0d; overflow: hidden; }
.board .scroller { overflow-x: auto; padding: 10px 0 6px; scrollbar-width: thin; }
.board .lane { display: grid; grid-template-columns: 74px auto; align-items: center; min-height: 44px; }
.board .lane + .lane { border-top: 1px dashed rgba(244, 239, 226, .07); }
.board .lane.head { min-height: 22px; }
.board .who { position: sticky; left: 0; z-index: 2; align-self: stretch; display: flex; align-items: center; padding-left: 12px; background: #0d0d0d; font-family: var(--type); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--tint, var(--fog)); }
.board .track { position: relative; height: 44px; margin: 0 22px 0 18px; }
.board .ticks2 { height: 22px; }
.board .ticks2 span { position: absolute; top: 2px; transform: translateX(-50%); font-family: var(--type); font-size: 10px; color: #6f6a60; }
.board .ticks2 span::after { content: ""; position: absolute; left: 50%; top: 16px; width: 1px; height: 180px; background: rgba(244, 239, 226, .05); }
.board .claim { position: absolute; top: 9px; height: 26px; border-radius: 999px; background: color-mix(in srgb, var(--tint, var(--fog)) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint, var(--fog)) 45%, transparent); overflow: hidden; }
.board .claim small { display: block; padding: 5px 10px; font-size: 11px; white-space: nowrap; color: var(--chalk); opacity: .8; }
.board .pin, .board .band { position: absolute; top: 9px; height: 26px; z-index: 1; border: 0; padding: 0; font-family: var(--type); font-size: 10.5px; font-weight: 500; color: var(--ink); background: var(--paper); box-shadow: 0 0 0 2px #0d0d0d; transition: transform .35s var(--spring); }
.board .pin { width: 26px; margin-left: -13px; border-radius: 50%; }
.board .band { border-radius: 8px; background: rgba(241, 234, 216, .85); }
.board .pin:active, .board .band:active { transform: scale(1.15); }
.board .pin.late { background: var(--fog); }
.board .red { background: var(--alarm); color: var(--chalk); box-shadow: 0 0 0 2px #0d0d0d, 0 0 0 5px rgba(214, 40, 40, .35); animation: ping 1.8s infinite; }
.board .legend { padding: 8px 12px 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fog); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; }
.board .legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 2px; }
.board .legend .k-claim { width: 20px; border-radius: 999px; background: rgba(163, 155, 139, .35); }
.board .legend .k-pin { background: var(--paper); }
.board .legend .k-red { background: var(--alarm); }

/* ---------- Verdetto con suspense ---------- */
.reveal { position: fixed; inset: 0; z-index: 88; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px; padding: 32px 24px calc(32px + var(--safe-b)); background: radial-gradient(ellipse at 50% 40%, #1d1708, #050505 70%); text-align: center; }
.reveal .stage { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.reveal .stage > * { animation: bubble .55s var(--spring) both; }
.reveal .who { font-family: var(--type); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--fog); }
.reveal .pickface { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.reveal .pickface .face { width: 140px; height: 180px; border-radius: var(--r-lg); }
.reveal .pickface.big .face { width: 200px; height: 260px; box-shadow: 0 0 0 3px var(--sodium), 0 30px 60px rgba(0, 0, 0, .6); }
.reveal .pickface b { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 34px; line-height: 1; }
.reveal .drum { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: clamp(42px, 13vw, 64px); line-height: .95; color: var(--sodium); animation: bubble .55s var(--spring) both, blink 1s .6s infinite !important; }
.reveal .out { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 40px; }
.reveal .out.ok { color: var(--sodium); }
.reveal .out.ko { color: var(--alarm); }

/* ---------- Notifiche ---------- */
.alerts { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r); background: linear-gradient(135deg, rgba(245, 197, 24, .12), rgba(245, 197, 24, .03)); border: 1px solid rgba(245, 197, 24, .3); }
.alerts .ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--sodium); color: var(--ink); }
.alerts .ico svg { width: 20px; height: 20px; }
.alerts b { display: block; font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 18px; }
.alerts small { color: var(--fog); font-size: 14px; line-height: 1.35; }
.alerts .btn { grid-column: 1 / -1; min-height: 46px; }
.installcard { position: relative; margin-top: 8px; }
.installcard .x { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; background: none; color: var(--fog); font-size: 24px; line-height: 1; cursor: pointer; }
.installcard > div { padding-right: 28px; }

/* ---------- La verità ---------- */
.truth { background: #070707; overflow-y: auto; padding-bottom: calc(64px + var(--safe-b)); }
.truth .bg { position: absolute; inset: 0; z-index: 0; opacity: .32; }
.truth .bg .face { position: absolute; inset: 0; filter: grayscale(.5) contrast(1.1); }
.truth .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 7, 7, .55), rgba(7, 7, 7, .35) 30%, #070707 72%); }
.truth .bars, .truth .stage, .truth .hint { position: relative; z-index: 1; }
.truth .x { position: absolute; top: calc(40px + var(--safe-t)); right: 16px; z-index: 2; }
.truth .stage { margin-top: 18dvh; }
.truth .hint { position: fixed; bottom: 0; padding: 28px 0 calc(16px + var(--safe-b)); background: linear-gradient(rgba(7, 7, 7, 0), #070707 55%); }
.truth .time { font-family: var(--type); font-weight: 500; font-size: 15px; letter-spacing: .18em; color: var(--sodium); }
.truth.cover .stage h2, .truth.end .stage h2 { color: var(--chalk); }
.truth .proofs { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.truth .proofs li { display: flex; flex-direction: column; padding: 8px 12px 8px 14px; border-radius: var(--r-sm); background: rgba(241, 234, 216, .08); border-left: 3px solid var(--fog); }
.truth .proofs li.ok { border-left-color: #32d074; }
.truth .proofs li.miss { border-left-color: var(--alarm); }
.truth .proofs b { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 17px; }
.truth .proofs small { font-family: var(--type); font-size: 11px; letter-spacing: .04em; color: var(--fog); }
.truth.dark { background: #000; }
.truth.dark .bg { opacity: .12; }
.truth.dark .stage h2 { color: var(--alarm); }
.truth.dark .time { color: var(--alarm); }
.truth.end .btn { align-self: stretch; }

@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; } }
@keyframes bubble { from { opacity: 0; transform: translateY(14px) scale(.86); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(214, 40, 40, .6); } 80%, 100% { box-shadow: 0 0 0 9px rgba(214, 40, 40, 0); } }
@keyframes shine { to { background-position: -300% 0; } }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
@keyframes fill { from { width: 0; } to { width: 100%; } }
@keyframes fall { to { transform: translateY(110dvh) rotate(720deg); opacity: .9; } }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes pulse { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1); } }
@keyframes tape { from { transform: translateX(-110%) rotate(-7deg); } to { transform: translateX(0) rotate(-7deg); } }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .intro .line, .intro .btn { opacity: 1; }
}

/* Scelta del caso: le copertine scorrono di lato, quella al centro è accesa. */
button.casecard { display: block; width: 100%; border: 0; text-align: left; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.casecard:not(.on) .stamp { opacity: 0; }
.cases.many { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 4px 20px 14px; scrollbar-width: none; overscroll-behavior-x: contain; }
.cases.many::-webkit-scrollbar { display: none; }
.cases.many .casecard { flex: 0 0 86%; scroll-snap-align: center; transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--spring), box-shadow .35s var(--ease); }
.cases.many .casecard:not(.on) { background: var(--ink-2); color: var(--chalk); box-shadow: inset 0 0 0 1px var(--line); transform: scale(.96); }
.cases.many .casecard:not(.on)::after { opacity: .35; }
.cases.many .casecard:not(.on) .label, .cases.many .casecard:not(.on) .meta { color: var(--fog); }
.cases.many .casecard:not(.on) p { color: var(--fog); }
.casecard:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; }
.pickhint { display: block; margin: 4px 0 -4px; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: -2px; }
.dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--line); transition: width .35s var(--spring), background .35s var(--ease); }
.dots i.on { width: 18px; background: var(--sodium); }
.hero .strip .face { transition: opacity .4s var(--ease); }
@media (prefers-reduced-motion: reduce) { .cases.many .casecard { transition: none; } }
button.casecard { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
.cases.many .stamp { display: none; }
.casecard .meta { max-width: 62%; }

/* ---------- Confess Party ---------- */
.casecard.partycard { background: linear-gradient(140deg, #d62828 0%, #8f1414 100%); color: var(--chalk); }
.casecard.partycard .label, .casecard.partycard .meta, .casecard.partycard p { color: #ffe9e4; }
.casecard.partycard::after { background: var(--sodium); }
.cases.many .casecard.partycard:not(.on) { background: var(--ink-2); }
.chips.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.wrap .chip { font-style: normal; font-size: 14px; text-align: left; }
.chip.on { background: var(--sodium); color: var(--paper-ink); border-color: var(--sodium); }
textarea.input { resize: none; line-height: 1.4; font: inherit; }
.writing { padding: 26px 20px; border-radius: var(--r-lg); background: var(--ink-2); border: 1px solid var(--line); display: grid; gap: 12px; }
.writing h2 { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 34px; line-height: 1; display: flex; align-items: center; gap: 10px; }
.writing .dots { display: inline-flex; gap: 5px; }
.writing .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--sodium); animation: blink 1.2s infinite; }
.writing .dots i:nth-child(2) { animation-delay: .2s; } .writing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.pavatar { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink-3); border: 1px solid var(--line); font-family: var(--title); font-weight: var(--title-w); font-size: 20px; color: var(--sodium); }
.pick .pavatar { width: 64px; height: 64px; font-size: 28px; }
.castrow { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r); background: var(--ink-2); border: 1px solid var(--line); }
.castrow.me { border-color: var(--sodium); }
.castrow b { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 22px; display: block; line-height: 1.05; }
.castrow small { color: var(--fog); font-family: var(--type); font-size: 12px; }
.castrow p { margin-top: 6px; font-size: 15px; color: #d9d2c3; }
.rounds { display: flex; gap: 6px; }
.rounds i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--type); font-size: 13px; border: 1px solid var(--line); color: var(--fog); }
.rounds i.on { background: var(--sodium); color: var(--paper-ink); border-color: var(--sodium); }
.rounds i.done { background: var(--ink-3); color: var(--chalk); }
.roundbox { padding: 20px; border-radius: var(--r-lg); background: var(--sodium); color: var(--paper-ink); display: grid; gap: 8px; }
.roundbox .label { color: #5c4a00; }
.roundbox h2 { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 40px; line-height: .95; }
.roundbox.vote { background: var(--ink-2); color: var(--chalk); border: 1px solid var(--alarm); }
.roundbox.vote .label { color: var(--alarm); }
.pcard { border-radius: var(--r-lg); background: linear-gradient(135deg, #1d1d1d, #121212); border: 1px solid var(--line); overflow: hidden; }
.pcard.culprit.open { border-color: var(--alarm); }
.pcard .reveal-btn { width: 100%; display: grid; gap: 4px; padding: 18px 20px; text-align: left; background: none; border: 0; color: var(--chalk); font: inherit; cursor: pointer; }
.pcard .reveal-btn b { font-family: var(--title); font-weight: var(--title-w); font-size: 20px; }
.pcard .inside { padding: 0 20px 20px; display: grid; gap: 10px; }
.pcard h3 { font-family: var(--title); font-weight: var(--title-w); font-stretch: var(--title-wd); font-size: 40px; line-height: .95; }
.pcard .who { padding: 10px 12px; border-radius: var(--r-sm); background: var(--ink-3); font-size: 15px; }
.pcard .who.bad { background: var(--alarm); color: #fff; font-weight: 700; }
.pcard .read { font-size: 19px; font-style: italic; color: var(--sodium); }
.psecret { padding: 12px; border-radius: var(--r-sm); border: 1px dashed var(--line); }
.psecret.now { border: 1px solid var(--sodium); background: rgba(245, 197, 24, .08); }
.psecret.locked { opacity: .5; }
.ticket.readme { border: 3px solid var(--sodium); }
.screen.party { padding-bottom: calc(40px + var(--safe-b)); }
