/* =========================
   VIKTOR ON DEMAND – STYLE v4 FIXED
   Elegante / dark luxury + onda sonora
   + Grey Code branding + Easter egg + Modal + App enter
   + Background glitch visibile + About button sotto Viktor
   ========================= */

/* --- VARIABILI COLORE --- */
:root{
  --bg-0: #050507;
  --bg-1: #0b0b12;
  --bg-2: #111124;
  --line: rgba(255,255,255,0.07);

  --text-0: #F7F6F2;
  --text-1: rgba(247,246,242,0.78);

  --gold: #D8B56A;
  --bronze: #B5844B;
  --accent: #D75CE2; /* Modificato per accessibilità contrasto WCAG AA */

  --glow-soft: 0 0 30px rgba(215,92,226,0.12);
  --glow-gold: 0 0 28px rgba(216,181,106,0.16);
  --pink: #c01668;

  /* Definizioni dei Font Stack */
  --font-serif: 'Cinzel', Georgia, serif;
  --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html{
  scroll-behavior: smooth;
}

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top-anchor{
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}

body{
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-0);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 48px 18px 112px;
  position: relative;

  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(216,181,106,0.10), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(192,74,201,0.10), transparent 60%),
    linear-gradient(180deg, #040406 0%, #07070d 45%, #040406 100%);
}

.app-dock{
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 900;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(560px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid rgba(216,181,106,0.22);
  border-radius: 999px;
  background:
    radial-gradient(120% 180% at 0% 0%, rgba(192,74,201,0.18), transparent 58%),
    radial-gradient(120% 180% at 100% 0%, rgba(216,181,106,0.14), transparent 58%),
    rgba(7,7,14,0.88);
  box-shadow:
    0 18px 60px rgba(0,0,0,0.72),
    0 0 28px rgba(192,74,201,0.18),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(14px);
}

.app-dock a{
  flex: 1;
  min-width: 0;
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 999px;
  color: rgba(247,246,242,0.78);
  text-decoration: none;
  font-size: clamp(0.62rem, 1.6vw, 0.76rem);
  font-weight: 850;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease, box-shadow .25s ease;
}

.app-dock a:hover,
.app-dock a:focus-visible{
  color: var(--text-0);
  background:
    linear-gradient(180deg, rgba(216,181,106,0.16), rgba(192,74,201,0.12)),
    rgba(18,18,32,0.82);
  box-shadow: 0 0 18px rgba(216,181,106,0.14);
}

/* =========================
   GREY CODE – SFONDO GLITCH
   ========================= */
body::after{
  content: "";
  position: fixed;
  inset: 0;
  background: url("images/bg-glitch.webp") center/cover no-repeat;
  opacity: 0.50;           /* regola intensità */
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  filter: blur(1px);
}

/* --- CONTENITORE APP --- */
#app{
  width: 100%;
  max-width: 1120px;
  position: relative;
  z-index: 1;
  overflow: hidden;

  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 35%),
    var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px;
  box-shadow:
    0 18px 60px rgba(0,0,0,0.65),
    var(--glow-soft),
    var(--glow-gold);
  backdrop-filter: blur(6px);
}

.top-nav{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: -10px 0 24px 0;
  flex-wrap: wrap;
}

