/* ---------- Reset & variabili ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* 100svh (small viewport height) invece di dvh: su iOS Safari la dynamic
   viewport height ha calcoli inconsistenti con la toolbar che appare/
   scompare, e può far "sparire" contenuto dietro la barra degli indirizzi.
   svh è la misura più prudente: la pagina non eccede mai l'area visibile. */
html, body {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Courier New", ui-monospace, Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}
ul, ol { list-style: none; margin: 0; padding: 0; }
button, input { font-family: inherit; }
img { max-width: 100%; display: block; }

:root {
  --bg: #05070a;
  --bg-panel: #0b1016;
  --fg: #c9f7d8;
  --fg-dim: #6f9d82;
  --accent: #39ff88;
  --accent-dim: #1f8a4c;
  --alert: #ff4d4d;
  --alert-dim: #7a1f1f;
  --border: #17351f;
  --font-display: "Orbitron", "Courier New", monospace;
  --radius: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Sfondo CRT globale ---------- */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.18) 0px,
      rgba(0, 0, 0, 0.18) 1px,
      transparent 2px,
      transparent 3px
    );
  mix-blend-mode: multiply;
  opacity: 0.5;
}
.crt-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

/* ---------- Interferenza tra schermate (stile cambio canale) ---------- */
.app-glitching { animation: app-glitch-jitter 0.32s steps(2, end); }
.app-glitching::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 55;
  background: repeating-linear-gradient(
    0deg,
    rgba(57, 255, 136, 0.18) 0px,
    rgba(57, 255, 136, 0.18) 2px,
    transparent 3px,
    transparent 6px
  );
  mix-blend-mode: screen;
  pointer-events: none;
  animation: app-glitch-bars 0.32s steps(3, end);
}
@keyframes app-glitch-jitter {
  0% { transform: translate(0, 0); filter: none; }
  10% { transform: translate(-6px, 2px); filter: hue-rotate(15deg) saturate(2); }
  20% { transform: translate(4px, -3px); filter: hue-rotate(-20deg) contrast(1.4); }
  32% { transform: translate(-3px, 0); filter: none; }
  45% { transform: translate(5px, 3px); filter: hue-rotate(10deg); }
  55% { transform: translate(0, -2px); filter: contrast(1.6) brightness(1.3); }
  68% { transform: translate(-4px, 0); filter: none; }
  80% { transform: translate(2px, 2px); filter: hue-rotate(-10deg); }
  100% { transform: translate(0, 0); filter: none; }
}
@keyframes app-glitch-bars {
  0%, 100% { opacity: 0; }
  20%, 60% { opacity: 0.55; }
  40% { opacity: 0.15; }
}
@media (prefers-reduced-motion: reduce) {
  .app-glitching, .app-glitching::after { animation: none; }
}

/* ---------- Layout schermate ---------- */
#app {
  height: 100vh;
  height: 100svh;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(16px + var(--safe-top)) 18px calc(64px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.hide-social-banner #app { padding-bottom: calc(16px + var(--safe-bottom)); }
/* Quando compare l'avviso "installa l'app" si aggiunge la sua altezza
   (~56px) allo spazio già riservato in fondo, altrimenti coprirebbe l'ultimo
   pezzo di contenuto della schermata attiva. */
body.show-install-banner #app { padding-bottom: calc(120px + var(--safe-bottom)); }
body.hide-social-banner.show-install-banner #app { padding-bottom: calc(72px + var(--safe-bottom)); }

/* Ogni schermata è il proprio contenitore di scroll: la pagina/documento non
   scorre mai, ma una singola schermata con più contenuto di quanto ne entri
   (es. classifica lunga) può scorrere al suo interno senza spostare il resto. */
.screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}
.hidden { display: none !important; }

/* Risultati: solo la lista della classifica scorre, il resto resta fermo. */
#screen-results {
  overflow: hidden;
}
#screen-results > .panel:first-child { flex-shrink: 0; }
#screen-results > .panel:last-child {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Gioco: HUD, istruzioni e bottone restano fermi, scorre solo la griglia
   videocamere se ce ne sono più di quante ne entrano a schermo. */
#screen-game {
  overflow: hidden;
}
#screen-game > .hud,
#screen-game > .game-instructions,
#screen-game > #btn-end-mission { flex-shrink: 0; }

/* ---------- Intro ---------- */
#screen-intro { justify-content: center; align-items: center; text-align: center; padding: 0 8px; }

