/* ============================================================
   I Tarocchi Italiani — Design System condiviso
   "Refine Dark Mystic": base notturna profonda, aurora animata,
   oro misurato. Le carte (immagini e cornici) non vengono toccate.
   ============================================================ */

:root {
    /* Token legacy preservati (carte e codice esistente vi fanno riferimento) */
    --mystic-purple: #2D1B45;
    --antique-gold: #B8860B;
    --soft-cream: #F5F5DC;
    --rich-burgundy: #800020;
    --muted-teal: #4A6741;
    --warm-amber: #FFBF00;
    --charcoal-gray: #36454F;

    /* Token raffinati per il restyling */
    --ink: #150D26;
    --ink-2: #20133C;
    --gold: #D4AF37;
    --gold-light: #F1D489;
    --gold-deep: #9C7A1E;
    --cream: #F4EFDD;
    --panel: rgba(24, 15, 44, 0.72);
    --panel-strong: rgba(22, 13, 40, 0.88);
    --panel-border: rgba(212, 175, 55, 0.35);
    --hairline: rgba(244, 239, 221, 0.08);
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-deep: 0 26px 70px -18px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.55);
    --shadow-gold: 0 12px 34px -10px rgba(212, 175, 55, 0.4);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quattrocento Sans', sans-serif;
    color: var(--soft-cream);
    background:
        radial-gradient(90% 60% at 12% 8%, rgba(128, 0, 32, 0.28), transparent 60%),
        radial-gradient(70% 55% at 88% 12%, rgba(212, 175, 55, 0.1), transparent 62%),
        linear-gradient(150deg, #160D2A 0%, #231544 42%, #34153B 70%, #160D2A 100%);
    background-attachment: fixed;
    overscroll-behavior-y: none;
    -webkit-font-smoothing: antialiased;
}

/* ---- Aurora di fondo (schermo intero, dietro al contenuto) ---- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background:
        radial-gradient(46% 42% at 18% 24%, rgba(128, 0, 32, 0.34), transparent 68%),
        radial-gradient(40% 36% at 84% 16%, rgba(212, 175, 55, 0.15), transparent 66%),
        radial-gradient(56% 48% at 52% 92%, rgba(88, 60, 140, 0.42), transparent 72%),
        radial-gradient(28% 32% at 90% 84%, rgba(74, 103, 65, 0.14), transparent 70%);
    background-attachment: fixed;
    animation: aurora-drift 26s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

@keyframes aurora-drift {
    0%   { transform: translate(0, 0) scale(1);    opacity: 0.88; }
    50%  { transform: translate(2%, -1.5%) scale(1.06); opacity: 1; }
    100% { transform: translate(-1.5%, 1.5%) scale(1.02); opacity: 0.92; }
}

/* ---- Vignettatura + grana sottile ---- */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(120% 92% at 50% 42%, transparent 52%, rgba(7, 3, 15, 0.5) 100%),
        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='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.8;
}

/* ---- Tipografia ---- */
.mystical-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: linear-gradient(100deg, var(--gold-deep) 0%, var(--gold) 30%, var(--gold-light) 50%, var(--gold) 70%, var(--gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.85), 0 12px 32px rgba(0, 0, 0, 0.55), 0 2px 28px rgba(212, 175, 55, 0.45);
}

.card-name {
    font-family: 'MedievalSharp', cursive;
    color: var(--gold);
    letter-spacing: 0.02em;
}

.glow-text {
    text-shadow: 0 0 14px rgba(212, 175, 55, 0.55), 0 0 34px rgba(212, 175, 55, 0.3);
}

/* Titolo magico: shimmer oro + bagliore pulsante + scintille ✦ ai lati */
.title-magic {
    background-size: 200% auto;
    animation: titleShimmer 5s ease-in-out infinite, titleGlow 4s ease-in-out infinite;
}

@keyframes titleShimmer {
    0%, 100% { background-position: 0% center; }
    50%      { background-position: 100% center; }
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 0 3px 8px rgba(0, 0, 0, 0.85), 0 12px 32px rgba(0, 0, 0, 0.55), 0 2px 30px rgba(212, 175, 55, 0.65), 0 0 16px rgba(212, 175, 55, 0.35); }
    50%      { text-shadow: 0 4px 10px rgba(0, 0, 0, 0.9), 0 14px 38px rgba(0, 0, 0, 0.6), 0 0 26px rgba(212, 175, 55, 0.95), 0 0 60px rgba(212, 175, 55, 0.65), 0 0 90px rgba(212, 175, 55, 0.4); }
}