.top-nav a{
  color: rgba(247,246,242,0.66);
  text-decoration: none;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 750;
  padding: 8px 10px;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.top-nav a:hover{
  color: var(--gold);
  border-color: rgba(216,181,106,0.55);
}

/* --- TRANSIZIONE DI AVVIO --- */
#app.app-enter{
  animation: appEnter 700ms ease-out both;
}
@keyframes appEnter{
  0%   { opacity: 0; transform: translateY(10px) scale(0.98); filter: blur(2px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* --- LAYOUT DUE COLONNE --- */
.home-screen{
  display: flex;
  gap: 32px;
  align-items: flex-start;
  scroll-margin-top: 24px;
}

#left-panel{
  flex: 1;
  min-width: 0;
}

#right-panel{
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

/* =========================
   TESTI
   ========================= */
h1{
  margin: 0 0 8px 0;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.86;
  letter-spacing: 0;
  font-weight: 950;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(192,74,201,0.25),
    0 0 26px rgba(216,181,106,0.12);
}

.brand-title{
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(238,216,184,0.82);
  background:
    linear-gradient(180deg, #09090b 0%, #0b080a 36%, #8f123d 66%, #d21b73 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 2px 0 rgba(255,255,255,0.18))
    drop-shadow(0 0 18px rgba(215,92,226,0.24));
}

.brand-title span{
  letter-spacing: 0;
  transform: scaleX(1.04);
  transform-origin: left center;
}

.brand-title em{
  color: var(--gold);
  -webkit-text-stroke: 0;
  background: none;
  filter: none;
  text-shadow:
    0 0 14px rgba(216,181,106,0.32),
    0 0 24px rgba(192,74,201,0.16);
}

h1 span,
h1 em{
  display: block;
  font-style: normal;
}

h1 em{
  margin-top: 6px;
  font-size: 0.48em;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.kicker,
.section-label{
  margin: 0 0 10px 0;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

/* --- BRAND CHIP GREY CODE --- */
.brand-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 10px 0;
  padding: 4px 10px;
  font-size: 0.78rem;
  letter-spacing: 1.4px;
  font-weight: 800;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;

  color: var(--gold);
  border: 1px solid rgba(216,181,106,0.35);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(216,181,106,0.12), rgba(192,74,201,0.08));
  box-shadow:
    0 0 18px rgba(216,181,106,0.15),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  opacity: 0.9;
  transition: transform .08s ease, border-color .2s ease, box-shadow .25s ease, opacity .2s ease;
}

.brand-chip:hover{
  border-color: var(--accent);
  box-shadow:
    0 0 22px rgba(215,92,226,0.25),
    inset 0 0 0 1px rgba(255,255,255,0.06);
  opacity: 1;
  transform: translateY(-0.5px);
}

.brand-chip:active{
  transform: translateY(0);
}

.subtitle{
  margin: 0 0 26px 0;
  color: var(--text-1);
  font-size: 1.12rem;
  max-width: 580px;
  line-height: 1.48;
}
.subtitle::after{
  content: "";
  display: block;
  margin-top: 14px;
  height: 1px;
  width: 160px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}

.hero-actions,
.book-actions{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 18px 0;
}

.entry-map{
  width: min(680px, 100%);
  margin: 0 0 24px 0;
  padding: 16px;
  border: 1px solid rgba(216,181,106,0.22);
  border-radius: 18px;
  background:
    radial-gradient(140% 190% at 0% 0%, rgba(216,181,106,0.10), transparent 58%),
    radial-gradient(140% 180% at 100% 0%, rgba(192,74,201,0.12), transparent 56%),
    rgba(8,8,16,0.72);
  box-shadow:
    0 14px 34px rgba(0,0,0,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.03);
}

.entry-map-copy span{
  display: block;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 1.6px;
  line-height: 1.2;
  text-transform: uppercase;
}

.entry-map-copy p{
  max-width: 540px;
  margin: 6px 0 14px 0;
  color: var(--text-1);
  font-size: 0.96rem;
  line-height: 1.45;
}

.entry-map-links{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.entry-map-links a{
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(216,181,106,0.30);
  border-radius: 999px;
  background: rgba(5,5,12,0.66);
  color: rgba(247,246,242,0.86);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.9px;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .08s ease, border-color .25s ease, box-shadow .25s ease, color .2s ease;
}

.entry-map-links a:hover,
.entry-map-links a:focus-visible{
  transform: translateY(-1px);
  border-color: rgba(192,74,201,0.66);
  color: var(--text-0);
  box-shadow: 0 0 20px rgba(192,74,201,0.18);
}

.install-teaser{
  width: min(680px, 100%);
  margin: -10px 0 28px 0;
  padding: 14px 16px;
  border: 1px solid rgba(192,74,201,0.34);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(216,181,106,0.10), rgba(192,74,201,0.13) 56%, rgba(5,5,12,0.78)),
    rgba(8,8,16,0.78);
  box-shadow:
    0 14px 34px rgba(0,0,0,0.40),
    inset 0 0 0 1px rgba(255,255,255,0.035);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.install-teaser span{
  display: block;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.install-teaser p{
  margin: 5px 0 0;
  color: var(--text-0);
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  line-height: 1.35;
  font-weight: 750;
}

.install-teaser a{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid rgba(216,181,106,0.50);
  border-radius: 999px;
  background: rgba(5,5,12,0.68);
  color: var(--text-0);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.9px;
  box-shadow: 0 0 18px rgba(192,74,201,0.14);
  transition: transform .08s ease, border-color .25s ease, box-shadow .25s ease;
}

.install-teaser a:hover,
.install-teaser a:focus-visible{
  transform: translateY(-1px);
  border-color: rgba(192,74,201,0.72);
  box-shadow: 0 0 22px rgba(192,74,201,0.22);
}

.primary-link,
.ghost-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 850;
  letter-spacing: 0.7px;
  font-size: 0.84rem;
  transition: transform .08s ease, box-shadow .25s ease, border-color .25s ease, opacity .2s ease;
}

.primary-link{
  color: var(--text-0);
  border: 1px solid rgba(216,181,106,0.56);
  background:
    radial-gradient(160% 220% at 0% 0%, rgba(216,181,106,0.18), transparent 55%),
    radial-gradient(140% 200% at 100% 0%, rgba(192,74,201,0.18), transparent 60%),
    linear-gradient(180deg, #201a25, #11111d);
  box-shadow:
    0 0 26px rgba(216,181,106,0.16),
    0 10px 26px rgba(0,0,0,0.65);
}

.ghost-link{
  color: var(--gold);
  border: 1px solid rgba(192,74,201,0.36);
  background: rgba(10,10,18,0.62);
}

.primary-link:hover,
.ghost-link:hover{
  transform: translateY(-1px);
  border-color: rgba(192,74,201,0.72);
  box-shadow:
    0 0 30px rgba(192,74,201,0.25),
    0 10px 26px rgba(0,0,0,0.7);
}

.needs-link{
  opacity: 0.7;
  cursor: not-allowed;
}

.intro-panel{
  margin-top: 30px;
  padding: 20px;
  border: 1px solid rgba(216,181,106,0.12);
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(192,74,201,0.11), transparent 58%),
    rgba(7,7,15,0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    0 8px 28px rgba(0,0,0,0.42);
}

.intro-panel h2,
.book-copy h2,
.grey-code-strip h2{
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 0 0 10px 0;
  line-height: 1.05;
  letter-spacing: 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.intro-panel p,
.book-copy p,
.grey-code-strip p{
  color: var(--text-1);
  line-height: 1.62;
  margin: 0 0 12px 0;
}

.intro-panel strong,
.book-copy strong{
  color: var(--text-0);
}

/* =========================
   BOTTONI AUDIO
   ========================= */
#buttons{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.audio-btn{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  background:
    radial-gradient(140% 180% at 0% 0%, rgba(216,181,106,0.10), transparent 55%),
    linear-gradient(180deg, var(--bg-2), #0d0d1b);
  color: var(--text-0);
  border: 1px solid rgba(216,181,106,0.18);
  padding: 14px 18px;
  border-radius: 999px;
  font-weight: 650;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform .08s ease, border-color .2s ease, box-shadow .25s ease, background .25s ease;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.02),
    0 8px 24px rgba(0,0,0,0.55);

  overflow: hidden;
}

.audio-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(216,181,106,0.45);
  box-shadow:
    0 0 26px rgba(216,181,106,0.18),
    0 12px 30px rgba(0,0,0,0.6);
}

/* pallino alive */
.audio-btn::before{
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgba(216,181,106,0.55);
  box-shadow: 0 0 10px rgba(216,181,106,0.45);
  opacity: 0.7;
}

/* ripple click */
.audio-btn::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      120px 120px at var(--x, 50%) var(--y, 50%),
      rgba(216,181,106,0.35),
      rgba(192,74,201,0.25) 40%,
      transparent 60%
    );
  transform: scale(0.6);
}
.audio-btn.spark::after{
  opacity: 1;
  animation: sparkRipple 0.55s ease-out forwards;
}
@keyframes sparkRipple{
  0%   { transform: scale(0.5); opacity: 0.9; }
  70%  { transform: scale(1.2); opacity: 0.45; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* onda sonora */
.wave{
  width: 18px;
  height: 12px;
  display: inline-block;
  position: relative;
}
.wave::before,
.wave::after{
  content: "";
  position: absolute;
  bottom: 0;
  width: 3px;
  border-radius: 3px;
  background: rgba(216,181,106,0.9);
  box-shadow: 0 0 8px rgba(216,181,106,0.55);
  animation: none;
}
.wave::before{ left: 4px; height: 6px; }
.wave::after{ left: 11px; height: 10px; }

/* quando suona */
.audio-btn.playing .wave::before,
.audio-btn.playing .wave::after{
  background: var(--accent);
  box-shadow: 0 0 10px rgba(192,74,201,0.75);
  animation: wavePulse 0.45s infinite ease-in-out alternate;
}
.audio-btn.playing .wave::after{ animation-delay: 0.12s; }
@keyframes wavePulse{
  from{ transform: scaleY(0.6); opacity: 0.7; }
  to  { transform: scaleY(1.4); opacity: 1; }
}

.audio-btn.playing{
  border-color: rgba(192,74,201,0.7);
  background:
    radial-gradient(140% 200% at 0% 0%, rgba(192,74,201,0.18), transparent 55%),
    linear-gradient(180deg, #15152b, #0d0d1a);
  box-shadow:
    0 0 32px rgba(192,74,201,0.35),
    0 0 22px rgba(216,181,106,0.22),
    0 12px 34px rgba(0,0,0,0.7);
}
.audio-btn.playing::before{
  background: var(--accent);
  box-shadow: 0 0 14px rgba(192,74,201,0.75);
  opacity: 1;
}

/* =========================
   STATUS
   ========================= */
#status{
  margin-top: 20px;
  font-size: 0.98rem;
  color: var(--text-1);
  min-height: 1.2em;
}
#status.status-pop{
  color: var(--text-0);
  text-shadow:
    0 0 10px rgba(216,181,106,0.55),
    0 0 16px rgba(192,74,201,0.45);
  animation: statusPop 0.7s ease-out;
}
@keyframes statusPop{
  0%   { opacity: 0.2; transform: translateY(3px); }
  100% { opacity: 1;   transform: translateY(0); }
}

/* =========================
   VIKTOR WRAP + HALO + FLOAT
   ========================= */
.viktor-wrap{
  position: relative;
  display: inline-block;
  isolation: isolate;
  text-align: center;
}

.viktor-halo{
  position: absolute;
  inset: -10% -15%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, rgba(216,181,106,0.18), transparent 55%),
    radial-gradient(circle at 70% 65%, rgba(192,74,201,0.20), transparent 60%);
  filter: blur(35px);
  opacity: 0.45;
  transform: scale(0.95);
  transition: opacity .35s ease, transform .35s ease;
}

#app.is-playing .viktor-halo{
  opacity: 0.9;
  transform: scale(1.05);
  animation: haloPulse 1.2s infinite ease-in-out;
}
@keyframes haloPulse{
  0%   { transform: scale(0.98); opacity: 0.75; }
  50%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(0.98); opacity: 0.75; }
}

#viktor-img{
  width: 360px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  max-width: 100%;
  opacity: 0.9;
  filter: saturate(0.9) contrast(1.15) drop-shadow(0 12px 30px rgba(0,0,0,0.6));
  border-radius: 14px;
  animation: viktorFloat 5.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes viktorFloat{
  0%,100% { transform: translateY(0px); }
  50%     { transform: translateY(-6px); }
}

#viktor-tip{
  margin-top: 12px;
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  color: var(--gold);
  opacity: 0.85;
  animation: tipFade 3.2s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes tipFade{
  0%   { opacity: 0.5; transform: translateY(2px); }
  100% { opacity: 1;   transform: translateY(-1px); }
}

/* Easter egg */
.pamela-mark{
  margin-top: 8px;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.8px;
  color: rgba(247,246,242,0.65);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
  text-transform: none;
}
.viktor-wrap:hover .pamela-mark{
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   MICRO-GLITCH + GLOW APP QUANDO PARLA
   ========================= */
#app::after{
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(192,74,201,0.16) 45%,
      transparent 55%,
      rgba(216,181,106,0.18) 70%,
      transparent 100%);
  mix-blend-mode: screen;
  filter: blur(8px);
  transform: translateX(-30%);
}
#app.is-playing::after{
  opacity: 1;
  animation: edgeGlitch 1.6s infinite ease-in-out;
}
@keyframes edgeGlitch{
  0%   { transform: translateX(-35%); opacity: 0.15; }
  40%  { transform: translateX(10%);  opacity: 0.28; }
  70%  { transform: translateX(55%);  opacity: 0.20; }
  100% { transform: translateX(110%); opacity: 0.12; }
}

#app::before{
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -35%;
  height: 60%;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(60% 100% at 50% 100%,
      rgba(192,74,201,0.35),
      transparent 70%);
  filter: blur(40px);
  transform: translateY(30px);
}
#app.is-playing::before{
  opacity: 1;
  animation: upGlow 1.4s ease-in-out infinite alternate;
}
@keyframes upGlow{
  0%   { transform: translateY(35px); opacity: 0.55; }
  100% { transform: translateY(0px);  opacity: 1; }
}

/* =========================
   ORACOLO
   ========================= */
