/* Havoo: Storie dal gioco (22/10/2026; colori del sito: arancio #E08A12 su grafite) — editor «Nuova storia», schede FOTO/VIDEO nel mirino, avvisi. Script in havoo-storie.js */
.hv-st, .hv-st-avviso, .octane-camera-capture {
    --hv-st-notte: #282B35; --hv-st-notte-2: #3D3F50; --hv-st-linea: rgba(255, 255, 255, .12);
    --hv-st-arancio: #E08A12; --hv-st-arancio-hi: #F09A22; --hv-st-corallo: #FF4D4D;
}
.hv-st, .hv-st-avviso, .hv-st-modi, .hv-st-tempo, .hv-st-conto { font-family: Ubuntu, system-ui, sans-serif; }

/* il prezzo «0 duckets» della pubblicazione non serve: pubblicare è gratis */
.octane-camera-checkout .is-publish-price { display: none !important; }

/* emoji Apple in riga col testo */
.hv-emoji { width: 1.25em; height: 1.25em; vertical-align: -.25em; margin: 0 .03em; object-fit: contain; }

/* ---- mirino: schede FOTO / VIDEO (in basso nel mirino, come Instagram) ---- */
.hv-st-modi { position: absolute; left: 50%; bottom: 10px; z-index: 7; transform: translateX(-50%); display: flex; gap: 2px; padding: 3px;
    border-radius: 16px; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: default;
    pointer-events: auto; /* il mirino di Octane ha pointer-events: none */ }
.hv-st-modi button { height: 24px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
    color: rgba(255, 255, 255, .7); font: 800 11px/1 Ubuntu, system-ui, sans-serif; letter-spacing: .08em; }