.title-spark {
    display: inline-block;
    color: var(--gold-light);
    text-shadow: 0 0 16px rgba(212, 175, 55, 1), 0 0 36px rgba(212, 175, 55, 0.8);
    animation: sparkTwinkle 2.4s ease-in-out infinite;
}

@keyframes sparkTwinkle {
    0%, 100% { opacity: 0.35; transform: scale(0.85) rotate(-8deg); }
    40%      { opacity: 1;    transform: scale(1.15) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
    .title-magic, .title-spark { animation: none; }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* ---- Elementi interattivi generici ---- */
button, a, input, select {
    touch-action: manipulation;
}

* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

::selection {
    background: rgba(212, 175, 55, 0.35);
    color: #FFFFFF;
}

:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---- Pulsante principale: oro sfumato con riflesso ---- */
.mystical-button {
    position: relative;
    overflow: hidden;
    background: linear-gradient(115deg, var(--gold-deep) 0%, var(--gold) 38%, var(--gold-light) 52%, var(--gold) 66%, var(--gold-deep) 100%);
    border: 1px solid rgba(244, 239, 221, 0.7);
    color: var(--ink);
    font-weight: bold;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 0 22px rgba(212, 175, 55, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mystical-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -110%;
    width: 55%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-18deg);
    transition: left 0.65s ease;
    pointer-events: none;
}

.mystical-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 34px -6px rgba(212, 175, 55, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.mystical-button:hover::after {
    left: 120%;
}

.mystical-button:active {
    transform: scale(0.97);
}

.mystical-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---- Navigazione ---- */
.site-nav {
    background: linear-gradient(180deg, rgba(21, 13, 38, 0.92), rgba(21, 13, 38, 0.72));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    box-shadow: 0 1px 0 var(--hairline), 0 8px 26px -12px rgba(0, 0, 0, 0.6);
}

.site-nav::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.6), transparent);
    pointer-events: none;
}