#oracle{
  position: relative;
  margin-top: 34px;
  padding: clamp(22px, 3vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(216,181,106,0.22);
  border-radius: 22px;
  display: grid;
  gap: 18px;
  justify-items: start;
  background:
    radial-gradient(80% 110% at 0% 0%, rgba(192,74,201,0.22), transparent 54%),
    radial-gradient(70% 100% at 100% 20%, rgba(216,181,106,0.13), transparent 52%),
    linear-gradient(145deg, rgba(23,18,35,0.86), rgba(6,7,15,0.95) 58%, rgba(15,10,23,0.98));
  box-shadow:
    0 20px 70px rgba(0,0,0,0.62),
    inset 0 0 0 1px rgba(255,255,255,0.03),
    0 0 32px rgba(192,74,201,0.13);
}

#oracle::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(216,181,106,0.17), transparent);
  transform: translateX(-120%);
  animation: oracleScan 5.5s ease-in-out infinite;
  opacity: 0.45;
}

#oracle::after{
  content: "";
  position: absolute;
  left: clamp(18px, 3vw, 32px);
  right: clamp(18px, 3vw, 32px);
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216,181,106,0.65), rgba(192,74,201,0.62), transparent);
  opacity: 0.72;
}

.oracle-copy{
  position: relative;
  z-index: 1;
  max-width: 760px;
}

#oracle .section-label{
  margin-bottom: 8px;
}

.oracle-status{
  display: inline-flex;
  margin: 0 0 12px 0;
  padding: 6px 12px;
  border: 1px solid rgba(216,181,106,0.32);
  border-radius: 999px;
  background: rgba(6,6,14,0.62);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 1.4px;
  line-height: 1.2;
  text-transform: uppercase;
}

#oracle h2{
  margin: 0;
  max-width: 780px;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 4vw, 2.7rem);
  line-height: 0.98;
  letter-spacing: 0;
  color: var(--text-0);
  text-transform: none;
}

#oracle .oracle-help{
  color: var(--text-1);
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  line-height: 1.5;
  margin: 12px 0 0 0;
  letter-spacing: 0.2px;
}

.oracle-btn{
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-width: min(100%, 360px);
  padding: 15px 24px;
  border-radius: 999px;
  font-weight: 750;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  cursor: pointer;

  color: var(--text-0);
  border: 1px solid rgba(192,74,201,0.55);
  background:
    radial-gradient(160% 220% at 0% 0%, rgba(192,74,201,0.18), transparent 55%),
    radial-gradient(140% 200% at 100% 0%, rgba(216,181,106,0.12), transparent 60%),
    linear-gradient(180deg, #171732, #0c0c18);
  box-shadow:
    0 0 34px rgba(192,74,201,0.25),
    0 10px 28px rgba(0,0,0,0.7),
    inset 0 0 0 1px rgba(255,255,255,0.03);

  transition: transform .08s ease, box-shadow .25s ease, border-color .25s ease;
}

.oracle-btn::before{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(216,181,106,0.85);
}

.oracle-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(216,181,106,0.55);
  box-shadow:
    0 0 40px rgba(192,74,201,0.35),
    0 0 26px rgba(216,181,106,0.18),
    0 12px 30px rgba(0,0,0,0.8);
}

.oracle-btn.is-calculating{
  pointer-events: none;
  opacity: 0.8;
}

.oracle-btn.is-calculating::before{
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
  animation: oracleDotBlink 0.6s infinite alternate ease-in-out;
}

@keyframes oracleDotBlink{
  from { opacity: 0.3; }
  to { opacity: 1; }
}

#oracle-answer{
  display: none;
  position: relative;
  z-index: 1;
  margin-top: 2px;
  padding: 18px 20px 18px 22px;
  min-height: 2.8em;
  width: min(100%, 720px);

  font-size: clamp(1.14rem, 2.4vw, 1.34rem);
  line-height: 1.48;
  letter-spacing: 0.25px;
  color: var(--text-0);

  background:
    radial-gradient(130% 180% at 0% 0%, rgba(192,74,201,0.16), transparent 56%),
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.00)),
    rgba(7,7,15,0.88);
  border: 1px solid rgba(216,181,106,0.22);
  border-left: 4px solid var(--gold);
  border-radius: 16px;

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.02),
    0 8px 26px rgba(0,0,0,0.65),
    0 0 22px rgba(192,74,201,0.12);

  backdrop-filter: blur(6px);
  opacity: 0.95;
}

#oracle-answer.visible{ display: block; }
.oracle-pop{ animation: oraclePop 420ms ease; }

.oracle-answer-label{
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.74rem;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#oracle-answer-text{
  margin: 0;
}

@keyframes oraclePop{
  0%   { transform: translateY(6px); opacity: 0; filter: blur(2px); }
  100% { transform: translateY(0); opacity: 1; filter: blur(0); }
}

@keyframes oracleScan{
  0%, 58% { transform: translateX(-120%); }
  76%, 100% { transform: translateX(120%); }
}

/* =========================
   BOTTONE INFO GREY CODE
   ========================= */
.about-btn{
  margin-top: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  cursor: pointer;

  color: var(--gold);
  background:
    linear-gradient(180deg, #0c0c16, #0a0a14),
    radial-gradient(circle at 100% 0%, rgba(192,74,201,0.12), transparent 60%);
  border: 1px dashed rgba(216,181,106,0.45);
  opacity: 0.9;

  transition: transform .08s ease, border-color .2s ease, box-shadow .25s ease, opacity .2s ease;
  box-shadow:
    0 0 22px rgba(216,181,106,0.10),
    inset 0 0 0 1px rgba(255,255,255,0.04);
}
.about-btn:hover{
  opacity: 1;
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow:
    0 0 28px rgba(192,74,201,0.25),
    0 0 18px rgba(216,181,106,0.20),
    inset 0 0 0 1px rgba(255,255,255,0.06);
}

/* se il bottone è sotto Viktor dentro viktor-wrap */
.viktor-wrap .about-btn{
  display: inline-flex;
  margin-top: 12px;
}

/* =========================
   BLOCCO ISTRUZIONI iOS
   ========================= */
#ios-install-hint{
  margin-top: 24px;
  padding: 16px 20px;
  max-width: 360px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;

  color: var(--text-1);
  font-size: 0.95rem;
  line-height: 1.45;

  border: 1px solid rgba(216,181,106,0.25);
  border-radius: 14px;

  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
    rgba(8,8,14,0.55);

  box-shadow:
    0 6px 20px rgba(0,0,0,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.03);

  backdrop-filter: blur(4px);
}
#ios-install-hint strong{
  color: var(--gold);
  font-weight: 700;
}

/* =========================
   MODALE GREY CODE
   ========================= */
.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(3,3,6,0.7);
  backdrop-filter: blur(6px);
  z-index: 999;
}

.modal{
  position: fixed;
  z-index: 1000;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%) scale(0.98);
  width: min(520px, 92vw);

  background:
    radial-gradient(120% 140% at 0% 0%, rgba(192,74,201,0.14), transparent 55%),
    radial-gradient(120% 140% at 100% 0%, rgba(216,181,106,0.10), transparent 60%),
    linear-gradient(180deg, #0c0c18, #070711);

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 20px 22px 18px 22px;

  box-shadow:
    0 20px 70px rgba(0,0,0,0.8),
    0 0 30px rgba(192,74,201,0.18);

  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.modal.modal-open{
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%,-50%) scale(1);
}

.modal h2{
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 0 0 8px 0;
  font-size: 1.55rem;
  letter-spacing: 0.4px;
}

.modal-text{
  margin: 0 0 14px 0;
  color: var(--text-1);
  line-height: 1.55;
  font-size: 1.02rem;
}

.modal-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  text-decoration: none;

  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;

  color: var(--text-0);
  border: 1px solid rgba(216,181,106,0.55);
  background:
    linear-gradient(180deg, rgba(216,181,106,0.16), rgba(192,74,201,0.12)),
    #14142a;

  box-shadow:
    0 0 22px rgba(216,181,106,0.18),
    0 8px 20px rgba(0,0,0,0.7);

  transition: transform .08s ease, box-shadow .25s ease, border-color .25s ease;
}

.modal-cta:hover{
  transform: translateY(-1px);
  border-color: rgba(192,74,201,0.75);
  box-shadow:
    0 0 30px rgba(192,74,201,0.35),
    0 0 22px rgba(216,181,106,0.22);
}

.modal-close{
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;

  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  color: var(--text-0);

  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;

  display: grid;
  place-items: center;
  transition: transform .08s ease, border-color .2s ease;
}

.modal-close:hover{
  transform: scale(1.05);
  border-color: rgba(216,181,106,0.55);
}

.lab-modal{
  width: min(1040px, 94vw);
  max-height: min(86vh, 780px);
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(0, 1fr);
  border-color: rgba(216,181,106,0.25);
  background:
    radial-gradient(115% 120% at 0% 0%, rgba(192,74,201,0.20), transparent 56%),
    radial-gradient(115% 120% at 100% 0%, rgba(216,181,106,0.15), transparent 58%),
    linear-gradient(180deg, #0c0c18, #070711);
}

.lab-modal-media{
  margin: 0;
  min-height: 100%;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(216,181,106,0.16);
  background:
    radial-gradient(110% 110% at 50% 50%, rgba(192,74,201,0.10), transparent 58%),
    #05050b;
}

.lab-modal-media::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 72%, rgba(0,0,0,0.28)),
    linear-gradient(180deg, transparent 72%, rgba(0,0,0,0.18));
  pointer-events: none;
}

