/* «La notte di Lollo», pagina /halloween (29/10/2026). Il gioco si vede solo
   nella stagione (classe html.stagione-halloween di stagioni.js). */

.gl-pagina {
    position: relative;
    background:
        radial-gradient(ellipse at top right, var(--accent-tint), transparent 60%),
        radial-gradient(ellipse at bottom left, var(--primary-tint), transparent 60%),
        var(--bg);
}
.gl-contenitore { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 44px 16px 56px; }
.gl-testa { text-align: center; margin-bottom: 26px; }
.gl-testa .stg-hw-eyebrow {
    color: #a84b0d;
    background: #fff4ea;
    border-color: #f3c9a5;
    margin-bottom: 14px;
}
.gl-testa h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin: 0 0 10px;
}
.gl-sotto { color: var(--text-secondary); font-size: 1.08rem; margin: 0 auto; max-width: 560px; }

/* Fuori stagione */
.gl-fuori { display: block; text-align: center; padding: 24px 0 8px; }
.gl-fuori p { margin: 0 0 18px; color: var(--text-secondary); }
html.stagione-halloween .gl-fuori { display: none; }

/* Il gioco */
.gl-gioco { display: none; }
html.stagione-halloween .gl-gioco {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 16px 32px;
    align-items: start;
}
.gl-campo {
    position: relative;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    background: #15213f;
    box-shadow: 0 18px 40px rgba(21, 33, 63, .28);
    grid-row: span 2;
}
.gl-campo canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}
.gl-campo canvas:focus-visible { outline: 3px solid #f5862f; outline-offset: -3px; }
.gl-gioco.is-gioco .gl-campo canvas { cursor: none; }

.gl-schermo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 14, 32, .66);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.gl-schermo[hidden] { display: none; }
.gl-schermo-box { position: relative; z-index: 2; }
/* Copertina (l'illustrazione di Lollo): solo nella schermata iniziale */
.gl-copertina { display: none; }
.gl-gioco.is-pronto .gl-copertina { display: block; position: absolute; inset: 0; z-index: 0; }
.gl-copertina img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; }
.gl-gioco.is-pronto .gl-schermo {
    align-items: flex-end;
    padding-bottom: 26px;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.gl-gioco.is-pronto .gl-schermo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(10, 14, 32, 0) 52%, rgba(10, 14, 32, .78) 72%, rgba(10, 14, 32, .94) 100%);
}
.gl-gioco.is-pronto .gl-schermo-titolo { font-size: 1.3rem; margin-bottom: 4px; }
.gl-gioco.is-pronto .gl-schermo-testo { font-size: .92rem; margin-bottom: 12px; }
.gl-schermo-box { text-align: center; color: #fff; max-width: 320px; }
.gl-schermo-titolo { font-size: 1.5rem; font-weight: 800; margin: 0 0 8px; }
.gl-schermo-testo { margin: 0 0 12px; color: #dfe6f5; line-height: 1.45; }
.gl-schermo-consiglio {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(245, 134, 47, .16);
    border: 1px solid rgba(245, 134, 47, .5);
    color: #ffe2cc;
    font-size: .92rem;
    line-height: 1.45;
    text-align: left;
}
.gl-schermo-consiglio[hidden] { display: none; }
.gl-schermo-record { margin: 0 0 16px; color: #ffd29a; font-weight: 700; font-size: .95rem; }
.gl-schermo-record:empty { display: none; }
.gl-schermo-azioni { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gl-btn {
    min-height: 46px;
    padding: 0 26px;
    border-radius: 9999px;
    font: inherit;
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
}
.gl-btn[hidden] { display: none; }
.gl-btn-via { border: 0; background: #f5862f; color: #15213f; box-shadow: 0 6px 18px rgba(245, 134, 47, .4); }
.gl-btn-via:hover { background: #ff9d4f; }
.gl-btn-condividi { border: 2px solid rgba(255, 255, 255, .6); background: transparent; color: #fff; }
.gl-btn-condividi:hover { background: rgba(255, 255, 255, .1); }

/* Musica e suoni: sopra il campo, raggiungibile anche dalle schermate */
.gl-audio {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(8, 12, 30, .6);
    color: #fff;
    cursor: pointer;
}
.gl-audio:hover { background: rgba(8, 12, 30, .8); }
.gl-audio:focus-visible { outline: 3px solid #f5862f; outline-offset: 2px; }
.gl-audio .gl-audio-no { display: none; }
.gl-audio[aria-pressed="false"] .gl-audio-si { display: none; }
.gl-audio[aria-pressed="false"] .gl-audio-no { display: block; }

/* Legenda: testo semplice, come le istruzioni di un gioco da tavolo */
.gl-legenda { display: grid; gap: 22px; max-width: 360px; padding-top: 6px; }
.gl-legenda-titolo { margin: 0 0 8px; font-size: 1.15rem; font-weight: 800; }
.gl-legenda--si .gl-legenda-titolo { color: #23704c; }
.gl-legenda--no .gl-legenda-titolo { color: #a8321f; }
.gl-legenda ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gl-legenda li { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 1rem; }
.gl-legenda li b { color: #23704c; font-weight: 800; }
.gl-ico { width: 32px; display: inline-flex; justify-content: center; flex-shrink: 0; }
.gl-nota { margin: 0; color: var(--text-secondary); font-size: .95rem; line-height: 1.5; max-width: 360px; }

.gl-credito { margin: 0; color: var(--text-muted); font-size: .82rem; line-height: 1.5; max-width: 360px; }
.gl-credito a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Consigli in fondo */
.gl-consigli { background: #15213f; color: #fff; }
.gl-consigli .gl-contenitore { max-width: 760px; padding: 48px 16px 56px; }
.gl-consigli h2 { color: #fff; margin: 0 0 8px; font-size: clamp(1.5rem, 3.5vw, 2rem); }
.gl-consigli-lead { color: #c9d3ea; margin: 0 0 20px; }

/* Decorazioni sulla pagina del gioco: solo negli angoli e nei margini alti */
.stg-pipistrelli--gioco .stg-pip-1 { left: 3%; top: 150px; width: 66px; height: 33px; }
.stg-pipistrelli--gioco .stg-pip-4 { right: 3%; top: 170px; width: 60px; height: 30px; }
.stg-pipistrelli--gioco .stg-pip-2,
.stg-pipistrelli--gioco .stg-pip-3,
.stg-pipistrelli--gioco .stg-pip-5,
.stg-pipistrelli--gioco .stg-pip-6 { display: none; }
.stg-pipistrelli--gioco .stg-fantasma { right: 4%; top: 290px; }
html.stagione-halloween .gl-pagina .stg-pipistrelli { display: block; }
@media (max-width: 1100px) {
    .stg-pipistrelli--gioco .stg-fantasma { display: none; }
}

@media (max-width: 820px) {
    .gl-contenitore { padding: 28px 16px 40px; }
    html.stagione-halloween .gl-gioco { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .gl-campo { grid-row: auto; }
    .gl-legenda { grid-template-columns: 1fr 1fr; gap: 16px; max-width: none; }
    .gl-legenda li { gap: 8px; font-size: .92rem; }
    .gl-nota, .gl-credito { max-width: none; }
    .gl-ico { width: 28px; }
    .stg-pipistrelli--gioco .stg-pip-1 { left: 17%; top: 12px; width: 40px; height: 20px; }
    .stg-pipistrelli--gioco .stg-pip-4 { right: 17%; top: 22px; width: 32px; height: 16px; }
}
@media (max-width: 400px) {
    .gl-legenda { grid-template-columns: 1fr; }
}
