/* =========================================================
   PALETTE & BASI  (palette originale, INVARIATA)
   ========================================================= */
:root {
    --bg-1: #08111f;
    --bg-2: #0d1728;
    --bg-3: #111c31;
    --accent: #f7c5d8;
    --accent-soft: rgba(247, 197, 216, .16);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, .7);
    --faint: rgba(255, 255, 255, .12);
    --ease: cubic-bezier(.22, 1, .36, 1);
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    background: var(--bg-1);
    background: radial-gradient(120% 90% at 50% 0%, var(--bg-3) 0%, var(--bg-2) 45%, var(--bg-1) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    transition: background-color 1.4s var(--ease);
}
body.dim { background-color: #050b15; }
body.locked { overflow: hidden; }

::selection { background: var(--accent); color: #10131b; }

/* Sfumatura ambientale + grana per profondità */
.ambient {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(50% 40% at 80% 10%, rgba(247, 197, 216, .10), transparent 70%),
        radial-gradient(45% 45% at 12% 85%, rgba(120, 150, 220, .10), transparent 70%);
    opacity: .9;
    transition: opacity 1.4s var(--ease);
}
.grain {
    position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* Tipografia display */
.display {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: .3px;
    font-size: clamp(2rem, 6vw, 4.4rem);
}
.chapter {
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: .42em;
    font-size: .72rem;
    color: var(--accent);
    opacity: .85;
    margin-bottom: 2.4rem;
    padding-left: .42em;
}
.lead { color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.25rem); margin-top: 1.6rem; font-weight: 300; }

/* =========================================================
   OVERLAY CINEMATOGRAFICO (fade neri tra sezioni)
   ========================================================= */
.cine-overlay {
    position: fixed; inset: 0; z-index: 45; pointer-events: none;
    background: #000;
    opacity: 0;
    transition: opacity 1s var(--ease);
}
.cine-overlay.on { opacity: 1; }

.cine-blur {
    position: fixed; inset: 0; z-index: 44; pointer-events: none;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    background: rgba(5, 11, 21, 0);
    transition: backdrop-filter 2.2s var(--ease), background 2.2s var(--ease);
}
.cine-blur.on {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    background: rgba(5, 11, 21, .55);
}

/* =========================================================
   0 · PASSWORD
   ========================================================= */
#passwordScreen {
    position: fixed; inset: 0; z-index: 60;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(120% 90% at 50% 30%, var(--bg-3), var(--bg-1));
    transition: opacity 1.1s var(--ease);
    padding: 24px;
}
#passwordScreen.hide { opacity: 0; pointer-events: none; }

.pwd-inner { text-align: center; max-width: 420px; width: 100%; animation: rise 1.2s var(--ease) both; }
.pwd-kicker { text-transform: uppercase; letter-spacing: .4em; font-size: .68rem; color: var(--accent); margin-bottom: 1.2rem; }
.pwd-title { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: clamp(1.7rem, 5vw, 2.4rem); margin-bottom: 2.2rem; }

.pwd-field { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
#pwdInput {
    flex: 1 1 200px; min-width: 0;
    padding: 15px 18px; font-size: 1.05rem; font-family: inherit;
    color: var(--text); text-align: center; letter-spacing: .2em;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--faint); border-radius: 14px;
    backdrop-filter: blur(12px); outline: none;
    transition: border-color .4s var(--ease), background .4s var(--ease);
}
#pwdInput::placeholder { color: rgba(255, 255, 255, .35); letter-spacing: .3em; }
#pwdInput:focus { border-color: var(--accent); background: rgba(255, 255, 255, .08); }

#pwdBtn, .ghost-btn, .answer-buttons button {
    font-family: 'Outfit', sans-serif; cursor: pointer;
}
#pwdBtn {
    padding: 15px 26px; font-size: 1rem; color: #10131b; font-weight: 500;
    background: var(--accent); border: none; border-radius: 14px;
    box-shadow: 0 12px 34px -12px var(--accent);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
#pwdBtn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px var(--accent); }
.pwd-error { color: #ff9db1; margin-top: 1.2rem; font-size: .9rem; opacity: 0; transition: opacity .4s; }
.pwd-error.show { opacity: 1; }
#passwordScreen.shake .pwd-inner { animation: shake .4s var(--ease); }

/* =========================================================
   FALSO CARICAMENTO
   ========================================================= */
#loadingScreen {
    position: fixed; inset: 0; z-index: 58;
    display: none; align-items: center; justify-content: center;
    background: #04080f;
    padding: 40px 24px;
    transition: opacity 1.4s var(--ease);
}
#loadingScreen.show { display: flex; }
#loadingScreen.fade-out { opacity: 0; pointer-events: none; }