.lab-modal-media img{
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: contain;
  object-position: center;
}

.lab-modal-copy{
  min-height: 430px;
  padding: clamp(24px, 3vw, 38px);
  display: grid;
  align-content: center;
  gap: 14px;
}

.lab-modal-copy .section-label{
  margin: 0;
}

.lab-modal h2{
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lab-modal-viktor{
  margin: 0;
  padding: 15px 16px;
  border-left: 3px solid rgba(216,181,106,0.76);
  border-radius: 0 14px 14px 0;
  color: var(--text-0);
  background:
    linear-gradient(90deg, rgba(216,181,106,0.14), rgba(192,74,201,0.08)),
    rgba(5,5,11,0.58);
  font-weight: 800;
  line-height: 1.45;
}

.lab-modal .modal-text{
  margin: 0;
}

.lab-modal .modal-cta{
  width: fit-content;
  margin-top: 4px;
}

/* =========================
   BOOK PROMO SECTIONS
   ========================= */
.book-showcase,
.grey-code-strip{
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 34px;
}

.book-showcase{
  display: grid;
  grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.collector-book{
  grid-template-columns: minmax(190px, 245px) minmax(0, 1fr);
}

.needs-link-pulse{
  animation: needsLinkPulse 850ms ease-out;
}

@keyframes needsLinkPulse{
  0% { filter: brightness(1); }
  35% { filter: brightness(1.25); }
  100% { filter: brightness(1); }
}

.book-cover-wrap{
  position: relative;
  border-radius: 12px;
  padding: 8px;
  background:
    linear-gradient(145deg, rgba(216,181,106,0.38), rgba(192,74,201,0.28) 42%, rgba(255,255,255,0.06));
  box-shadow:
    0 20px 55px rgba(0,0,0,0.72),
    0 0 34px rgba(192,74,201,0.16);
}

.book-cover-wrap::after{
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 8px;
  box-shadow: inset 0 0 55px rgba(0,0,0,0.34);
  pointer-events: none;
}

.book-cover{
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.book-copy{
  max-width: 620px;
}

.book-copy h2{
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  text-transform: uppercase;
  font-weight: 900;
  color: var(--text-0);
  text-shadow:
    0 0 18px rgba(215,92,226,0.24),
    0 0 18px rgba(216,181,106,0.13);
}

.book-tagline{
  color: var(--gold) !important;
  font-size: 1.1rem;
  font-weight: 750;
}

.grey-code-strip{
  padding: 34px;
  border: 1px solid rgba(216,181,106,0.16);
  border-radius: 18px;
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(192,74,201,0.16), transparent 60%),
    radial-gradient(80% 120% at 100% 0%, rgba(216,181,106,0.14), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    rgba(8,8,16,0.74);
  box-shadow:
    0 16px 45px rgba(0,0,0,0.55),
    inset 0 0 0 1px rgba(255,255,255,0.03);
}

.grey-code-strip p{
  max-width: 680px;
}

/* =========================
   THE GREY CODE LAB
   ========================= */
.lab-section{
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.lab-header{
  max-width: 760px;
  margin-bottom: 22px;
}

.lab-header h2{
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 0 0 12px 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lab-header p{
  margin: 0;
  color: var(--text-1);
  line-height: 1.62;
  font-size: 1.05rem;
}

.lab-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.lab-card{
  position: relative;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid rgba(216,181,106,0.14);
  border-radius: 18px;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(192,74,201,0.14), transparent 60%),
    radial-gradient(120% 160% at 100% 0%, rgba(216,181,106,0.10), transparent 58%),
    rgba(8,8,16,0.76);
  box-shadow:
    0 14px 42px rgba(0,0,0,0.52),
    inset 0 0 0 1px rgba(255,255,255,0.03);
}

.lab-builder{
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
  align-items: stretch;
}

.lab-card-media{
  margin: 0;
  min-height: 260px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(216,181,106,0.12);
}

.lab-card-media img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lab-card-media::after,
.shop-media::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 42%, rgba(0,0,0,0.55)),
    radial-gradient(90% 90% at 50% 20%, transparent, rgba(0,0,0,0.24));
  pointer-events: none;
}

.magazine-media,
.podcast-media{
  aspect-ratio: 4 / 3;
  min-height: 0;
  border-right: 0;
  border-bottom: 1px solid rgba(216,181,106,0.12);
}

.magazine-media img{
  object-position: center top;
}

.podcast-media img{
  object-position: center;
}

.lab-card-copy{
  padding: 22px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.lab-card-copy h3{
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.lab-card-copy p{
  margin: 0;
  color: var(--text-1);
  line-height: 1.55;
}

.lab-card-copy .primary-link,
.lab-card-copy .ghost-link{
  width: fit-content;
}

.lab-choice-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.lab-choice{
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(216,181,106,0.22);
  color: var(--text-0);
  background: rgba(9,9,18,0.72);
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.2px;
  transition: transform .08s ease, border-color .2s ease, box-shadow .25s ease;
}

.lab-choice:hover,
.lab-choice.is-selected{
  transform: translateY(-1px);
  border-color: rgba(192,74,201,0.58);
  box-shadow:
    0 0 22px rgba(192,74,201,0.18),
    0 8px 20px rgba(0,0,0,0.44);
}

.lab-choice-answer{
  padding: 14px 15px;
  border: 1px solid rgba(216,181,106,0.14);
  border-radius: 14px;
  background: rgba(5,5,11,0.58);
  color: var(--text-0) !important;
}

.soundtrack-card{
  min-height: 0;
}

.soundtrack-player{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(216,181,106,0.15);
  border-radius: 16px;
  background:
    radial-gradient(80% 120% at 0% 50%, rgba(192,74,201,0.20), transparent 64%),
    rgba(5,5,11,0.58);
  box-shadow: inset 0 0 22px rgba(0,0,0,0.26);
}

.soundtrack-disc{
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(216,181,106,0.36);
  box-shadow:
    0 0 22px rgba(192,74,201,0.20),
    inset 0 0 0 10px rgba(0,0,0,0.34);
}

.soundtrack-disc::after{
  content: "";
  position: absolute;
  inset: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #07070d;
  border: 1px solid rgba(238,216,184,0.52);
}

.soundtrack-disc img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.soundtrack-wave{
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg,
      rgba(216,181,106,0.95) 0 3px,
      transparent 3px 10px);
  opacity: 0.55;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.soundtrack-card.is-playing .soundtrack-wave{
  animation: soundtrackPulse 700ms infinite alternate ease-in-out;
}

.soundtrack-card.is-playing .soundtrack-disc{
  animation: soundtrackSpin 7s linear infinite;
}

@keyframes soundtrackPulse{
  from{ transform: scaleY(0.72); opacity: 0.45; }
  to{ transform: scaleY(1.08); opacity: 0.86; }
}

@keyframes soundtrackSpin{
  to{ transform: rotate(360deg); }
}

.soundtrack-toggle{
  border: 1px solid rgba(216,181,106,0.55);
  cursor: pointer;
}

.shop-card{
  display: grid;
  grid-template-columns: minmax(230px, 0.92fr) minmax(0, 1fr);
}

.shop-media{
  position: relative;
  overflow: hidden;
  margin: 0;
  min-height: 220px;
  border-right: 1px solid rgba(216,181,106,0.12);
}

.shop-media img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 43% center;
}

.device-mockup{
  position: relative;
  min-height: 390px;
  display: grid;
  place-items: center;
}

.tablet-frame,
.phone-frame,
.collector-mockup .book-cover-wrap{
  position: relative;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.14), rgba(216,181,106,0.18) 16%, rgba(7,7,12,0.92) 42%, rgba(192,74,201,0.22));
  border: 1px solid rgba(216,181,106,0.24);
  box-shadow:
    0 24px 70px rgba(0,0,0,0.72),
    0 0 34px rgba(192,74,201,0.18),
    inset 0 0 0 1px rgba(255,255,255,0.04);
}

.tablet-frame{
  width: min(270px, 75vw);
  padding: 12px;
  border-radius: 24px;
  transform: rotate(-3deg);
}

.tablet-frame .book-cover,
.phone-frame img{
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.phone-frame{
  position: absolute;
  right: 4%;
  bottom: 4%;
  width: 105px;
  padding: 7px;
  border-radius: 18px;
  transform: rotate(7deg);
}

.phone-frame img{
  border-radius: 10px;
}

.store-heading{
  margin: 18px 0 10px 0 !important;
  color: var(--gold) !important;
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.store-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 440px;
  margin: 0 0 18px 0;
}

.store-link{
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-0);
  border: 1px solid rgba(216,181,106,0.18);
  background:
    radial-gradient(110% 160% at 0% 0%, rgba(216,181,106,0.12), transparent 60%),
    rgba(9,9,18,0.74);
  box-shadow:
    0 8px 20px rgba(0,0,0,0.42),
    inset 0 0 0 1px rgba(255,255,255,0.03);
  font-weight: 800;
  transition: transform .08s ease, border-color .2s ease, box-shadow .25s ease;
}

.store-link:hover{
  transform: translateY(-1px);
  border-color: rgba(192,74,201,0.55);
  box-shadow:
    0 0 24px rgba(192,74,201,0.2),
    0 10px 24px rgba(0,0,0,0.58);
}

.store-icon{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background: #09090e;
  border: 1px solid var(--accent);
  overflow: hidden;
  box-shadow: 0 0 10px rgba(215,92,226,0.15);
}

.store-icon svg{
  width: 100%;
  height: 100%;
  display: block;
}

.story-fragment{
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

.fragment-image{
  aspect-ratio: 4 / 5;
}

.fragment-copy{
  max-width: 560px;
}

.fragment-copy h2{
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 0 0 12px 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1;
  letter-spacing: 0;
}

.fragment-copy p{
  color: var(--text-1);
  line-height: 1.62;
}

.collector-mockup{
  display: grid;
  grid-template-columns: 34px minmax(170px, 245px);
  align-items: stretch;
  justify-content: center;
  transform: perspective(900px) rotateY(-5deg);
}

.book-spine{
  display: grid;
  place-items: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 14px 6px;
  border-radius: 10px 0 0 10px;
  color: var(--gold);
  background:
    linear-gradient(180deg, #0b070b, #260816 52%, #07070c);
  border: 1px solid rgba(216,181,106,0.24);
  border-right: 0;
  font-size: 0.82rem;
  letter-spacing: 1.6px;
  font-weight: 950;
}

.collector-mockup .book-cover-wrap{
  padding: 8px;
  border-radius: 0 12px 12px 0;
}

.grey-code-strip{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  align-items: center;
  gap: 26px;
}

.grey-code-image{
  aspect-ratio: 4 / 5;
}

.install-panel,
.social-footer{
  margin-top: 34px;
  padding: 28px;
  border: 1px solid rgba(216,181,106,0.16);
  border-radius: 18px;
  background:
    radial-gradient(80% 130% at 0% 0%, rgba(216,181,106,0.12), transparent 58%),
    radial-gradient(80% 130% at 100% 0%, rgba(192,74,201,0.14), transparent 58%),
    rgba(8,8,16,0.72);
  box-shadow:
    0 14px 42px rgba(0,0,0,0.52),
    inset 0 0 0 1px rgba(255,255,255,0.03);
}

.install-panel{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: 24px;
  align-items: center;
}

.install-panel h2,
.social-footer h2{
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 0 0 10px 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

.install-panel p,
.social-footer p{
  color: var(--text-1);
  line-height: 1.58;
  margin: 0;
}

.install-actions{
  display: grid;
  gap: 12px;
  justify-items: stretch;
}

.install-action-btn{
  width: 100%;
}

.android-hint,
.ios-hint,
.install-fallback{
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid rgba(216,181,106,0.16);
  background: rgba(7,7,14,0.66);
  font-size: 0.94rem;
}

.android-hint.needs-attention{
  border-color: rgba(216,181,106,0.62);
  box-shadow: 0 0 24px rgba(216,181,106,0.18);
}

.android-hint strong,
.ios-hint strong,
.install-fallback strong{
  color: var(--gold);
}

.social-footer{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-main{
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  width: 100%;
}

.social-links{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.social-links .ghost-link{
  min-width: 132px;
}

.footer-bottom{
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  width: 100%;
}

.copyright{
  color: rgba(247,246,242,0.4);
  font-size: 0.8rem;
  margin: 0;
}

.privacy-link-btn{
  background: none;
  border: none;
  color: rgba(247,246,242,0.48);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-family: inherit;
  transition: color .2s ease;
}

.privacy-link-btn:hover,
.privacy-link-btn:focus-visible{
  color: var(--gold);
}

.chat-stage{
  display: grid;
  grid-template-columns: minmax(170px, 0.55fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  max-width: 720px;
}

.chat-visual{
  min-height: 280px;
}

.chat-visual::after,
.fragment-image::after,
.grey-code-image::after,
.intro-portrait::after,
.viktor-wrap::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 48%, rgba(0,0,0,0.48)),
    radial-gradient(80% 80% at 50% 20%, transparent, rgba(0,0,0,0.24));
}

.chat-visual figcaption{
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.chat-panel{
  min-width: 0;
}

.chat-status-line{
  max-width: 520px;
  min-height: 1.1em;
  margin: 8px 0 14px 0;
  padding: 0 2px;
  color: rgba(216,181,106,0.84);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(216,181,106,0.28);
}

a:focus-visible,
button:focus-visible,
input:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* =========================
   PWA – BOTTONE INSTALLA (Android / Desktop)
   ========================= */

#install-btn{
  display: none !important;   /* nascosto SEMPRE finché lo sblocco io via JS */
  margin-top: 18px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;

  cursor: pointer;
  opacity: 0.92;

  color: var(--text-0);
  border: 1px solid rgba(192,74,201,0.6);

  background:
    radial-gradient(160% 220% at 0% 0%, rgba(192,74,201,0.2), transparent 55%),
    radial-gradient(140% 200% at 100% 0%, rgba(216,181,106,0.12), transparent 60%),
    linear-gradient(180deg, #18172f, #0b0b18);

  box-shadow:
    0 0 24px rgba(192,74,201,0.25),
    0 8px 22px rgba(0,0,0,0.7),
    inset 0 0 0 1px rgba(255,255,255,0.03);

  transition: transform .08s ease,
              box-shadow .25s ease,
              border-color .25s ease,
              opacity .2s ease;
}

#install-btn.show{
  display: inline-flex !important;   /* lo faccio comparire SOLO via JS */
}

#install-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(216,181,106,0.7);
  box-shadow:
    0 0 30px rgba(192,74,201,0.35),
    0 0 20px rgba(216,181,106,0.22),
    0 10px 26px rgba(0,0,0,0.85);
}

#install-btn:active{
  transform: translateY(0);
  box-shadow:
    0 0 18px rgba(192,74,201,0.25),
    0 6px 18px rgba(0,0,0,0.8);
}
/* =========================
   MINI CHAT VIKTOR
   ========================= */
.mini-chat{
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.chat-help{
  margin: 0 0 6px 0;
  color: var(--text-1);
  font-size: 0.98rem;
  line-height: 1.45;
  letter-spacing: 0.2px;
}

.chat-prompts{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 520px;
}

.chat-prompt-btn{
  border: 1px solid rgba(216,181,106,0.24);
  border-radius: 999px;
  padding: 8px 11px;
  color: rgba(247,246,242,0.82);
  background: rgba(10,10,18,0.64);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.2px;
  transition: transform .08s ease, border-color .2s ease, color .2s ease;
}

.chat-prompt-btn:hover{
  transform: translateY(-1px);
  color: var(--gold);
  border-color: rgba(192,74,201,0.55);
}

.chat-messages{
  width: 100%;
  max-width: 520px;
  min-height: 180px;
  max-height: 380px;
  overflow-y: auto;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);

  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
    rgba(7,7,15,0.82);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.02),
    0 8px 24px rgba(0,0,0,0.55),
    0 0 20px rgba(192,74,201,0.08);

  backdrop-filter: blur(6px);
}

.intro-panel{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 230px);
  gap: 18px;
  align-items: center;
}

.intro-portrait,
.chat-visual,
.fragment-image,
.grey-code-image{
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(216,181,106,0.18);
  background: rgba(5,5,9,0.72);
  box-shadow:
    0 14px 38px rgba(0,0,0,0.62),
    0 0 28px rgba(192,74,201,0.14);
}

.intro-portrait img,
.chat-visual img,
.fragment-image img,
.grey-code-image img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-portrait{
  aspect-ratio: 2 / 3;
}

.intro-portrait figcaption{
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  color: var(--gold);
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.chat-message{
  max-width: 88%;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 14px;
  line-height: 1.45;
  font-size: 0.96rem;
  letter-spacing: 0.15px;
  word-wrap: break-word;
  animation: chatIn 240ms ease-out both;
}

@keyframes chatIn{
  0% { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

.viktor-message{
  background:
    linear-gradient(180deg, rgba(216,181,106,0.06), rgba(192,74,201,0.05)),
    rgba(21,21,35,0.95);
  border: 1px solid rgba(216,181,106,0.18);
  color: var(--text-0);
  margin-right: auto;
  box-shadow: 0 0 18px rgba(216,181,106,0.08);
}

.viktor-system{
  max-width: 78%;
  padding: 8px 11px;
  color: rgba(238,216,184,0.82);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  background:
    linear-gradient(90deg, rgba(216,181,106,0.09), rgba(192,74,201,0.08)),
    rgba(6,6,12,0.82);
  border-color: rgba(216,181,106,0.24);
}

.viktor-afterthought{
  max-width: 82%;
  color: rgba(255,255,255,0.88);
  background:
    linear-gradient(180deg, rgba(192,74,201,0.08), rgba(216,181,106,0.04)),
    rgba(13,13,24,0.96);
  border-color: rgba(192,74,201,0.20);
  box-shadow: 0 0 18px rgba(192,74,201,0.10);
}

.user-message{
  background:
    linear-gradient(180deg, rgba(192,74,201,0.14), rgba(192,74,201,0.08)),
    rgba(18,18,32,0.95);
  border: 1px solid rgba(192,74,201,0.28);
  color: var(--text-0);
  margin-left: auto;
  text-align: right;
  box-shadow: 0 0 18px rgba(192,74,201,0.10);
}

.chat-input-row{
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 520px;
}

.chat-input{
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  outline: none;

  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
    #0b0b17;
  color: var(--text-0);

  font-size: 0.95rem;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.02),
    0 6px 18px rgba(0,0,0,0.45);

  transition: border-color .2s ease, box-shadow .25s ease;
}

.chat-input::placeholder{
  color: rgba(247,246,242,0.42);
}

.chat-input:focus{
  border-color: rgba(192,74,201,0.45);
  box-shadow:
    0 0 22px rgba(192,74,201,0.18),
    0 6px 18px rgba(0,0,0,0.55);
}

.chat-send-btn{
  flex-shrink: 0;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(216,181,106,0.35);
  cursor: pointer;

  color: var(--text-0);
  font-weight: 750;
  letter-spacing: 0.5px;
  text-transform: uppercase;

  background:
    radial-gradient(160% 220% at 0% 0%, rgba(216,181,106,0.12), transparent 55%),
    radial-gradient(140% 200% at 100% 0%, rgba(192,74,201,0.12), transparent 60%),
    linear-gradient(180deg, #151528, #0c0c18);

  box-shadow:
    0 0 20px rgba(216,181,106,0.10),
    0 8px 20px rgba(0,0,0,0.65),
    inset 0 0 0 1px rgba(255,255,255,0.03);

  transition: transform .08s ease, box-shadow .25s ease, border-color .25s ease;
}

.chat-send-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(192,74,201,0.45);
  box-shadow:
    0 0 24px rgba(192,74,201,0.18),
    0 0 16px rgba(216,181,106,0.14),
    0 10px 24px rgba(0,0,0,0.75);
}

.chat-typing{
  opacity: 0.72;
  font-style: italic;
}

/* mobile */
@media (max-width: 640px){
  .chat-input-row{
    flex-direction: column;
    align-items: stretch;
  }

  .chat-send-btn{
    width: 100%;
  }

  .chat-messages{
    max-height: 45vh;
  }

  .chat-prompt-btn{
    width: 100%;
    text-align: center;
  }
}
/* =========================
   MOBILE
   ========================= */
@media (max-width: 800px){
  body{
    padding: 18px 10px 104px;
  }

  .app-dock{
    bottom: 10px;
    width: calc(100vw - 16px);
    padding: 6px;
    gap: 3px;
  }

  .app-dock a{
    min-height: 40px;
    padding: 7px 5px;
    font-size: clamp(0.58rem, 2.4vw, 0.68rem);
    letter-spacing: 0;
  }

  #app{
    padding: 24px 18px;
    border-radius: 18px;
  }

  .top-nav{
    justify-content: flex-start;
    margin-top: 0;
  }

  h1{
    font-size: clamp(2.8rem, 15vw, 4.2rem);
  }

  h1 em{
    letter-spacing: 0.14em;
  }

  .home-screen{
    flex-direction: column;
    align-items: center;
  }
  #right-panel{
    order: 2;
    width: 100%;
    margin-top: 0;
    margin-bottom: 8px;
  }

  .viktor-wrap{
    width: 100%;
  }

  #viktor-img{
    width: min(280px, 78vw);
    max-height: 360px;
    object-fit: contain;
  }

  #viktor-tip,
  .pamela-mark{
    display: none;
  }

  .book-showcase,
  .collector-book{
    grid-template-columns: 1fr;
  }

  .intro-panel,
  .chat-stage,
  .story-fragment,
  .grey-code-strip,
  .install-panel,
  .lab-grid,
  .lab-builder,
  .soundtrack-card,
  .shop-card{
    grid-template-columns: 1fr;
  }

  .lab-card-media,
  .shop-media{
    min-height: 210px;
    border-right: 0;
    border-bottom: 1px solid rgba(216,181,106,0.12);
  }

  .shop-media{
    aspect-ratio: 16 / 9;
  }

  .magazine-media,
  .podcast-media{
    aspect-ratio: 4 / 5;
  }

  .lab-choice-grid{
    grid-template-columns: 1fr;
  }

  .lab-modal{
    width: min(94vw, 520px);
    max-height: 88vh;
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .lab-modal-media{
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(216,181,106,0.16);
  }

  .lab-modal-media img{
    min-height: 0;
    height: auto;
    max-height: 42vh;
    object-fit: contain;
  }

  .lab-modal-copy{
    min-height: 0;
    padding: 22px 18px 20px;
  }

  .lab-modal .modal-cta{
    width: 100%;
  }

  .lab-card-copy .primary-link,
  .lab-card-copy .ghost-link{
    width: 100%;
  }

  .intro-portrait{
    width: min(220px, 72vw);
    margin: 0 auto;
  }

  .chat-visual{
    min-height: 220px;
    aspect-ratio: 4 / 3;
  }

  .device-mockup{
    min-height: 340px;
  }

  .tablet-frame{
    width: min(235px, 68vw);
  }

  .phone-frame{
    width: 88px;
    right: 10%;
  }

  .store-grid{
    grid-template-columns: 1fr;
  }

  .story-fragment{
    gap: 18px;
  }

  .fragment-image,
  .grey-code-image{
    aspect-ratio: 4 / 3;
  }

  .collector-mockup{
    transform: none;
  }

  .book-cover-wrap{
    width: min(260px, 78vw);
    margin: 0 auto;
  }

  .grey-code-strip{
    padding: 24px 18px;
  }

  .install-panel,
  .social-footer{
    padding: 22px 18px;
  }

    .social-footer{
      align-items: stretch;
      gap: 16px;
    }

    .footer-main,
    .footer-bottom{
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 12px;
      width: 100%;
    }

    .footer-bottom{
      border-top: 1px solid var(--line);
      padding-top: 14px;
    }

    .social-links{
      justify-content: center;
      width: 100%;
    }

    .social-links .ghost-link{
      width: 100%;
    }

  .hero-actions,
  .book-actions{
    align-items: stretch;
  }

  .primary-link,
  .ghost-link{
    width: 100%;
  }

  .entry-map{
    padding: 14px;
    border-radius: 16px;
  }

  .entry-map-links{
    grid-template-columns: 1fr;
  }

  .entry-map-links a{
    min-height: 40px;
  }

  .install-teaser{
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    margin-top: -8px;
    border-radius: 16px;
  }

  .install-teaser a{
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}


/* =========================
   GLITCH ANIMATION FOR VIKTOR PORTRAIT
   ========================= */
.chat-visual.glitch {
  animation: glitch-anim 0.22s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% {
    clip-path: inset(40% 0 61% 0);
    transform: skew(0.3deg);
    filter: hue-rotate(90deg) saturate(1.5) contrast(1.2);
  }
  20% {
    clip-path: inset(92% 0 1% 0);
    transform: skew(-0.5deg);
    filter: hue-rotate(-90deg) saturate(2) contrast(1.5);
  }
  40% {
    clip-path: inset(15% 0 80% 0);
    transform: skew(0.8deg);
  }
  60% {
    clip-path: inset(80% 0 5% 0);
    transform: skew(-0.2deg);
  }
  80% {
    clip-path: inset(3% 0 92% 0);
    transform: skew(0.5deg);
  }
  100% {
    clip-path: inset(67% 0 10% 0);
    transform: skew(-0.8deg);
    filter: none;
  }
}

/* ==========================================================================
   QUIZ INTERATTIVO
   ========================================================================== */
.quiz-section {
  margin-top: 34px;
  background:
    radial-gradient(100% 120% at 100% 100%, rgba(192, 74, 201, 0.08), transparent 60%),
    radial-gradient(100% 120% at 0% 0%, rgba(216, 181, 106, 0.06), transparent 60%),
    rgba(8, 8, 16, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  padding: 40px 30px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.7),
    0 0 35px rgba(215, 92, 226, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.quiz-container {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
  align-items: center;
}

.quiz-screen {
  display: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  width: 100%;
}

.quiz-screen.active {
  display: block;
  opacity: 1;
}

#quiz-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.8vw, 2.4rem);
  line-height: 1.25;
  color: var(--text-0);
  margin: 12px 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 0 15px rgba(215, 92, 226, 0.25);
}

.quiz-intro {
  color: var(--text-1);
  font-size: 1.06rem;
  line-height: 1.6;
  margin: 0 auto 28px auto;
  max-width: 580px;
}

/* Question view styles */
.quiz-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  margin-bottom: 24px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transition: width 0.3s ease;
}

#quiz-question-text {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3.2vw, 1.68rem);
  line-height: 1.4;
  color: var(--text-0);
  margin: 8px 0 28px 0;
  font-weight: 700;
  text-align: center;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
}

.quiz-option-btn {
  width: 100%;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.96rem;
  line-height: 1.45;
  text-align: left;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.quiz-option-btn:hover,
.quiz-option-btn:focus-visible {
  color: var(--text-0);
  background: rgba(215, 92, 226, 0.05);
  border-color: rgba(215, 92, 226, 0.35);
  box-shadow: 
    0 0 24px rgba(215, 92, 226, 0.1),
    inset 0 0 0 1px rgba(215, 92, 226, 0.03);
  transform: translateX(4px);
  outline: none;
}

/* Loading/Scanning view styles */
.loading-scanner {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.scanner-bar {
  width: 30%;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  position: absolute;
  left: -30%;
  animation: scan 1.2s infinite linear;
}

@keyframes scan {
  0% { left: -30%; }
  100% { left: 100%; }
}

/* Result view styles */
#quiz-result-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  color: var(--text-0);
  margin: 6px 0 18px 0;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(216, 181, 106, 0.2);
}

.quiz-result-copy {
  color: var(--text-1);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.quiz-retry-btn {
  background: none;
  border: none;
  color: rgba(247, 246, 242, 0.4);
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 10px;
  font-family: inherit;
  transition: color 0.2s ease;
  margin-left: 10px;
}

.quiz-retry-btn:hover,
.quiz-retry-btn:focus-visible {
  color: var(--text-0);
  outline: none;
}

/* Responsive adjustment */
@media (max-width: 768px) {
  .quiz-section {
    padding: 30px 20px;
    border-radius: 18px;
  }
  
  .quiz-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .quiz-retry-btn {
    text-align: center;
    margin-left: 0;
    margin-top: 10px;
  }
}

/* ==========================================================================
   GALLERIA "ARCHIVI VISIVI NEURALI"
   ========================================================================== */
.gallery-section {
  margin-top: 34px;
  background:
    radial-gradient(100% 120% at 0% 100%, rgba(192, 74, 201, 0.07), transparent 60%),
    radial-gradient(100% 120% at 100% 0%, rgba(216, 181, 106, 0.05), transparent 60%),
    rgba(8, 8, 16, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 24px;
  padding: 40px 30px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.7),
    0 0 35px rgba(215, 92, 226, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.gallery-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 30px auto;
}

#gallery-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.8vw, 2.4rem);
  line-height: 1.25;
  color: var(--text-0);
  margin: 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 0 15px rgba(215, 92, 226, 0.25);
}

.gallery-subtitle {
  color: var(--text-1);
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0;
}

.gallery-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.gallery-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  padding: 10px 5px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE/Edge */
  scroll-snap-type: x mandatory;
}

.gallery-track::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.gallery-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.gallery-card:hover,
.gallery-card:focus-visible {
  border-color: rgba(215, 92, 226, 0.45);
  background: rgba(215, 92, 226, 0.03);
  box-shadow: 
    0 15px 35px rgba(215, 92, 226, 0.12),
    inset 0 0 0 1px rgba(215, 92, 226, 0.05);
  transform: translateY(-4px);
  outline: none;
}

.gallery-card-media {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.gallery-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover .gallery-card-media img {
  transform: scale(1.05);
}

.gallery-card-info {
  padding: 16px;
}

.gallery-card-info h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-0);
  margin: 0 0 6px 0;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.gallery-card-tag {
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
}

/* Carousel Buttons */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(8, 8, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.carousel-nav-btn svg {
  transition: transform 0.2s ease;
}

.carousel-nav-btn:hover,
.carousel-nav-btn:focus-visible {
  color: var(--text-0);
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(215, 92, 226, 0.3);
  background: rgba(215, 92, 226, 0.08);
  outline: none;
}

.carousel-nav-btn.prev {
  left: -22px;
}
.carousel-nav-btn.next {
  right: -22px;
}

.carousel-nav-btn.prev:hover svg {
  transform: translateX(-2px);
}
.carousel-nav-btn.next:hover svg {
  transform: translateX(2px);
}

/* Disable navigation buttons when not needed or on touch devices if preferred, but keeping them styled simply */
@media (max-width: 960px) {
  .carousel-nav-btn {
    display: none; /* Swipe is standard on tablets/mobile */
  }
}

/* ==========================================================================
   LIGHTBOX (KINDLE STYLE CAPTION)
   ========================================================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 10, 0.94);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lightbox:not([hidden]) {
  display: flex; /* Override hidden class if browsers try to hide it physically */
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 10010;
  transition: color 0.2s ease;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  color: var(--text-0);
  outline: none;
}

.lightbox-content {
  display: flex;
  flex-direction: row;
  max-width: 960px;
  width: 100%;
  max-height: 80vh;
  background: #09090f;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-img-wrapper {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  max-height: 80vh;
}

.lightbox-img-wrapper img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lightbox-caption {
  flex: 1 1 50%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  background: 
    radial-gradient(100% 100% at 100% 0%, rgba(216, 181, 106, 0.03), transparent 70%),
    #0c0c14;
  border-left: 1px solid rgba(255, 255, 255, 0.03);
  overflow-y: auto;
}

.kindle-badge {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(216, 181, 106, 0.3);
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 1.2px;
  margin-bottom: 20px;
}

.lightbox-caption h3 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-0);
  margin: 0 0 16px 0;
  font-weight: 700;
}