.nav-link {
    position: relative;
    color: rgba(244, 239, 221, 0.78);
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.7rem;
    padding: 13px 2px;
    transition: color 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.nav-link--stack {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1.15;
}

.nav-link--stack .nav-free {
    font-family: inherit;
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #e14d5a;
}

.nav-link:hover {
    color: var(--gold-light);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link.active,
.nav-link[aria-current="page"] {
    color: var(--gold-light);
}

.nav-link.active::after,
.nav-link[aria-current="page"]::after {
    transform: scaleX(1);
}

.site-nav .nav-brand {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: linear-gradient(100deg, var(--gold), var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.nav-brand-wrap {
    display: none;
    align-items: center;
    gap: 10px;
    line-height: 1;
}

@media (min-width: 380px) {
    .nav-brand-wrap {
        display: flex;
    }
}

.nav-brand-logo {
    width: 32px;
    height: 32px;
    flex: none;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.35));
    pointer-events: none;
}

@media (min-width: 640px) {
    .nav-brand-logo {
        width: 36px;
        height: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-brand-logo {
        filter: none;
    }
}

/* ---- Pannelli vetro profondi ---- */
.reading-area,
.reading-container,
.card-library,
.modal-content,
.learning-section,
.reading-summary {
    background: var(--panel);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow-deep);
}

/* Cuscinetti "pergamena" interni (box di interpretazione) */
.interpretation-card,
.interpretation-text {
    background: linear-gradient(180deg, #F8F4E3, #F1EBD3);
    color: var(--ink-2);
    border: 1px solid rgba(156, 122, 30, 0.55);
    border-radius: 14px;
    padding: 20px;
    margin: 10px 0;
    box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.45), 0 14px 40px -14px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.interpretation-card strong,
.interpretation-text strong {
    color: var(--gold-deep);
}

.reading-position,
.position-label {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* ---- Chip, tag, filtri ---- */
.keyword-tag {
    display: inline-block;
    background: linear-gradient(115deg, var(--gold-deep), var(--gold));
    color: var(--ink);
    border: 1px solid rgba(244, 239, 221, 0.55);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.02em;
    box-shadow: 0 3px 10px -3px rgba(0, 0, 0, 0.4);
}

.filter-button {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid var(--panel-border);
    color: var(--gold-light);
    padding: 9px 18px;
    min-height: 44px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}

.filter-button:hover,
.filter-button.active {
    background: linear-gradient(115deg, var(--gold-deep), var(--gold));
    color: var(--ink);
    border-color: rgba(244, 239, 221, 0.6);
    box-shadow: 0 6px 18px -6px rgba(212, 175, 55, 0.5);
}

.filter-button:active {
    transform: scale(0.96);
}

.serie-chip {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--mystic-purple);
    border: 1px solid rgba(244, 239, 221, 0.4);
}

.serie-chip.polarity-good { background: #7BAE7F; }
.serie-chip.polarity-neutral { background: #B8B8C8; }
.serie-chip.polarity-bad { background: #D9746B; }

/* ---- Input ---- */
.search-input,
.natal-input {
    background: linear-gradient(180deg, #F8F4E3, #F1EBD3);
    border: 1px solid rgba(156, 122, 30, 0.55);
    border-radius: 999px;
    padding: 10px 20px;
    min-height: 44px;
    color: var(--ink-2);
    font-size: 16px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.search-input::placeholder,
.natal-input::placeholder {
    color: var(--charcoal-gray);
}

.search-input:focus,
.natal-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.35);
}

select.natal-input {
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* Guida Belline */
.guide-toggle {
    background: rgba(244, 239, 221, 0.08);
    color: var(--soft-cream);
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    padding: 10px 20px;
    min-height: 44px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}

.guide-toggle:hover {
    background: rgba(244, 239, 221, 0.16);
    color: var(--gold-light);
}

.guide-toggle .guide-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
}

.guide-toggle.open .guide-arrow {
    transform: rotate(180deg);
}

.guide-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.guide-panel.open {
    max-height: 600px;
    opacity: 1;
}

.guide-note {
    background: rgba(244, 239, 221, 0.06);
    border-left: 3px solid var(--gold);
    border-radius: 8px;
    padding: 10px 14px;
    text-align: left;
}

.guide-note strong {
    color: var(--gold-light);
}

.question-category {
    color: var(--soft-cream);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.question-chip {
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-light);
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    padding: 6px 14px;
    min-height: 40px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.question-chip:hover {
    background: linear-gradient(115deg, var(--gold-deep), var(--gold));
    color: var(--ink);
    transform: translateY(-1px);
}

/* Domande suggerite dinamiche: tab + striscia orizzontale */
.question-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.question-tab {
    background: rgba(212, 175, 55, 0.10);
    color: var(--gold-light);
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.question-tab:hover {
    background: linear-gradient(115deg, var(--gold-deep), var(--gold));
    color: var(--ink);
    border-color: transparent;
}

.question-tab.active {
    background: linear-gradient(115deg, var(--gold-deep), var(--gold));
    color: var(--ink);
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.35);
}

.question-tab-icon {
    opacity: 0.9;
}

.question-refresh {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.10);
    color: var(--gold-light);
    border: 1px solid var(--panel-border);
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.2s ease, color 0.2s ease;
}

.question-refresh:hover {
    background: linear-gradient(115deg, var(--gold-deep), var(--gold));
    color: var(--ink);
    transform: rotate(180deg);
}

.question-scroll {
    display: flex;
    gap: 0.7rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 0.5rem 0.6rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.5) rgba(212, 175, 55, 0.08);
}

.question-scroll .question-chip {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
}

.question-scroll::-webkit-scrollbar {
    height: 6px;
}

.question-scroll::-webkit-scrollbar-track {
    background: rgba(212, 175, 55, 0.08);
    border-radius: 999px;
}

.question-scroll::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.5);
    border-radius: 999px;
}

/* ---- Messaggio generale: dashboard a pannelli di vetro colorato ---- */
/* Ogni riquadro espone un solo token d'accento (--accent): colori "vitral"
   Art Nouveau assegnati in ciclo dal JS. Default senza classe = oro. */
.advice-tint-0 { --accent: #d4af37; --accent-light: #f1dc96; --accent-soft: rgba(212, 175, 55, 0.14); --accent-glow: rgba(212, 175, 55, 0.4); --accent-line: rgba(212, 175, 55, 0.45); }
.advice-tint-1 { --accent: #e08e7a; --accent-light: #f2c2b2; --accent-soft: rgba(224, 142, 122, 0.15); --accent-glow: rgba(224, 142, 122, 0.42); --accent-line: rgba(224, 142, 122, 0.5); }
.advice-tint-2 { --accent: #9a7fd0; --accent-light: #c9b9ee; --accent-soft: rgba(154, 127, 208, 0.17); --accent-glow: rgba(154, 127, 208, 0.42); --accent-line: rgba(154, 127, 208, 0.5); }
.advice-tint-3, .advice-tint-guide { --accent: #6fbf9f; --accent-light: #a5dcc6; --accent-soft: rgba(111, 191, 159, 0.16); --accent-glow: rgba(111, 191, 159, 0.42); --accent-line: rgba(111, 191, 159, 0.5); }
.advice-tint-4, .advice-tint-gauge { --accent: #6fa3d8; --accent-light: #a9c9ec; --accent-soft: rgba(111, 163, 216, 0.16); --accent-glow: rgba(111, 163, 216, 0.42); --accent-line: rgba(111, 163, 216, 0.5); }
.advice-tint-5 { --accent: #e0953a; --accent-light: #f5c98f; --accent-soft: rgba(224, 149, 58, 0.17); --accent-glow: rgba(224, 149, 58, 0.44); --accent-line: rgba(224, 149, 58, 0.5); }

.advice-paragraph-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 18px;
    align-items: stretch;
    margin-bottom: 8px;
    position: relative;
    --accent: #d4af37;
    --accent-light: #f1dc96;
    --accent-soft: rgba(212, 175, 55, 0.14);
    --accent-glow: rgba(212, 175, 55, 0.4);
    --accent-line: rgba(212, 175, 55, 0.45);
}

.advice-paragraph-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(130% 95% at 6% 0%, var(--accent-soft), transparent 50%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02) 45%, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--accent-line);
    border-radius: 22px;
    padding: 22px 26px;
    color: var(--soft-cream);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 18px 44px -14px rgba(0, 0, 0, 0.65),
        0 10px 30px -12px var(--accent-glow);
    font-size: 1.56rem;
    line-height: 1.72;
    transform: translateZ(0);
    transition:
        transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        background 0.35s ease;
}

/* Rota d'accento a sinistra: gradiente verticale pulsante al passaggio */
.advice-paragraph-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, transparent 0%, var(--accent) 18%, var(--accent-light) 50%, var(--accent) 82%, transparent 100%);
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Scintilla d'angolo: segno puro via CSS, il textContent resta leggibile */
.advice-paragraph-card::after {
    content: "✦";
    position: absolute;
    top: 14px;
    right: 18px;
    color: var(--accent);
    font-size: 0.95rem;
    line-height: 1;
    opacity: 0.75;
    text-shadow: 0 0 8px var(--accent-glow);
    animation: adviceSparkle 5s ease-in-out infinite;
}

.advice-paragraph-card .advice-paragraph-text {
    margin: 0;
    text-wrap: pretty;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.015em;
}

/* Titolo-riassunto del paragrafo: capitolo del messaggio, appena sopra il testo,
   con riflesso d'oro animato che scorre lungo le lettere */
.advice-para-title {
    font-family: 'Cinzel', serif;
    font-size: 1.08rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 8px;
    background: linear-gradient(100deg, var(--accent) 0%, var(--accent-light) 40%, #fff7e0 50%, var(--accent-light) 60%, var(--accent) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 7px var(--accent-glow));
    animation: adviceTitleShimmer 5.5s ease-in-out infinite;
}

/* Prima card: l'apertura della lettura, con initial maiuscola in Cinzel */
.advice-paragraph-card.lede {
    background:
        radial-gradient(150% 115% at 4% -4%, var(--accent-soft), transparent 55%),
        linear-gradient(160deg, rgba(255, 244, 214, 0.08), rgba(255, 255, 255, 0.02) 45%, rgba(255, 255, 255, 0.04));
    border-color: var(--accent);
    padding-top: 30px;
    padding-bottom: 26px;
}

.advice-paragraph-card.lede .advice-paragraph-text::first-letter {
    float: left;
    font-family: 'Cinzel', serif;
    font-size: 3.1em;
    line-height: 0.82;
    padding: 2px 8px 0 0;
    margin-top: 4px;
    color: var(--accent-light);
    text-shadow: 0 2px 14px var(--accent-glow);
}

/* Ingresso a scatti: ogni card rivela in sequenza con un lieve lifting,
   dallo stesso delay la rota d'oro si distende e una luce breve la traversa */
.advice-paragraph-card.advice-reveal {
    animation:
        adviceReveal 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) backwards,
        adviceSheen 1.2s ease-out backwards;
}

.advice-paragraph-card.advice-reveal::before {
    transform-origin: top;
    animation: adviceRailGrow 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
    animation-delay: inherit;
}

.advice-paragraph-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    animation: adviceAura 2.6s ease-in-out infinite;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 24px 54px -16px rgba(0, 0, 0, 0.7),
        0 14px 40px -12px var(--accent-glow);
}

.advice-paragraph-card:hover::before {
    animation: adviceRailFlow 3.5s ease-in-out infinite;
}

.advice-paragraph-card.is-loading {
    font-style: italic;
    color: var(--gold-light);
    animation: adviceLoadingPulse 1.6s ease-in-out infinite;
}

@keyframes adviceReveal {
    from { opacity: 0; transform: translateY(18px) scale(0.985); filter: blur(2px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes adviceSparkle {
    0%, 100% { opacity: 0.55; transform: scale(0.9) rotate(0deg); filter: drop-shadow(0 0 2px var(--accent-glow)); }
    50% { opacity: 1; transform: scale(1.2) rotate(180deg); filter: drop-shadow(0 0 9px var(--accent-glow)); }
}

@keyframes adviceRailFlow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes adviceLoadingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@keyframes adviceRailGrow {
    from { transform: scaleY(0.15); opacity: 0.4; }
    to { transform: scaleY(1); opacity: 1; }
}

@keyframes adviceSheen {
    0% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 90px 70px -70px var(--accent-glow); }
    100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
}

/* Riflesso d'oro che scorre lungo le lettere del titolo */
@keyframes adviceTitleShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Alone dorato pulsante attorno al pannello mentre è sotto il cursore */
@keyframes adviceAura {
    0%, 100% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.08),
            0 24px 54px -16px rgba(0, 0, 0, 0.7),
            0 14px 40px -12px var(--accent-glow);
    }
    50% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            0 24px 60px -14px rgba(0, 0, 0, 0.72),
            0 16px 52px -10px var(--accent-glow),
            0 0 26px 2px var(--accent-glow);
    }
}

/* ---- Scintille sospese nel pannello: ornamento puro aria-hidden fluttuante ---- */
.advice-mote {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: radial-gradient(circle, #fffee8 0%, var(--accent-light) 45%, transparent 72%);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    animation-name: adviceMoteRiseA;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-fill-mode: backwards;
}
.advice-mote.b { animation-name: adviceMoteRiseB; }

@keyframes adviceMoteRiseA {
    0%   { transform: translate(0, 0) scale(0.5); opacity: 0; }
    14%  { opacity: 0.85; }
    55%  { opacity: 0.65; transform: translate(16px, -70px) scale(1); }
    100% { transform: translate(6px, -150px) scale(0.9); opacity: 0; }
}

@keyframes adviceMoteRiseB {
    0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
    14%  { opacity: 0.7; }
    55%  { opacity: 0.5; transform: translate(-13px, -62px) scale(0.95); }
    100% { transform: translate(-22px, -135px) scale(0.85); opacity: 0; }
}

/* ---- Cortina di luce che attraversa la griglia quando il messaggio prende forma ---- */
.advice-light-sweep {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 42%, rgba(255, 247, 224, 0.12) 50%, transparent 58%);
    transform: translateX(-130%);
    animation: adviceLightSweep 1.6s cubic-bezier(0.4, 0, 0.2, 1) 0.25s forwards;
}

@keyframes adviceLightSweep {
    0%   { transform: translateX(-130%); opacity: 0; }
    16%  { opacity: 1; }
    92%  { opacity: 1; }
    100% { transform: translateX(130%); opacity: 0; }
}

/* ---- Le Luci si consultano: card di caricamento ---- */
.advice-consulting {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    padding: 30px 26px;
    min-height: 130px;
}

.advice-consulting-seal {
    margin: 0;
    color: var(--gold);
    font-size: 1.7rem;
    line-height: 1;
    text-shadow: 0 0 16px rgba(212, 175, 55, 0.75);
    animation: adviceSparkle 2.4s ease-in-out infinite;
}

.advice-consulting-bar {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.06), rgba(212, 175, 55, 0.6), rgba(212, 175, 55, 0.06));
    background-size: 200% 100%;
    animation: adviceBarShimmer 1.5s linear infinite;
}

.advice-consulting-bar.wide { width: 72%; }
.advice-consulting-bar.mid { width: 54%; }
.advice-consulting-bar:not(.wide):not(.mid) { width: 42%; }

.advice-consulting-label {
    margin: 2px 0 0;
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.015em;
}

.advice-consulting-label::after {
    content: "…";
    animation: adviceDots 1.4s ease-in-out infinite;
}

@keyframes adviceBarShimmer {
    from { background-position: 0 0; }
    to { background-position: -200% 0; }
}

@keyframes adviceDots {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 1; }
}