/* ---------- Registrazione ---------- */
#screen-register { justify-content: center; }
.badge-alert {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--alert);
  border: 1px solid var(--alert-dim);
  padding: 6px 14px;
  border-radius: 999px;
  animation: blink 1.6s ease-in-out infinite;
}
.title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 10vw, 3.2rem);
  letter-spacing: 0.05em;
  margin: 10px 0 0;
  color: var(--fg);
  text-shadow: 0 0 12px rgba(57, 255, 136, 0.6);
}
.title-nowrap { white-space: nowrap; }
.title-accent { color: var(--accent); }
.intro-text { color: var(--fg-dim); line-height: 1.6; max-width: 40ch; }
#btn-start { width: 100%; margin-top: 8px; }

/* ---------- Banner social (fisso in fondo alla pagina) ---------- */
.sound-toggle {
  position: fixed;
  top: calc(10px + var(--safe-top));
  right: 10px;
  z-index: 70;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(11, 16, 22, 0.85);
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sound-toggle:active { transform: scale(0.95); }
.sound-toggle.is-muted { color: var(--fg-dim); opacity: 0.7; }

/* Nascosto di default (prima ancora che app.js giri): richiede un giocatore
   autenticato, quindi non deve comparire su intro/registrazione. Si mostra
   solo quando il body porta la classe show-dossier-toggle (vedi app.js), e
   resta comunque nascosto durante il feed di una videocamera. */
.dossier-toggle {
  position: fixed;
  top: calc(10px + var(--safe-top));
  left: 10px;
  z-index: 70;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(11, 16, 22, 0.85);
  color: var(--accent);
  font-size: 1.05rem;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
body.show-dossier-toggle.dossier-available .dossier-toggle { display: flex; }
body:has(#feed-overlay:not(.hidden)) .dossier-toggle { display: none; }
.dossier-toggle:active { transform: scale(0.95); }

/* Wrapper comune per le barre fisse in fondo alla pagina (avviso di
   installazione + banner social): ciascuna può comparire/sparire in modo
   indipendente, il wrapper si adatta di conseguenza senza calcoli manuali
   sull'altezza dell'una o dell'altra. */
.bottom-bars {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 72;
  display: flex;
  flex-direction: column;
}

body.hide-social-banner .social-banner { display: none; }
.social-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 12px calc(6px + var(--safe-bottom));
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
}
.install-banner {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: var(--bg-panel);
  border-top: 1px solid var(--accent-dim);
}
body.show-install-banner .install-banner { display: flex; }
.install-banner-icon { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; }
.install-banner-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.install-banner-text strong { font-family: var(--font-display); font-size: 0.75rem; color: var(--fg); }
.install-banner-text span { font-size: 0.68rem; color: var(--fg-dim); }
.install-banner-cta {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--accent-dim);
  background: rgba(57, 255, 136, 0.1);
  color: var(--accent);
  cursor: pointer;
}
.install-banner-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-dim);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}

.social-banner-text { font-size: 0.6rem; line-height: 1; color: var(--fg-dim); }
.social-links { display: flex; gap: 10px; justify-content: center; }
.social-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-dim);
  border-radius: 50%;
  color: var(--accent);
}
.social-icon svg { width: 16px; height: 16px; }
.social-icon:active { transform: scale(0.94); }

/* ---------- Bottoni ---------- */
.btn {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  min-height: 50px;
  padding: 0 22px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-dim);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: rgba(57, 255, 136, 0.08);
  box-shadow: 0 0 16px rgba(57, 255, 136, 0.25);
}
.btn-primary:hover, .btn-primary:focus-visible { box-shadow: 0 0 22px rgba(57, 255, 136, 0.45); }
.btn-secondary { color: var(--fg-dim); border-color: var(--border); align-self: center; margin-top: 8px; }

/* ---------- Pannelli / form ---------- */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: 0.85rem; color: var(--fg-dim); }
.field input[type="text"], .field input[type="email"] {
  background: #050a08;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  color: var(--fg);
  font-size: 1rem;
  min-height: 46px;
}
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Chrome/Safari forzano uno sfondo chiaro sui campi autocompilati (es. "nome")
   con uno pseudo-stato speciale che il normale CSS non può sovrascrivere:
   questo è il trucco standard per farlo restare scuro come il resto del form. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--fg);
  -webkit-box-shadow: 0 0 0 1000px #050a08 inset;
  box-shadow: 0 0 0 1000px #050a08 inset;
  transition: background-color 5000s ease-in-out 0s;
}
.field-checkbox { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 0.8rem; line-height: 1.4; }
.field-checkbox a { color: var(--accent); }
.field-checkbox input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }
.form-error { color: var(--alert); font-size: 0.8rem; min-height: 1.2em; margin: 0 0 10px; }
#form-register button[type="submit"] { width: 100%; }