.kindle-divider {
  width: 40px;
  height: 1px;
  background: rgba(216, 181, 106, 0.25);
  border: none;
  margin: 0 0 24px 0;
}

#lightbox-quote {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1.7;
  color: #e5e3db;
  font-style: italic;
  margin: 0;
  position: relative;
  padding: 0 10px;
  border-left: 2px solid rgba(215, 92, 226, 0.3);
}

/* Lightbox Responsive */
@media (max-width: 820px) {
  .lightbox-content {
    flex-direction: column;
    max-height: 90vh;
    border-radius: 16px;
  }
  
  .lightbox-img-wrapper {
    flex: 1 1 50%;
    max-height: 45vh;
  }
  
  .lightbox-img-wrapper img {
    max-height: 45vh;
  }
  
  .lightbox-caption {
    flex: 1 1 50%;
    padding: 24px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    max-height: 45vh;
  }
  
  .lightbox-caption h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }
  
  #lightbox-quote {
    font-size: 1.05rem;
    line-height: 1.6;
  }
  
  .lightbox-close {
    top: 12px;
    right: 12px;
  }
}

@media (max-width: 480px) {
  .gallery-section {
    padding: 30px 15px;
    border-radius: 18px;
  }
  
  .gallery-card {
    flex: 0 0 230px;
  }
}