/* ---- Intestazione della sezione: kicker sopra il titolo ---- */
.advice-kicker {
    font-family: 'Cinzel', serif;
    font-size: 1.08rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    margin: 0 0 10px;
    background: linear-gradient(100deg, var(--gold), var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ---- Pulsante d'ascolto attivo: anello pulsante ---- */
@keyframes bellinePulseRing {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.55); }
    70% { box-shadow: 0 0 0 12px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

#belline-speak-btn.playing {
    animation: bellinePulseRing 1.8s ease-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .advice-paragraph-card,
    .advice-paragraph-card::before,
    .advice-paragraph-card::after {
        animation: none !important;
        transition: none !important;
    }
    .advice-paragraph-card.advice-reveal,
    .advice-paragraph-card.advice-reveal::before,
    .advice-consulting,
    .advice-consulting-bar,
    .advice-consulting-seal,
    .advice-consulting-label::after,
    #belline-speak-btn.playing {
        animation: none !important;
    }
    .advice-para-title,
    .advice-card-label {
        background: none;
        -webkit-text-fill-color: currentColor;
        color: var(--accent);
        filter: none;
    }
    .advice-card-label { color: var(--accent-light); }
    .advice-mote,
    .advice-light-sweep {
        display: none;
    }
    .followup-panel,
    .followup-panel::before {
        animation: none !important;
    }
    .followup-title {
        background: none;
        -webkit-text-fill-color: currentColor;
        color: var(--accent-light);
        filter: none;
    }
}