/* ---------- HUD di gioco ---------- */
.hud { display: flex; gap: 14px; }
.hud-item {
  flex: 1;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hud-label { font-size: 0.65rem; letter-spacing: 0.12em; color: var(--fg-dim); }
.hud-value { font-family: var(--font-display); font-size: 1.4rem; color: var(--accent); }
.game-instructions { color: var(--fg-dim); font-size: 0.82rem; line-height: 1.5; margin: 0; }

/* ---------- Griglia videocamere ---------- */
.camera-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
}
@media (min-width: 420px) {
  .camera-grid { grid-template-columns: repeat(3, 1fr); }
}

.camera-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0a0f0c;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  color: var(--fg);
}
.camera-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
      100deg,
      rgba(120, 255, 170, 0.06) 0px,
      rgba(120, 255, 170, 0.06) 2px,
      transparent 3px,
      transparent 6px
    ),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0px, transparent 2px, transparent 4px);
  animation: noise-shift 0.6s steps(4) infinite;
  opacity: 0.6;
}
.camera-tile .cam-label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  z-index: 2;
  text-shadow: 0 1px 3px black;
}
.camera-tile .cam-rec {
  position: absolute;
  right: 6px;
  top: 6px;
  font-size: 0.6rem;
  color: var(--alert);
  z-index: 2;
  animation: blink 1.4s ease-in-out infinite;
}
/* La camera esce dallo stato "cieco": il rumore si ferma, resta uno stato visibile */
.camera-tile.is-scanned::before { animation-play-state: paused; opacity: 0.2; }

/* Layout condiviso dei badge di stato. Il testo arriva da data-status-label
   (impostato via JS con la stringa già tradotta), non da un content: fisso,
   per restare compatibile col sistema di traduzione multilingua. */
.camera-tile.cam-pending::after,
.camera-tile.cam-empty::after,
.camera-tile.cam-correct::after,
.camera-tile.cam-wrong::after {
  content: attr(data-status-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  z-index: 3;
}

/* Avvistamento rilevato, in attesa che l'utente indovini: resta accessibile */
.camera-tile.cam-pending {
  border-color: var(--accent);
  animation: pulse-border 1.2s ease-in-out infinite;
}
.camera-tile.cam-pending::after {
  color: var(--accent);
  background: rgba(0, 0, 0, 0.45);
}

/* Stati finali: camera non più accessibile */
.camera-tile.cam-empty,
.camera-tile.cam-correct,
.camera-tile.cam-wrong { opacity: 0.7; }

.camera-tile.cam-empty::after { color: var(--fg-dim); background: rgba(0, 0, 0, 0.55); }
.camera-tile.cam-correct::after {
  color: var(--accent);
  background: rgba(0, 0, 0, 0.55);
  text-shadow: 0 0 8px rgba(57, 255, 136, 0.6);
}
.camera-tile.cam-wrong::after {
  color: var(--alert);
  background: rgba(0, 0, 0, 0.55);
  text-shadow: 0 0 8px rgba(255, 77, 77, 0.6);
}

.camera-tile:disabled { pointer-events: none; }
.camera-tile:disabled:not(.is-scanned) { opacity: 0.35; }

/* ---------- Overlay feed videocamera ---------- */
.feed-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 4, 3, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
  overflow-y: auto;
}
.feed-frame {
  width: 100%;
  max-width: 440px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}
.feed-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--fg-dim);
  margin-bottom: 8px;
}
.feed-rec { color: var(--alert); animation: blink 1.2s ease-in-out infinite; }
.feed-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: black;
}
#feed-canvas, #feed-video { width: 100%; height: 100%; display: block; object-fit: cover; background: black; }
.feed-alien {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 55%;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(57, 255, 136, 0.7));
  animation: glitch-in 2.4s ease-in-out infinite;
}
.feed-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0px, transparent 2px, transparent 4px);
  pointer-events: none;
}
.feed-status { text-align: center; font-size: 0.85rem; color: var(--fg-dim); min-height: 1.4em; margin: 10px 0 0; }
.feed-question { font-size: 0.8rem; color: var(--fg-dim); text-align: center; margin: 0 0 10px; }
.time-bar { width: 100%; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 10px; }
.time-bar-fill { height: 100%; width: 100%; background: var(--accent); }
@keyframes time-drain { from { width: 100%; } to { width: 0%; } }
.options-list { display: grid; grid-template-columns: 1fr; gap: 10px; width: 100%; max-width: 440px; }
@media (min-width: 460px) {
  .options-list { grid-template-columns: 1fr 1fr; }
}
.option-btn {
  min-height: 48px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--fg);
  font-size: 0.85rem;
  padding: 10px 14px;
  cursor: pointer;
}
.option-btn:active { transform: scale(0.98); }
.option-btn.is-correct { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px rgba(57, 255, 136, 0.4); }
.option-btn.is-wrong { border-color: var(--alert); color: var(--alert); box-shadow: 0 0 12px rgba(255, 77, 77, 0.35); }
.option-btn:disabled { pointer-events: none; opacity: 0.85; }