/* ==========================================
   INTERACTIVE NARRATIVE CHOICE BUTTONS (VISUAL NOVEL STYLE)
   ========================================== */
.chat-embedded-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 14px 10px;
  width: calc(100% - 20px);
  animation: chatChoiceFadeIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.chat-embedded-choice-btn {
  align-self: flex-start;
  border: 1px solid rgba(216, 181, 106, 0.35);
  border-radius: 12px;
  padding: 8px 14px;
  color: rgba(247, 246, 242, 0.92);
  font-family: 'Outfit', sans-serif;
  background: rgba(10, 10, 18, 0.82);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 650;
  text-align: left;
  letter-spacing: 0.1px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.chat-embedded-choice-btn:hover {
  transform: translateX(5px);
  color: #FFF;
  border-color: #D75CE2; /* WCAG pink/purple contrast color */
  box-shadow: 0 0 10px rgba(215, 92, 226, 0.35);
  background: rgba(26, 15, 34, 0.92);
}

@keyframes chatChoiceFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   KEYBOARD ACTIVE (MOBILE OPTIMIZATION)
   ========================================== */
@media (max-width: 800px) {
  body.keyboard-active .chat-messages {
    max-height: 55vh !important;
  }
  body.keyboard-active .chat-embedded-choices {
    gap: 4px;
    margin: 5px 0 5px 5px;
  }
  body.keyboard-active .chat-embedded-choice-btn {
    padding: 5px 10px;
    font-size: 0.72rem;
  }
}

/* ==========================================================================
   INTERACTION AND SURVEILLANCE OVERLAYS
   ========================================================================== */
.global-glitch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 7, 0.95);
  z-index: 10000;
  pointer-events: none;
  mix-blend-mode: difference;
}
.global-glitch-overlay.active {
  animation: crtGlitchEffect 0.8s ease-in-out forwards;
}