/* ---- Badge posizione nelle carte della stesa ---- */
.belline-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.position-badge {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-deep);
    background: linear-gradient(115deg, var(--gold-light), var(--gold));
    border-radius: 999px;
    padding: 3px 12px;
    white-space: nowrap;
}

/* ---- Card derivate del messaggio generale ---- */
.advice-card-label {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--accent-line);
    background: linear-gradient(100deg, var(--accent) 0%, var(--accent-light) 50%, var(--accent) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: adviceTitleShimmer 6s ease-in-out infinite;
}

.advice-paragraph-card.derived .advice-gauge-score {
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    margin-bottom: 10px;
}

.advice-gauge-item {
    display: grid;
    grid-template-columns: 96px 1fr 26px;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
}

.advice-gauge-label {
    font-size: 0.82rem;
    color: var(--gold-light);
}

.advice-gauge-track {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--panel-border);
    overflow: hidden;
}

.advice-gauge-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease;
}

.advice-gauge-fill.good { background: linear-gradient(90deg, var(--gold-deep), var(--gold-light)); }
.advice-gauge-fill.neutral { background: linear-gradient(90deg, #8a7a4a, var(--gold-light)); }
.advice-gauge-fill.bad { background: linear-gradient(90deg, #7a2b2b, #b03a3a); }

.advice-gauge-num {
    font-family: 'Cinzel', serif;
    color: var(--cream);
    text-align: right;
    font-size: 0.9rem;
}

/* ---- Pannello "Vuoi approfondire?": CTA separata dopo il messaggio ---- */
.followup-panel {
    --accent: #e0953a;
    --accent-light: #f5c98f;
    --accent-soft: rgba(224, 149, 58, 0.17);
    --accent-glow: rgba(224, 149, 58, 0.44);
    --accent-line: rgba(224, 149, 58, 0.5);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-top: 2.5rem;
    padding: 36px 30px;
    text-align: center;
    background:
        radial-gradient(130% 120% at 50% 0%, var(--accent-soft), transparent 58%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015) 45%, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--accent-line);
    border-radius: 24px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 18px 44px -14px rgba(0, 0, 0, 0.6),
        0 12px 36px -10px var(--accent-glow);
    animation: followupReveal 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}

/* Filamento d'oro che scorre sul bordo superiore */
.followup-panel::before {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-light) 50%, transparent);
    animation: followupShine 3.2s ease-in-out infinite;
}

/* Scintilla d'angolo, coerente con le card del messaggio */
.followup-panel::after {
    content: "✦";
    position: absolute;
    top: 16px;
    right: 22px;
    color: var(--accent);
    font-size: 1.05rem;
    line-height: 1;
    opacity: 0.8;
    text-shadow: 0 0 8px var(--accent-glow);
    animation: adviceSparkle 5s ease-in-out infinite;
}

.followup-title {
    font-family: 'Cinzel', serif;
    font-size: 1.9rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 8px;
    background: linear-gradient(100deg, var(--accent) 0%, var(--accent-light) 40%, #fff7e0 50%, var(--accent-light) 60%, var(--accent) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 9px var(--accent-glow));
    animation: adviceTitleShimmer 5.5s ease-in-out infinite;
}

.followup-sub {
    color: var(--gold-light);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto 22px;
}

.followup-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 26px;
}

.followup-chip {
    padding: 10px 18px;
    min-height: 44px;
    font-size: 0.9rem;
}

.followup-own {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.followup-input {
    width: 100%;
    max-width: 460px;
}

.followup-go {
    white-space: nowrap;
}

@keyframes followupReveal {
    from { opacity: 0; transform: translateY(22px) scale(0.985); filter: blur(2px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes followupShine {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

/* ---- Modal (Libreria) ---- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 5, 20, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-content {
    background: linear-gradient(180deg, rgba(248, 244, 227, 0.985), rgba(241, 235, 211, 0.985));
    color: var(--ink-2);
    margin: 3% auto;
    padding: 30px;
    border: 3px solid var(--gold);
    border-radius: 22px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.75), 0 0 0 1px var(--gold-deep);
}

.modal-content h2,
.modal-content h3 {
    color: var(--gold-deep);
}

.close {
    color: var(--gold-deep);
    float: right;
    font-size: 30px;
    line-height: 1;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.close:hover {
    color: var(--rich-burgundy);
    transform: rotate(90deg);
}

/* ---- Sezione didattica ---- */
.learning-section {
    background: linear-gradient(180deg, rgba(26, 16, 46, 0.8), rgba(22, 13, 40, 0.7));
}

.learning-section ul {
    list-style: none;
    padding-left: 0;
}

.learning-section ul li {
    position: relative;
}

/* Icone ornamentali SVG (sostituiscono le emoji) */
.learn-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.8rem;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(212, 175, 55, 0.35));
}

.learn-icon svg,
.learn-icon path,
.learn-icon circle {
    stroke: var(--gold);
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- Pricing — Scegli il tuo cammino ---- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 30px 26px;
    background: var(--panel);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow-deep);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.6);
}

.pricing-card.is-active {
    border-color: var(--gold);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.4), 0 18px 48px -14px rgba(212, 175, 55, 0.45), var(--shadow-deep);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
    background: linear-gradient(115deg, var(--gold-light), var(--gold));
    border: 1px solid rgba(244, 239, 221, 0.7);
    border-radius: 999px;
    padding: 5px 14px;
    box-shadow: 0 6px 18px -6px rgba(212, 175, 55, 0.6);
    white-space: nowrap;
}

.pricing-plan {
    font-family: 'MedievalSharp', cursive;
    color: var(--gold);
    font-size: 1.5rem;
    letter-spacing: 0.02em;
    margin: 0;
}

.pricing-price {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--cream);
    font-weight: 700;
}