.hv-st-modi button:hover { color: #fff; }
.hv-st-modi button.is-attivo { background: #fff; color: #111; }
.is-conto .hv-st-modi, .is-rec .hv-st-modi { opacity: 0; pointer-events: none; }

/* tasto «registra» al posto dello scatto rosso (solo in VIDEO) */
.hv-st-registra { display: none; position: absolute; top: 362px; left: 120px; z-index: 7; width: 98px; height: 95px; padding: 0; border: 0;
    background: #2A2B2D; cursor: pointer; place-items: center; }
.hv-modo-video .hv-st-registra { display: grid; }
.hv-st-registra svg { position: absolute; width: 84px; height: 84px; transform: rotate(-90deg); }
.hv-st-registra circle { fill: none; stroke-width: 6; }
.hv-st-registra .fondo { stroke: #fff; }
.hv-st-registra .anello { stroke: var(--hv-st-corallo); stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.hv-st-registra span { position: relative; width: 58px; height: 58px; border-radius: 50%; background: var(--hv-st-corallo);
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); transition: width .2s, height .2s, border-radius .2s; }
.hv-st-registra:hover span { filter: brightness(1.08); }
.hv-st-registra:active span { transform: scale(.94); }
.is-rec .hv-st-registra span { width: 30px; height: 30px; border-radius: 7px; }
.is-conto .hv-st-registra span { width: 30px; height: 30px; border-radius: 7px; background: #fff; }

/* tempo di registrazione in alto nel mirino */
.hv-st-tempo { display: none; position: absolute; left: 50%; top: 10px; z-index: 7; transform: translateX(-50%); align-items: center; gap: 6px;
    height: 26px; padding: 0 11px; border-radius: 13px; background: var(--hv-st-corallo); color: #fff; font: 800 12px/1 Ubuntu, system-ui, sans-serif; }
.hv-st-tempo i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: hv-st-pulsa 1s ease-in-out infinite; }
.hv-st-tempo small { opacity: .75; font-weight: 700; }
.is-rec .hv-st-tempo { display: inline-flex; }
@keyframes hv-st-pulsa { 50% { opacity: .3; } }
/* durante la registrazione un bordo rosso sul mirino */
.is-rec .octane-camera-viewfinder::after { content: ""; position: absolute; inset: 0; z-index: 6; pointer-events: none; box-shadow: inset 0 0 0 3px var(--hv-st-corallo); }

/* conto alla rovescia 3-2-1 al centro del mirino */
.hv-st-conto { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; pointer-events: none; background: rgba(0, 0, 0, .25);
    color: #fff; font: 800 110px/1 Ubuntu, system-ui, sans-serif; text-shadow: 0 4px 18px rgba(0, 0, 0, .6); }
.hv-st-conto.is-batti { animation: hv-st-batti 1s ease-out; }
@keyframes hv-st-batti { from { transform: scale(1.6); opacity: 0; } 25% { transform: scale(1); opacity: 1; } to { opacity: .25; } }

/* ---- scheda «Nuova storia», stile Instagram: anteprima 9:16 a tutto schermo, testo sopra, strumenti in alto ---- */
.hv-st { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 16px;
    background: rgba(5, 7, 22, .78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: hv-st-entra .18s ease-out; }
@keyframes hv-st-entra { from { opacity: 0; } }
@keyframes hv-st-sale { from { transform: translateY(24px) scale(.97); opacity: 0; } }
.hv-st-card { position: relative; width: min(420px, calc((100dvh - 32px) * 9 / 16), 100%); aspect-ratio: 9 / 16; overflow: hidden;
    border-radius: 22px; background: #000; color: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: hv-st-sale .25s cubic-bezier(.2, .9, .3, 1.1); }
.hv-st-media { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; cursor: text; }
.hv-st-sfondo { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(26px) brightness(.5) saturate(1.3); }
.hv-st-media img, .hv-st-media video { position: relative; width: 100%; image-rendering: pixelated; pointer-events: none; }

.hv-st-top { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start;
    padding: 12px; padding-top: max(12px, env(safe-area-inset-top)); background: linear-gradient(rgba(0, 0, 0, .45), transparent); }
.hv-st-strumenti { display: flex; flex-direction: column; gap: 10px; }
.hv-st-tondo .hv-emoji { width: 24px; height: 24px; margin: 0; vertical-align: 0; }
.hv-st-tondo { width: 42px; height: 42px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
    background: rgba(0, 0, 0, .42); color: #fff; font-size: 20px; line-height: 1; transition: transform .12s, background .12s; }
.hv-st-tondo:hover { background: rgba(0, 0, 0, .6); }
.hv-st-tondo:active { transform: scale(.92); }
.hv-st-tondo[hidden] { display: none; }

.hv-st-adesivi { position: absolute; left: 14px; top: calc(max(12px, env(safe-area-inset-top)) + 54px); right: 70px; z-index: 3;
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hv-st-adesivo { max-width: 100%; padding: 7px 12px; border: 0; border-radius: 10px; cursor: pointer; font: 800 13px Ubuntu, system-ui, sans-serif;
    background: #fff; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); transform: rotate(-2deg); }
.hv-st-musica-tag { background: var(--hv-st-arancio); color: #fff; transform: rotate(1.5deg); }
.hv-st-adesivo[hidden] { display: none; }
.hv-st-stanza { cursor: default; }

.hv-st-scrivi { position: absolute; left: 16px; right: 16px; bottom: 130px; z-index: 3; display: flex; flex-direction: column; align-items: center; }
.hv-st-testo { display: inline-block; width: auto; min-width: 40%; max-width: 100%; box-sizing: border-box; min-height: 1.3em; max-height: 190px; overflow: auto; border: 0; outline: none; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text;
    padding: 9px 12px; border-radius: 12px; background: transparent; color: #fff; caret-color: var(--hv-st-arancio-hi);
    font: 800 19px/1.3 Ubuntu, system-ui, sans-serif; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.hv-st-testo:empty::before { content: attr(data-vuoto); color: rgba(255, 255, 255, .8); }
.hv-st-testo.ha-testo { background: rgba(0, 0, 0, .5); text-shadow: none; }
.hv-st-conta { margin-top: 4px; font-size: 11px; color: rgba(255, 255, 255, .7); }

.hv-st-piede { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; flex-direction: column; align-items: stretch; gap: 10px;
    padding: 30px 14px 14px; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.hv-st-azioni { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hv-st-descr { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 0; border: 0; background: none; cursor: pointer;
    color: #fff; text-align: left; font: 14px/1.35 Ubuntu, system-ui, sans-serif; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); white-space: pre-wrap; }
.hv-st-descr.is-vuota { color: rgba(255, 255, 255, .65); font-style: italic; }
.hv-st-tipo { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .8); }
.hv-st-condividi { height: 46px; padding: 0 22px; border: 0; border-radius: 23px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    background: var(--hv-st-arancio); color: #fff; font: 800 15px Ubuntu, system-ui, sans-serif; box-shadow: 0 6px 20px rgba(224, 138, 18, .35); }
.hv-st-condividi:hover { filter: brightness(1.06); }
.hv-st-condividi:active { transform: scale(.97); }

/* pannello che sale dal basso */
.hv-st-pannello { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; max-height: 62%; overflow: auto; padding: 0 14px 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: var(--hv-st-notte);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .45); animation: hv-st-pannello .2s ease-out; }
@keyframes hv-st-pannello { from { transform: translateY(40%); opacity: 0; } }
.hv-st-pannello[hidden], .hv-st-pannello [hidden] { display: none; }
.hv-st-pannello-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; background: inherit; }
.hv-st-pannello-head::before { content: ''; position: absolute; left: 50%; top: 6px; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: rgba(255, 255, 255, .25); }
.hv-st-pannello-head b { font-size: 15px; }
.hv-st-fatto { border: 0; background: none; color: var(--hv-st-arancio-hi); font: 800 14px Ubuntu, system-ui, sans-serif; cursor: pointer; padding: 6px 2px; }
.hv-st-emoji { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 2px; }
.hv-st-emoji button { height: 46px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; display: grid; place-items: center; }
.hv-st-emoji .hv-emoji { width: 30px; height: 30px; margin: 0; vertical-align: 0; }
.hv-st-emoji button:hover, .hv-st-emoji button:active { background: var(--hv-st-linea); }
.hv-st-campo { position: relative; display: flex; flex-direction: column; gap: 6px; }
.hv-st-campo textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--hv-st-linea); border-radius: 12px; outline: none; resize: none;
    background: var(--hv-st-notte-2); color: #fff; font: 16px/1.4 Ubuntu, system-ui, sans-serif; padding: 12px 14px; }
.hv-st-campo textarea:focus { border-color: var(--hv-st-arancio); }
.hv-st-conta-d { align-self: flex-end; font-size: 11px; color: rgba(255, 255, 255, .5); }
.hv-st-campo input { flex: 1; min-width: 0; box-sizing: border-box; height: 46px; border: 1px solid var(--hv-st-linea); border-radius: 12px; outline: none;
    background: var(--hv-st-notte-2); color: #fff; font: 16px Ubuntu, system-ui, sans-serif; padding: 0 14px; }
.hv-st-campo input:focus { border-color: var(--hv-st-arancio); }
.hv-st-brani { display: flex; flex-direction: column; gap: 6px; }
.hv-st-brano { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border: 1px solid var(--hv-st-linea);
    border-radius: 12px; background: var(--hv-st-notte-2); color: #fff; cursor: pointer; text-align: left; font: 13px Ubuntu, system-ui, sans-serif; }
.hv-st-brano b { font-size: 14px; }
.hv-st-brano small { color: rgba(255, 255, 255, .55); }
.hv-st-brano.is-scelto { border-color: var(--hv-st-arancio); background: rgba(224, 138, 18, .2); }
.hv-st-brano.is-scelto b::after { content: ' ✓'; color: var(--hv-st-arancio-hi); }
.hv-st-inizio { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 13px; color: rgba(255, 255, 255, .75); }
.hv-st-inizio input { accent-color: var(--hv-st-arancio); }

/* telefono: tutto lo schermo */
@media (max-width: 600px), (max-height: 560px) {
    .hv-st { padding: 0; background: #000; }
    .hv-st-card { width: 100vw; height: 100dvh; aspect-ratio: auto; border-radius: 0; }
}

/* ---- avvisi ---- */
.hv-st-avviso { position: fixed; left: 50%; bottom: 90px; z-index: 100001; transform: translateX(-50%); max-width: calc(100% - 32px);
    padding: 10px 18px; border-radius: 20px; background: rgba(40, 43, 53, .95); color: #fff; font-size: 14px; font-weight: 700;
    border: 1px solid var(--hv-st-linea); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); transition: opacity .4s; }
.hv-st-avviso.is-errore { border-color: var(--hv-st-corallo); }
.hv-st-avviso.is-via { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .hv-st { animation: none; } .hv-st-rec.is-rec i { animation: none; } }
.hv-st-conto.is-rec-pronto { font-size: 48px; letter-spacing: .08em; color: var(--hv-st-corallo); animation: none; opacity: .9; }