@keyframes crtGlitchEffect {
  0% {
    opacity: 0;
    filter: hue-rotate(0deg) contrast(1);
    background: radial-gradient(circle, rgba(215,92,226,0.3) 0%, rgba(5,5,7,0.9) 100%);
  }
  15% {
    opacity: 1;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    transform: scale(1.03) skewX(2deg);
  }
  30% {
    transform: scale(0.97) skewX(-1.5deg);
    filter: hue-rotate(180deg) contrast(1.5);
  }
  45% {
    transform: scale(1.05) skewX(1deg);
    filter: hue-rotate(90deg) contrast(2);
  }
  60% {
    transform: scale(0.99) skewX(0deg);
  }
  75% {
    opacity: 0.9;
    filter: invert(1) hue-rotate(300deg);
  }
  100% {
    opacity: 0;
    transform: scale(1) skewX(0);
  }
}

.surveillance-scanline {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: rgba(215, 92, 226, 0.03);
  border: 1px solid rgba(215, 92, 226, 0.15);
  box-shadow: inset 0 0 40px rgba(215, 92, 226, 0.05);
  transition: opacity 0.5s ease;
}

.scanline-bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(180deg, transparent, #D75CE2 50%, #D8B56A 80%, transparent);
  box-shadow: 0 0 15px #D75CE2;
  animation: scanlineMovement 4s linear infinite;
}