.pricing-period {
    display: block;
    font-family: 'Quattrocento Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: rgba(244, 239, 221, 0.6);
    margin-top: 6px;
}

.pricing-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.pricing-feature {
    position: relative;
    padding-left: 20px;
    font-size: 0.95rem;
    color: rgba(244, 239, 221, 0.88);
    line-height: 1.4;
}

.pricing-feature::before {
    content: "✦";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--gold);
    font-size: 0.8em;
}

.pricing-note {
    font-size: 0.82rem;
    font-style: italic;
    color: rgba(244, 239, 221, 0.58);
    margin: 0;
}

.pricing-cta {
    margin-top: 4px;
    width: 100%;
}

.pricing-status {
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--gold-light);
}

.pricing-checkout-note {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(244, 239, 221, 0.6);
    margin: 22px auto 0;
    max-width: 46rem;
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .pricing-checkout-note {
        text-align: left;
    }
}

/* ---- Footer ---- */
.site-footer {
    background: linear-gradient(180deg, rgba(21, 13, 38, 0.7), rgba(21, 13, 38, 0.92));
    border-top: 1px solid var(--hairline);
    box-shadow: 0 -1px 0 rgba(212, 175, 55, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-footer .footer-text {
    color: rgba(244, 239, 221, 0.72);
    letter-spacing: 0.04em;
}

/* ---- Riduzione movimento ---- */
@media (prefers-reduced-motion: reduce) {
    body::before {
        animation: none;
    }

    .mystical-button,
    .mystical-button:hover,
    .mystical-button:active {
        transition: none;
        transform: none;
    }

    .mystical-button::after {
        display: none;
    }

    .fade-in {
        animation: none;
        opacity: 1;
        transform: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .mystical-title {
        letter-spacing: 0.02em;
    }

    .modal-content {
        margin: 6% auto;
        padding: 20px;
        width: 95%;
        border-radius: 18px;
    }

    .nav-link {
        font-size: 0.6rem;
        letter-spacing: 0.02em;
    }

    .nav-link--stack .nav-free {
        font-size: 0.48rem;
    }
}

/* ---- Selettore tipologia di stesa (libera / narrativa) ---- */
.mode-pill {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold-light);
    background: linear-gradient(115deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.mode-pill:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.mode-pill.is-active {
    color: var(--gold-deep);
    background: linear-gradient(115deg, var(--gold-light), var(--gold));
    box-shadow: 0 6px 18px -6px rgba(212, 175, 55, 0.6);
}

/* ---- Banner Carta Natale nella Stesa Narrativa ---- */
.natal-banner {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: var(--gold-light);
    background: linear-gradient(115deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.06));
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 999px;
    padding: 10px 20px;
}

/* ---- Respiro pre-estrazione ---- */
#belline-breath {
    animation: breathFade 0.4s ease-out;
}

.breath-rings {
    position: relative;
    width: 120px;
    height: 120px;
    margin-top: 1rem;
}

.breath-rings span {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(212, 175, 55, 0.55);
    border-radius: 50%;
    animation: breathRing 3.2s ease-out infinite;
}

.breath-rings span:nth-child(2) { animation-delay: 0.5s; border-color: rgba(212, 175, 55, 0.35); }
.breath-rings span:nth-child(3) { animation-delay: 1s; border-color: rgba(212, 175, 55, 0.2); }

@keyframes breathFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes breathRing {
    0% { transform: scale(0.35); opacity: 1; }
    100% { transform: scale(1.15); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    #belline-breath { animation: none; }
    .breath-rings span { animation: none; transform: scale(1); opacity: 1; }
}

/* ---- Pannello riflessione prima del messaggio ---- */
.advice-reflection-panel {
    text-align: center;
}

.advice-reflection-hint {
    color: var(--soft-cream);
    opacity: 0.85;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 46ch;
    margin: 0 auto 0.5rem;
}

.belline-reflection-input {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    display: block;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--accent-line);
    border-radius: 14px;
    padding: 12px 16px;
    color: var(--soft-cream);
    font-family: inherit;
    font-size: 0.98rem;
    line-height: 1.55;
    resize: vertical;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.belline-reflection-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.belline-reflection-input::placeholder {
    color: rgba(255, 253, 240, 0.4);
}

.mystical-button.is-ghost {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: var(--gold-light);
}

.mystical-button.is-ghost:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
}

/* ---- Riflessione salvata nello storico ---- */
.belline-history-reflection {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: var(--gold-light);
    font-style: italic;
    opacity: 0.9;
}

/* ---- Link secondari nel footer ---- */
.footer-links .nav-link {
    font-size: 0.9rem;
    opacity: 0.85;
}

.footer-links .nav-link:hover {
    opacity: 1;
}
/* ---- Gateway di ingresso (SVG full-screen: stella + disclaimer animato) ---- */
body.belline-gateway-lock {
    overflow: hidden;
}

.belline-gateway {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: #0E0819;
    opacity: 1;
    transition: opacity 0.45s ease;
}

.belline-gateway.is-leaving {
    opacity: 0;
    pointer-events: none;
}

.belline-gateway__svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- Titolo lettera per lettera --- */
.gateway-title .gateway-letter {
    opacity: 0;
    animation: gateway-letter-in 0.45s ease forwards;
}

@keyframes gateway-letter-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Paragrafi disclaimer in sequenza --- */
.gateway-para {
    opacity: 0;
}
.gateway-para--1 { animation: gateway-para-in 0.8s ease forwards 4.4s; }
.gateway-para--2 { animation: gateway-para-in 0.8s ease forwards 5.2s; }
.gateway-para--muted { animation: gateway-para-in 0.8s ease forwards 6s; }

@keyframes gateway-para-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Bottone Entra dentro foreignObject --- */
.gateway-foreign {
    position: absolute;
    bottom: clamp(28px, 7vh, 60px);
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.belline-gateway__enter {
    pointer-events: auto;
    width: auto;
    min-width: 180px;
}

.belline-gateway__enter:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.belline-gateway__enter.is-ready {
    animation: belline-gateway-pulse 1.6s ease-in-out infinite;
}

@keyframes belline-gateway-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5); }
    50% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .gateway-title .gateway-letter { animation: none; opacity: 1; }
    .gateway-para { animation: none; opacity: 1; }
    .belline-gateway__enter.is-ready { animation: none; }
    .belline-gateway { transition: none; }
}

/* ---- Reveal al scroll dei testi (blocco per blocco, con stagger) ---- */
/* Stato iniziale: nascosto. All'ingresso nel viewport JS aggiunge .is-visible. */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger: ritardo proporzionale alla posizione nel gruppo (impostato via data-delay) */
.reveal[data-delay] {
    transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