/* ---------- Popup esito risposta ---------- */
.result-popup {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(2, 4, 3, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.result-popup-card {
  width: 100%;
  max-width: 340px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.result-popup-icon { font-size: 3rem; line-height: 1; }
.result-popup-text { font-family: var(--font-display); font-size: 1rem; color: var(--fg); margin: 0; }
.result-popup-card.is-correct {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(57, 255, 136, 0.35);
}
.result-popup-card.is-correct .result-popup-icon { color: var(--accent); text-shadow: 0 0 16px rgba(57, 255, 136, 0.7); }
.result-popup-card.is-wrong {
  border-color: var(--alert);
  box-shadow: 0 0 30px rgba(255, 77, 77, 0.3);
}
.result-popup-card.is-wrong .result-popup-icon { color: var(--alert); text-shadow: 0 0 16px rgba(255, 77, 77, 0.6); }
.result-popup-card #btn-result-continue { width: 100%; }

/* ---------- Risultati ---------- */
.results-score-label {
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  margin: 0;
}
.results-score {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--accent);
  text-align: center;
  text-shadow: 0 0 16px rgba(57, 255, 136, 0.5);
}
.results-rank { text-align: center; color: var(--fg-dim); font-size: 0.85rem; margin: 6px 0 0; }
.results-stats { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--fg-dim); margin-top: 12px; }
.results-stats li { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding: 4px 0; }
.result-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.result-actions .btn { width: 100%; margin-top: 0; align-self: stretch; }

.share-row { display: flex; flex-direction: column; gap: 8px; }
.share-row-label { font-size: 0.75rem; color: var(--fg-dim); text-align: center; }
.share-icons { display: flex; gap: 8px; }
.share-icon {
  flex: 1;
  text-align: center;
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  color: var(--fg);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}
.share-icon:active { transform: scale(0.96); }
.leaderboard-list { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; overflow-y: auto; min-height: 0; flex: 1; }
.leaderboard-list li { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 6px; background: rgba(57, 255, 136, 0.04); }
.leaderboard-list li:first-child { color: var(--accent); }

/* ---------- Dossier ---------- */
.dossier-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.dossier-panel-header .panel-title { margin: 0; }
.dossier-back-btn { align-self: auto; margin-top: 0; min-height: 38px; padding: 0 16px; font-size: 0.72rem; }

.dossier-intro { color: var(--fg-dim); font-size: 0.85rem; margin: 0 0 4px; }
.dossier-progress { color: var(--accent); font-size: 0.78rem; margin: 0 0 14px; letter-spacing: 0.04em; }
.dossier-hint { color: var(--fg-dim); font-size: 0.82rem; }

.dossier-list { display: flex; flex-direction: column; gap: 10px; }
.dossier-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
}
.dossier-card.is-locked { opacity: 0.6; }
.dossier-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dossier-card-category {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.dossier-card-lock { font-size: 0.72rem; color: var(--fg-dim); white-space: nowrap; }
.dossier-card-title { font-family: var(--font-display); font-size: 0.85rem; color: var(--fg); margin: 8px 0 0; }
.dossier-card.is-locked .dossier-card-title { color: var(--fg-dim); }
.dossier-card-body {
  font-size: 0.82rem;
  color: var(--fg-dim);
  line-height: 1.5;
  margin-top: 8px;
  display: none;
}
.dossier-card.is-open .dossier-card-body { display: block; }

/* ---------- Animazioni ---------- */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes noise-shift { 0% { transform: translate(0, 0); } 100% { transform: translate(-4px, 3px); } }
@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 6px rgba(57, 255, 136, 0.25); }
  50% { box-shadow: 0 0 16px rgba(57, 255, 136, 0.55); }
}
@keyframes glitch-in {
  0%, 40% { opacity: 0; transform: translateX(0); }
  45% { opacity: 0.9; transform: translateX(-3px); }
  48% { opacity: 0.2; transform: translateX(3px); }
  52% { opacity: 0.9; transform: translateX(0); }
  70% { opacity: 0.9; }
  85%, 100% { opacity: 0; }
}

@media (min-width: 768px) {
  #app { max-width: 720px; }
  #screen-results { flex-direction: row; align-items: flex-start; }
  #screen-results .panel { flex: 1; }
}