.loading-inner { width: min(560px, 100%); font-family: 'Outfit', sans-serif; }
.loading-kicker {
    text-transform: uppercase; letter-spacing: .5em; font-size: .62rem;
    color: var(--accent); opacity: .7; margin-bottom: 2.2rem;
}
.loading-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.loading-list li {
    display: flex; align-items: baseline; gap: 10px;
    font-size: .92rem; color: rgba(255,255,255,.78); font-weight: 300;
    opacity: 0; transform: translateY(8px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.loading-list li.in { opacity: 1; transform: none; }
.l-label { flex: 0 0 auto; }
.l-dots { flex: 1; border-bottom: 1px dashed rgba(255,255,255,.15); transform: translateY(-4px); }
.l-val {
    flex: 0 0 auto; font-variant-numeric: tabular-nums;
    color: var(--accent); letter-spacing: .05em; min-width: 3.4em; text-align: right;
}
.loading-list li.done .l-val { color: #fff; }

.loading-bar {
    margin-top: 2.4rem; width: 100%; height: 1px;
    background: rgba(255,255,255,.08); position: relative; overflow: hidden;
}
.loading-bar i {
    position: absolute; left: 0; top: 0; height: 100%;
    width: 0%; background: var(--accent);
    transition: width .6s var(--ease);
}

.loading-result {
    margin-top: 2.4rem;
    opacity: 0; transform: translateY(10px);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.loading-result.in { opacity: 1; transform: none; }
.l-res-label {
    display: block; text-transform: uppercase; letter-spacing: .5em;
    font-size: .58rem; color: var(--muted); margin-bottom: .6rem;
}
.l-res-text {
    font-family: 'Cormorant Garamond', serif; font-style: italic;
    font-size: clamp(1.4rem, 3.6vw, 2.1rem); color: #fff;
}

/* =========================================================
   TRANSIZIONE · \"Ti stavo aspettando.\"
   ========================================================= */
#waitingScreen {
    position: fixed; inset: 0; z-index: 55;
    display: none; align-items: center; justify-content: center;
    background: #04080f; padding: 24px; text-align: center;
    transition: opacity 1.4s var(--ease);
}
#waitingScreen.show { display: flex; }
#waitingScreen.fade-out { opacity: 0; pointer-events: none; }
.waiting-line { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-style: italic; font-size: clamp(2rem, 6.5vw, 4rem); }

.reveal-mask { overflow: hidden; }
.reveal-mask > span { display: inline-block; transform: translateY(110%); opacity: 0; }
.reveal-mask.in > span { animation: maskUp 1.5s var(--ease) forwards; }

/* =========================================================
   STORIA · SCENE
   ========================================================= */
#story { position: relative; z-index: 2; display: none; }
#story.show { display: block; }

.scene {
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    padding: 14vh 7vw;
    position: relative;
}
.scene__content { max-width: 760px; }

/* Reveal generico su scroll */
[data-reveal] {
    opacity: 0; transform: translateY(26px);
    filter: blur(6px);
    transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease);
}
[data-reveal].in { opacity: 1; transform: none; filter: blur(0); }
[data-delay=\"1\"] { transition-delay: .18s; }
[data-delay=\"2\"] { transition-delay: .38s; }
[data-delay=\"3\"] { transition-delay: .58s; }

/* Indicatore scroll */
.scroll-hint {
    position: absolute; bottom: 6vh; left: 0; right: 0;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    color: var(--muted); text-transform: uppercase; letter-spacing: .34em; font-size: .62rem;
}
.scroll-hint i { width: 1px; height: 42px; background: linear-gradient(var(--accent), transparent); animation: lineDrop 2.2s var(--ease) infinite; }

/* Marquee editoriale */
.marquee-scene {
    min-height: 26vh; display: flex; align-items: center;
    overflow: hidden;
    border-top: 1px solid var(--faint);
    border-bottom: 1px solid var(--faint);
    background: rgba(255,255,255,.01);
}
.marquee { width: 100%; overflow: hidden; }
.marquee-track {
    display: inline-flex; white-space: nowrap;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(2rem, 6vw, 4.2rem);
    color: rgba(255,255,255,.5);
    animation: marquee 40s linear infinite;
}
.marquee-track span { padding-right: 1.4em; }

/* FOTO */
.scene--photo .photo {
    position: relative;
    width: min(78vw, 460px); aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden;
    box-shadow: var(--shadow); border: 1px solid var(--faint);
    background: linear-gradient(140deg, #16233c, #0d1626);
    cursor: pointer;
}
.scene--photo .photo img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 1.2s var(--ease), filter 1.2s var(--ease);
    transform: scale(1.02);
}
.scene--photo .photo:hover img { transform: scale(1.08); filter: brightness(.6); }

/* Piccola frase sopra la foto in hover */
.photo-hover {
    position: absolute; inset: auto 0 0 0;
    padding: 22px 20px 20px;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
    opacity: 0; transform: translateY(10px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
    pointer-events: none;
}
.scene--photo .photo:hover .photo-hover { opacity: 1; transform: none; }

.photo-cap {
    margin-top: 2rem; font-family: 'Cormorant Garamond', serif; font-style: italic;
    font-size: clamp(1.15rem, 3vw, 1.6rem); color: var(--muted); max-width: 520px;
}

/* Placeholder eleganti */
.ph img { opacity: 0; }
.ph::after {
    content: \"foto\"; position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Outfit', sans-serif; text-transform: uppercase; letter-spacing: .3em;
    font-size: .6rem; color: rgba(255, 255, 255, .3);
}
.ph { position: relative; }
.ph--1 { background: linear-gradient(150deg, #1b2740, #0e1626); }
.ph--2 { background: linear-gradient(150deg, #202a45, #101a2c); }
.ph--3 { background: linear-gradient(150deg, #182338, #0c1422); }

/* VIDEO */
.video-frame {
    width: min(86vw, 720px); border-radius: 22px; overflow: hidden;
    box-shadow: var(--shadow); border: 1px solid var(--faint); background: #060b14;
    aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* RICORDI */
.memories { list-style: none; display: flex; flex-direction: column; gap: 1.4rem; max-width: 640px; }
.memories li { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.3rem, 3.4vw, 2rem); font-weight: 400; color: rgba(255,255,255,.9); }
.pets { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 3rem; }
.pet {
    width: clamp(90px, 26vw, 170px); aspect-ratio: 1; border-radius: 18px; overflow: hidden;
    box-shadow: var(--shadow); border: 1px solid var(--faint); position: relative;
    background: linear-gradient(140deg, #16233c, #0d1626);
}
.pet img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.pet:hover img { transform: scale(1.08); }

/* =========================================================
   TIMELINE VERTICALE
   ========================================================= */
.scene--timeline .timeline {
    list-style: none; position: relative;
    max-width: 520px; width: 100%;
    margin-top: .6rem;
    padding-left: 26px;
    text-align: left;
}
.t-item {
    position: relative;
    padding: 22px 0 22px 26px;
    opacity: 0; transform: translateY(20px); filter: blur(6px);
    transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
}
.t-item.in { opacity: 1; transform: none; filter: blur(0); }
.t-item p {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.3rem, 3.4vw, 1.9rem);
    font-style: italic;
    color: rgba(255,255,255,.92);
}
.t-dot {
    position: absolute; left: -3px; top: 30px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(247,197,216,.12);
}
.t-line {
    position: absolute; left: 2px; top: 42px;
    width: 1px; height: calc(100% - 30px);
    background: linear-gradient(to bottom, var(--accent), transparent);
    transform-origin: top; transform: scaleY(0);
    transition: transform 1.4s var(--ease);
}
.t-item.in .t-line { transform: scaleY(1); }
.t-item:last-child .t-line { display: none; }

/* =========================================================
   FINTE SCELTE
   ========================================================= */
.scene--choice { min-height: 70vh; }
.choice-question {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-style: italic;
    color: rgba(255,255,255,.94);
}
.choice-buttons {
    position: relative;
    display: flex; gap: 16px; margin-top: 2.4rem; flex-wrap: wrap; justify-content: center;
    min-height: 60px;
}
.choice-buttons button {
    font-family: 'Outfit', sans-serif; cursor: pointer;
    padding: 13px 34px; font-size: .98rem; border-radius: 40px;
    transition: transform .5s var(--ease), background .35s var(--ease),
                color .35s var(--ease), border-color .35s var(--ease),
                left .5s var(--ease), top .5s var(--ease);
    border: 1px solid var(--faint);
}
.choice-yes {
    background: var(--accent); color: #10131b; border-color: transparent;
    box-shadow: 0 12px 30px -14px var(--accent);
}
.choice-yes:hover { transform: translateY(-2px); }
.choice-no {
    background: rgba(255,255,255,.05); color: var(--muted);
}
.choice-no:hover { background: rgba(255,255,255,.09); }
.choice-no.roaming { position: absolute; }
.choice-no.morphed {
    background: var(--accent); color: #10131b; border-color: transparent;
    box-shadow: 0 12px 30px -14px var(--accent);
}
.choice-hint {
    margin-top: 1.4rem;
    font-family: 'Cormorant Garamond', serif; font-style: italic;
    color: var(--muted); font-size: .95rem;
}

/* LETTERA */
.letter-card {
    width: min(88vw, 640px); text-align: left;
    background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
    border: 1px solid var(--faint); border-radius: 22px;
    padding: clamp(28px, 5vw, 52px);
    box-shadow: var(--shadow); backdrop-filter: blur(14px);
    position: relative; min-height: 220px;
}
.letter-text {
    font-family: 'Cormorant Garamond', serif; font-size: clamp(1.2rem, 3vw, 1.7rem);
    line-height: 1.75; white-space: pre-wrap; color: rgba(255,255,255,.92);
}
/* Parole importanti evidenziate leggermente */
.letter-text .key {
    color: var(--accent);
    font-style: italic;
}
.caret {
    display: inline-block; width: 2px; height: 1.3em; background: var(--accent);
    vertical-align: text-bottom; margin-left: 2px; animation: blink 1s step-end infinite; opacity: 0;
}
.caret.on { opacity: 1; }

.ghost-btn {
    margin-top: 2.6rem; padding: 14px 30px; font-size: 1rem; color: var(--text);
    background: transparent; border: 1px solid var(--accent); border-radius: 40px;
    letter-spacing: .04em; opacity: 0; transform: translateY(14px); pointer-events: none;
    transition: opacity 1s var(--ease), transform 1s var(--ease), background .4s var(--ease), color .4s var(--ease);
}
.ghost-btn.show { opacity: 1; transform: none; pointer-events: auto; }
.ghost-btn:hover { background: var(--accent); color: #10131b; }

/* =========================================================
   6 · DOMANDA FINALE
   ========================================================= */
.scene--final { min-height: 100vh; }
.final-inner { display: flex; flex-direction: column; align-items: center; gap: 0; max-width: 780px; }
.final-pre {
    opacity: 0; transform: translateY(20px); filter: blur(8px);
    transition: opacity 1.4s var(--ease), transform 1.4s var(--ease), filter 1.4s var(--ease);
}
.final-pre.in { opacity: 1; transform: none; filter: blur(0); }

.final-q {
    color: var(--accent); margin-top: 2.6rem; font-style: italic;
    opacity: 0; transform: translateY(20px) scale(.98); filter: blur(8px);
    transition: opacity 1.6s var(--ease), transform 1.6s var(--ease), filter 1.6s var(--ease);
    font-size: clamp(2.2rem, 7vw, 5rem);
}
.final-q.in { opacity: 1; transform: none; filter: blur(0); }

.answer-buttons {
    display: flex; gap: 18px; margin-top: 3rem; justify-content: center; flex-wrap: wrap;
    opacity: 0; transform: translateY(16px); pointer-events: none;
    transition: opacity 1.2s var(--ease) .4s, transform 1.2s var(--ease) .4s;
}
.answer-buttons.in { opacity: 1; transform: none; pointer-events: auto; }
.answer-buttons.gone { opacity: 0; pointer-events: none; transform: translateY(10px); }

#yesBtn {
    padding: 16px 42px; font-size: 1.1rem; color: #10131b; font-weight: 500;
    background: var(--accent); border: none; border-radius: 40px;
    box-shadow: 0 16px 40px -14px var(--accent);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
#yesBtn:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 22px 48px -14px var(--accent); }

#noBtn {
    padding: 16px 42px; font-size: 1.1rem; color: var(--muted); font-weight: 400;
    background: rgba(255, 255, 255, .05); border: 1px solid var(--faint); border-radius: 40px;
    transition: transform .5s var(--ease), background .35s var(--ease), left .5s var(--ease), top .5s var(--ease);
}
#noBtn:hover { background: rgba(255, 255, 255, .09); }
#noBtn.roaming { position: fixed; z-index: 40; }

.final-outcome {
    margin-top: 2.4rem; font-family: 'Cormorant Garamond', serif; font-style: italic;
    font-size: clamp(1.5rem, 4.5vw, 2.6rem); color: var(--text);
    opacity: 0; transform: translateY(16px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}
.final-outcome.in { opacity: 1; transform: none; }
.final-outcome-sub {
    margin-top: 1rem; color: var(--muted); font-size: clamp(1rem, 2.6vw, 1.25rem); font-weight: 300;
    opacity: 0; transform: translateY(14px); transition: opacity 1.4s var(--ease) .5s, transform 1.4s var(--ease) .5s;
    font-family: 'Cormorant Garamond', serif; font-style: italic;
}
.final-outcome-sub.in { opacity: 1; transform: none; }
.final-outcome-third {
    margin-top: 1rem; color: var(--muted); font-size: clamp(1rem, 2.6vw, 1.25rem);
    opacity: 0; transform: translateY(14px); transition: opacity 1.4s var(--ease) .3s, transform 1.4s var(--ease) .3s;
    font-family: 'Cormorant Garamond', serif; font-style: italic;
}
.final-outcome-third.in { opacity: 1; transform: none; }

/* Petali */
.fx-layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.petal {
    position: absolute; top: -40px; width: 12px; height: 20px;
    background: var(--accent);
    border-radius: 60% 60% 60% 60% / 70% 70% 40% 40%;
    opacity: .85; will-change: transform;
    box-shadow: 0 0 12px rgba(247,197,216,.35);
}

/* =========================================================
   PENSIERI FLUTTUANTI (dialoghi durante lo scroll)
   ========================================================= */
.thoughts-layer {
    position: fixed; inset: 0; z-index: 12;
    pointer-events: none; overflow: hidden;
}
.thought {
    position: absolute;
    font-family: 'Cormorant Garamond', serif; font-style: italic;
    color: rgba(255,255,255,.72);
    font-size: clamp(.95rem, 1.6vw, 1.15rem);
    padding: 10px 16px;
    background: rgba(8, 17, 31, .55);
    border: 1px solid rgba(247,197,216,.18);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(12px);
    animation: thoughtIO 5.6s var(--ease) forwards;
    max-width: 280px;
    white-space: normal;
    letter-spacing: .01em;
}

/* =========================================================
   TOAST · notifiche eleganti (insulti affettuosi)
   ========================================================= */
.toast-layer {
    position: fixed; z-index: 70;
    right: 22px; bottom: 22px;
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
    pointer-events: none; max-width: 90vw;
}
.toast {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: #fff;
    background: rgba(8, 17, 31, .78);
    border: 1px solid rgba(247,197,216,.22);
    border-radius: 14px;
    padding: 14px 20px 14px 40px;
    box-shadow: 0 20px 50px -20px rgba(0,0,0,.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    font-size: 1rem;
    max-width: 340px;
    transform: translateX(30px); opacity: 0;
    animation: toastIO 4.2s var(--ease) forwards;
    position: relative;
}
.toast::before {
    content: \"\"; position: absolute; left: 16px; top: 50%;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    transform: translateY(-50%);
    box-shadow: 0 0 12px rgba(247,197,216,.6);
}

/* =========================================================
   KEYFRAMES
   ========================================================= */
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes maskUp { to { transform: translateY(0); opacity: 1; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes lineDrop {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}
@keyframes petalFall {
    to { transform: translate(var(--dx), 108vh) rotate(var(--rot)); opacity: 0; }
}
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@keyframes thoughtIO {
    0%   { opacity: 0; transform: translateY(14px); filter: blur(6px); }
    18%  { opacity: 1; transform: translateY(0); filter: blur(0); }
    80%  { opacity: 1; transform: translateY(-4px); filter: blur(0); }
    100% { opacity: 0; transform: translateY(-16px); filter: blur(6px); }
}
@keyframes toastIO {
    0%   { opacity: 0; transform: translateX(30px); }
    10%  { opacity: 1; transform: translateX(0); }
    85%  { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(30px); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 600px) {
    .scene { padding: 12vh 6vw; }
    .chapter { margin-bottom: 1.8rem; }
    .answer-buttons { gap: 14px; width: 100%; }
    #yesBtn, #noBtn { flex: 1 1 130px; padding: 15px 20px; }
    .scroll-hint { bottom: 4vh; }
    .letter-card { min-height: 180px; }
    .toast-layer { right: 12px; bottom: 12px; left: 12px; align-items: stretch; }
    .toast { max-width: 100%; }
    .thought { max-width: 220px; font-size: .95rem; }
    .marquee-track { font-size: clamp(1.6rem, 8vw, 3rem); }
}

/* Riduci il movimento se richiesto */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .2s !important; }
    html { scroll-behavior: auto; }
    .marquee-track { animation: none; }
}