@keyframes scanlineMovement {
  0% { top: -10px; }
  100% { top: 100%; }
}

.surveillance-warning {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(5, 5, 7, 0.9);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 8px 16px;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-0);
  letter-spacing: 1px;
  box-shadow: 0 0 15px rgba(216, 181, 106, 0.25);
  pointer-events: none;
}

.system-blink {
  color: var(--accent);
  font-weight: bold;
  animation: systemBlinker 1s steps(2, start) infinite;
}

@keyframes systemBlinker {
  to { visibility: hidden; }
}

/* ==========================================================================
   TERMINALE NEURAL GREY CODE
   ========================================================================== */
.terminal-section {
  margin-top: 54px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.terminal-container {
  max-width: 820px;
  margin: 0 auto;
}

.terminal-subtitle {
  color: var(--text-1);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 10px 0;
}

.terminal-hint {
  margin: 0 0 24px 0;
  padding: 12px 14px;
  border-left: 2px solid rgba(216, 181, 106, 0.58);
  border-radius: 0 10px 10px 0;
  background: rgba(216, 181, 106, 0.06);
  color: rgba(247, 246, 242, 0.76);
  font-size: 0.9rem;
  line-height: 1.45;
}

.terminal-window {
  border: 1px solid rgba(215, 92, 226, 0.25);
  border-radius: 12px;
  background: rgba(7, 7, 14, 0.95);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(215, 92, 226, 0.08);
  overflow: hidden;
}

.terminal-header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(18, 18, 30, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title-text {
  margin-left: 8px;
  font-family: monospace;
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: var(--gold);
  text-transform: uppercase;
}

.terminal-screen {
  padding: 20px;
  font-family: 'Courier New', Courier, monospace;
}

.terminal-log {
  min-height: 140px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 18px;
  padding-right: 8px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.terminal-log::-webkit-scrollbar {
  width: 4px;
}
.terminal-log::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 2px;
}

.log-line {
  margin: 0 0 6px 0;
  word-break: break-all;
}

.log-line.system-line {
  color: rgba(247, 246, 242, 0.6);
}

.log-line.error-line {
  color: #ff5f56;
  text-shadow: 0 0 8px rgba(255, 95, 86, 0.2);
}

.log-line.success-line {
  color: #27c93f;
  text-shadow: 0 0 8px rgba(39, 201, 63, 0.2);
}

.log-line.input-line {
  color: var(--gold);
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 14px;
}

.terminal-prompt {
  color: var(--accent);
  font-weight: bold;
  font-size: 0.95rem;
}

.terminal-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-0);
  padding: 4px 0;
  caret-color: var(--accent);
}

.terminal-input-field::placeholder {
  color: rgba(247, 246, 242, 0.25);
}

.terminal-btn {
  background: transparent;
  border: 1px solid rgba(216, 181, 106, 0.45);
  border-radius: 4px;
  color: var(--gold);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.terminal-btn:hover {
  background: rgba(216, 181, 106, 0.08);
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(216, 181, 106, 0.15);
}

.decrypted-files {
  margin-top: 30px;
  animation: decryptedFadeIn 0.4s ease both;
}

@keyframes decryptedFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.decrypted-header {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--gold);
  margin: 0 0 16px 0;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(216, 181, 106, 0.15);
}

.decrypted-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media(min-width: 650px) {
  .decrypted-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.decrypted-card {
  border: 1px solid rgba(216, 181, 106, 0.16);
  border-radius: 10px;
  background: 
    radial-gradient(100% 120% at 0% 0%, rgba(216, 181, 106, 0.05), transparent 60%),
    rgba(11, 11, 18, 0.72);
  padding: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: transform 0.2s ease, border-color 0.25s ease;
}

.decrypted-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 
    0 0 18px rgba(216, 181, 106, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.decrypted-card-tag {
  display: inline-block;
  font-family: monospace;
  font-size: 0.68rem;
  color: var(--accent);
  border: 1px solid rgba(215, 92, 226, 0.25);
  border-radius: 3px;
  padding: 2px 6px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.decrypted-card h4 {
  margin: 0 0 6px 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-0);
  font-weight: 700;
}

.decrypted-card p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-1);
}

/* ==========================================================================
   ATMOSPHERE EFFECTS
   ========================================================================== */
.heartbeat-active {
  animation: pulseBgHeart 0.88s infinite ease-in-out !important; /* 68 bpm = ~0.88s per battito */
}

@keyframes pulseBgHeart {
  0%, 100% {
    box-shadow: 
      0 18px 60px rgba(0,0,0,0.65),
      0 0 30px rgba(215,92,226,0.12),
      0 0 28px rgba(216,181,106,0.16);
  }
  30% {
    box-shadow: 
      0 18px 60px rgba(0,0,0,0.65),
      0 0 38px rgba(215,92,226,0.32),
      0 0 36px rgba(216,181,106,0.28);
  }
  45% {
    box-shadow: 
      0 18px 60px rgba(0,0,0,0.65),
      0 0 32px rgba(215,92,226,0.22),
      0 0 32px rgba(216,181,106,0.20);
  }
  60% {
    box-shadow: 
      0 18px 60px rgba(0,0,0,0.65),
      0 0 42px rgba(215,92,226,0.38),
      0 0 38px rgba(216,181,106,0.32);
  }
}

.decrypted-card.locked-card {
  border: 1px dashed rgba(215, 92, 226, 0.28) !important;
  opacity: 0.65;
  background: rgba(5, 5, 8, 0.4) !important;
  transition: opacity 0.3s ease, border-color 0.3s ease;
}

.decrypted-card.locked-card:hover {
  opacity: 0.85;
  border-color: rgba(215, 92, 226, 0.5) !important;
}

.locked-tag {
  border-color: rgba(247, 246, 242, 0.2) !important;
  color: rgba(247, 246, 242, 0.4) !important;
}

.hint-text {
  font-size: 0.82rem;
  color: rgba(247, 246, 242, 0.55);
  margin: 0;
  line-height: 1.4;
}

/* MODALE LETTORE ESTRATTO INEDITO (DUE COLONNE) */
.reader-modal {
  width: min(1000px, 94vw) !important;
  max-width: 1000px !important;
  max-height: min(88vh, 760px) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  border-color: rgba(216, 181, 106, 0.25) !important;
  overflow: hidden !important;
}

.reader-content-wrapper {
  padding: 35px 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 80vh;
  box-sizing: border-box;
  text-align: left;
  width: 100%;
}

.reader-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  font-family: 'Outfit', sans-serif;
  font-size: 1.08rem;
  line-height: 1.85;
  color: rgba(247, 246, 242, 0.94);
  margin-top: 20px;
  padding-right: 15px;
  column-count: 2;
  column-gap: 50px;
  column-rule: 1px solid rgba(216, 181, 106, 0.15);
  text-align: left; /* Allineato a sinistra per evitare spaziature bianche orrende indotte dal justify */
}

.reader-scroll-area p {
  margin-top: 0;
  margin-bottom: 20px;
  text-indent: 1.5em;
  orphans: 3;
  widows: 3;
}

.reader-scroll-area p:first-child {
  text-indent: 0;
}

.reader-scroll-area p.prize-congrats {
  text-indent: 0;
  text-align: center;
  color: var(--gold);
  font-weight: bold;
  font-size: 0.98rem;
  margin-top: 30px;
  column-span: all;
}

@media (max-width: 768px) {
  .reader-content-wrapper {
    max-height: 75vh;
    padding: 20px 24px;
  }
  .reader-scroll-area {
    column-count: 1;
    column-gap: 0;
    column-rule: none;
    padding-right: 5px;
    font-size: 1.02rem;
    line-height: 1.75;
  }
}
