/* Area visitatori: accesso, editor del personaggio, comandi, elenco giocatori. Stessi colori del sito (vetro scuro + oro). */
.av-join { position: fixed; z-index: 6; left: 16px; bottom: calc(16px + var(--sab, 0px)); display: inline-flex; gap: 8px; align-items: center; padding: 12px 20px; border: 1px solid var(--line, rgba(255,226,170,.22)); border-radius: 999px;
  background: linear-gradient(180deg, #ffdf9a, #f6c85f); color: #3a2200; font: 800 15px var(--sans, system-ui); cursor: pointer; box-shadow: 0 8px 28px rgba(0,0,0,.4); transition: transform .2s; }
.av-join:hover { transform: translateY(-2px); }
body.light .av-join, body.gioco .av-join, body:has(.av-editor) .av-join { display: none; }
@media (max-width: 760px) { .av-join { left: 12px; bottom: calc(12px + var(--sab, 0px)); padding: 11px 16px; } }

/* ---- accesso ---- */
.av-modale { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(12,5,30,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow-y: auto; }
.av-scheda { position: relative; width: min(420px, 100%); padding: 26px 22px 20px; border: 1px solid var(--line, rgba(255,226,170,.22)); border-radius: 26px; background: rgba(34,18,66,.94); color: var(--ink, #fff7ea); box-shadow: 0 20px 70px rgba(0,0,0,.55); }
.av-scheda h2 { margin: 0 0 6px; font: 700 24px var(--serif, Georgia); color: var(--gold2, #ffdf9a); }
.av-sotto, .av-nota, .av-info { margin: 0 0 12px; color: var(--dim, #d2c3e6); font-size: 14px; line-height: 1.4; }
.av-nota { margin: 12px 0 0; font-size: 12px; opacity: .85; } .av-info { min-height: 1.2em; font-size: 12.5px; margin: 6px 0; }
.av-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line, #444); background: rgba(255,255,255,.08); color: inherit; cursor: pointer; font-size: 16px; }
.av-tabs { display: flex; gap: 6px; margin: 0 0 14px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.07); }
.av-tabs button { flex: 1; padding: 9px 6px; border: 0; border-radius: 999px; background: transparent; color: var(--dim, #d2c3e6); font: 700 14px var(--sans, system-ui); cursor: pointer; }
.av-tabs button.on { background: var(--gold, #f6c85f); color: #3a2200; }
.av-scheda form { display: grid; gap: 10px; }
.av-scheda label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--dim, #d2c3e6); }
.av-scheda label[hidden] { display: none; }
.av-scheda label small { font-weight: 400; opacity: .8; }
.av-scheda input { width: 100%; min-width: 0; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line, #444); background: rgba(10,4,26,.55); color: var(--ink, #fff); font: 16px var(--sans, system-ui); }
.av-err { margin: 0; min-height: 1.2em; color: #ffb4a0; font-size: 13.5px; font-weight: 700; }
.primario { padding: 13px 20px; border: 0; border-radius: 999px; background: linear-gradient(180deg, #ffdf9a, #f6c85f); color: #3a2200; font: 800 16px var(--sans, system-ui); cursor: pointer; box-shadow: 0 6px 20px rgba(246,200,95,.3); }
.primario:disabled { opacity: .55; cursor: default; }

/* ---- editor ---- */
.av-editor { position: fixed; inset: 0; z-index: 25; display: grid; grid-template-columns: minmax(0, 1fr) min(460px, 44vw); background: radial-gradient(900px 600px at 30% 20%, #4b2a86, #261347 55%, #170d2e); color: var(--ink, #fff7ea); font-family: var(--sans, system-ui); }
.av-ed-anteprima { position: relative; min-height: 0; }
.av-ed-anteprima canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.av-ed-nome { position: absolute; top: calc(14px + var(--sat, 0px)); left: 18px; display: grid; gap: 2px; pointer-events: none; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.av-ed-nome b { font: 700 22px var(--serif, Georgia); color: var(--gold2, #ffdf9a); } .av-ed-nome small { color: var(--dim, #d2c3e6); font-size: 12.5px; }
.av-ed-tools { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 8px; }
/* mentre si scaricano i pezzi del personaggio realistico (corpo, vestiti, capelli): scritta discreta in alto al centro */
.av-ed-attesa { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); padding: 8px 16px; border-radius: 16px; background: rgba(26,14,52,.72); color: var(--dim, #d2c3e6); font-size: 13px; font-weight: 700; pointer-events: none; display: flex; align-items: center; gap: 8px; backdrop-filter: blur(6px); }
.av-ed-attesa[hidden] { display: none; }
.av-ed-attesa::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gold, #f6c85f); border-right-color: transparent; animation: av-gira 0.8s linear infinite; }
@keyframes av-gira { to { transform: rotate(360deg); } }
.av-ed-tools button { display: grid; justify-items: center; gap: 1px; min-width: 62px; padding: 8px 10px; border: 1px solid var(--line, #555); border-radius: 18px; background: rgba(26,14,52,.7); color: inherit; font-size: 20px; cursor: pointer; backdrop-filter: blur(8px); }
.av-ed-tools button span { font-size: 11px; font-weight: 700; color: var(--dim, #d2c3e6); } .av-ed-tools button.on { background: var(--gold, #f6c85f); color: #3a2200; } .av-ed-tools button.on span { color: #3a2200; }
.av-ed-pannello { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line, #444); background: rgba(26,14,52,.78); backdrop-filter: blur(10px); }
.av-ed-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 12px 8px; flex: none; }
.av-ed-tabs::-webkit-scrollbar { display: none; }
.av-ed-tabs button { flex: 1 0 auto; display: grid; justify-items: center; gap: 1px; min-width: 66px; padding: 7px 8px; border: 1px solid var(--line, #444); border-radius: 14px; background: rgba(255,255,255,.06); color: var(--dim, #d2c3e6); font: 700 12px var(--sans, system-ui); cursor: pointer; }
.av-ed-tabs button span { font-size: 20px; line-height: 1.1; } .av-ed-tabs button.on { background: var(--gold, #f6c85f); border-color: var(--gold, #f6c85f); color: #3a2200; }
.av-ed-opz { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 12px; scrollbar-width: thin; }
.av-ed-opz section { margin: 0 0 14px; } .av-ed-opz h3 { margin: 6px 0 8px; font: 800 12px var(--sans, system-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--gold2, #ffdf9a); }
.av-ch { display: flex; flex-wrap: wrap; gap: 6px; }
.av-ch button { padding: 8px 12px; border: 1px solid var(--line, #444); border-radius: 999px; background: rgba(255,255,255,.07); color: var(--ink, #fff); font: 600 13.5px var(--sans, system-ui); cursor: pointer; }
.av-ch button.on { background: var(--gold, #f6c85f); border-color: var(--gold, #f6c85f); color: #3a2200; font-weight: 800; }
.av-sw { display: flex; flex-wrap: wrap; gap: 7px; }
.av-sw button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.28); cursor: pointer; padding: 0; } .av-sw button.on { border-color: #fff; box-shadow: 0 0 0 3px var(--gold, #f6c85f); transform: scale(1.06); }
/* stili di Neverland (look pronti) */
.av-stili-nota { margin: 4px 0 10px; color: var(--dim, #d2c3e6); font-size: 13px; line-height: 1.4; }
.av-stili { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.av-stili button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 9px; row-gap: 2px; align-items: center; text-align: left; padding: 10px 11px; border: 1px solid var(--line, #444); border-radius: 16px; background: linear-gradient(160deg, rgba(255,255,255,.1), rgba(255,255,255,.04)); color: var(--ink, #fff); cursor: pointer; font-family: var(--sans, system-ui); transition: transform .12s; }
.av-stili button:active { transform: scale(.97); }
.av-stili button .e { grid-row: 1 / span 3; font-size: 28px; line-height: 1; }
.av-stili button b { font-size: 14px; line-height: 1.2; }
.av-stili button small { font-size: 11.5px; line-height: 1.25; color: var(--dim, #d2c3e6); }
.av-stili button .pal { display: flex; gap: 4px; margin-top: 3px; } .av-stili button .pal i { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(255,255,255,.45); }
.av-stili button.on { background: var(--gold, #f6c85f); border-color: var(--gold, #f6c85f); color: #3a2200; } .av-stili button.on small { color: #5a3a00; } .av-stili button.on .pal i { border-color: rgba(58,34,0,.5); }
.av-ed-piede { display: flex; gap: 8px; align-items: center; padding: 10px 14px calc(12px + var(--sab, 0px) + var(--nlb, 0px)); border-top: 1px solid var(--line, #444); flex: none; }
.av-ed-piede .primario { flex: 1; } .av-ed-piede button:not(.primario) { padding: 12px 14px; border: 1px solid var(--line, #444); border-radius: 999px; background: rgba(255,255,255,.08); color: inherit; font: 700 14px var(--sans, system-ui); cursor: pointer; }
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .av-editor { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(210px, 38dvh) minmax(0, 1fr); }
  .av-ed-pannello { border-left: 0; border-top: 1px solid var(--line, #444); min-width: 0; }
  .av-ed-tools { left: auto; right: 8px; bottom: auto; top: 50%; transform: translateY(-50%); flex-direction: column; gap: 6px; } .av-ed-tools button { min-width: 54px; padding: 5px 8px; font-size: 17px; border-radius: 14px; } .av-ed-nome b { font-size: 18px; }
  .av-ed-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .av-ed-tabs button { flex: none; min-width: 60px; } .av-ed-piede { padding-top: 8px; } .av-ed-piede .primario { padding: 12px 10px; font-size: 15px; }
}

/* ---- comandi: grandi, trasparenti, non coprono la scena ---- */
.av-controlli { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.av-controlli > * { pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.av-stick, .av-btn { display: none; }
.av-controlli.av-touch .av-stick { display: block; }
.av-controlli.av-touch .av-btn, .av-gesti { display: grid; }
.av-controlli:not(.av-touch) .av-salta, .av-controlli:not(.av-touch) .av-corri { display: none; }
.av-stick { position: absolute; left: calc(22px + env(safe-area-inset-left, 0px)); bottom: calc(26px + var(--sab, 0px)); width: 138px; height: 138px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); }
.av-stick i { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(255,255,255,.34); border: 2px solid rgba(255,255,255,.5); }
.av-btn { position: absolute; place-items: center; align-content: center; border-radius: 50%; border: 2px solid rgba(255,255,255,.36); background: rgba(255,255,255,.12); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; text-shadow: 0 1px 6px rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.av-btn small { font: 700 11px var(--sans, system-ui); margin-top: 2px; opacity: .95; }
/* --nlb = altezza del riquadro «Powered by Netlify» che Netlify aggiunge da sé in basso a destra (piano gratuito, non si può togliere): i pulsanti di destra salgono sopra */
.av-salta { right: calc(24px + env(safe-area-inset-right, 0px)); bottom: calc(34px + var(--sab, 0px) + var(--nlb, 0px)); width: 92px; height: 92px; }
.av-corri { right: calc(128px + env(safe-area-inset-right, 0px)); bottom: calc(30px + var(--sab, 0px) + var(--nlb, 0px)); width: 70px; height: 70px; font-size: 22px; } .av-corri.on { background: rgba(246,200,95,.55); border-color: #ffdf9a; }
.av-gesti { right: calc(32px + env(safe-area-inset-right, 0px)); bottom: calc(138px + var(--sab, 0px) + var(--nlb, 0px)); width: 70px; height: 70px; font-size: 24px; }
.av-controlli:not(.av-touch) .av-gesti { right: 18px; bottom: calc(18px + var(--sab, 0px) + var(--nlb, 0px)); width: 58px; height: 58px; }
.av-menu-gesti { position: absolute; right: 14px; bottom: calc(220px + var(--sab, 0px) + var(--nlb, 0px)); display: none; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; border-radius: 22px; background: rgba(26,14,52,.86); border: 1px solid var(--line, #555); backdrop-filter: blur(10px); width: min(330px, calc(100vw - 28px)); }
.av-controlli:not(.av-touch) .av-menu-gesti { bottom: calc(86px + var(--nlb, 0px)); right: 16px; }
.av-menu-gesti.aperto { display: grid; }
.av-menu-gesti button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px 4px 8px; border: 1px solid var(--line, #555); border-radius: 16px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.av-menu-gesti button span { font-size: 28px; line-height: 1.1; } .av-menu-gesti button b { font: 700 12px var(--sans, system-ui); } .av-menu-gesti kbd { position: absolute; top: 4px; right: 7px; font: 700 10px var(--sans, system-ui); opacity: .55; }
.av-controlli.av-touch .av-menu-gesti kbd { display: none; }
@media (orientation: portrait) { .av-controlli.av-touch .av-menu-gesti { left: 10px; right: 10px; width: auto; bottom: auto; top: calc(168px + var(--sat, 0px)); grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78px; overflow-x: auto; padding: 8px; gap: 6px; scrollbar-width: none; } .av-controlli.av-touch .av-menu-gesti button span { font-size: 24px; } } /* fascia scorrevole: non copre il personaggio */
@media (max-height: 520px) and (orientation: landscape) { .av-stick { width: 112px; height: 112px; bottom: 16px; } .av-salta { width: 78px; height: 78px; bottom: 18px; } .av-corri { bottom: 16px; right: 112px; width: 62px; height: 62px; } .av-gesti { bottom: 104px; width: 60px; height: 60px; } .av-menu-gesti { bottom: 16px; right: 190px; grid-template-columns: repeat(5, 1fr); width: min(520px, 60vw); } }

/* ---- durante il gioco ---- */
.av-hud { position: fixed; z-index: 9; top: calc(112px + var(--sat, 0px)); left: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; max-width: min(320px, calc(100vw - 28px)); }
.av-hud > button { padding: 8px 14px; border: 1px solid var(--line, #555); border-radius: 999px; background: rgba(26,14,52,.7); color: var(--ink, #fff); font: 700 14px var(--sans, system-ui); cursor: pointer; backdrop-filter: blur(8px); }
.av-elenco { flex-basis: 100%; padding: 12px 14px; border-radius: 18px; background: rgba(26,14,52,.88); border: 1px solid var(--line, #555); color: var(--ink, #fff); backdrop-filter: blur(10px); max-height: 46dvh; overflow-y: auto; }
.av-elenco h4 { margin: 0 0 6px; font: 800 12px var(--sans, system-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--gold2, #ffdf9a); } .av-elenco ul { list-style: none; margin: 0; padding: 0; }
.av-elenco li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 14px; } .av-elenco li small { opacity: .65; } .av-elenco li.io { opacity: .8; }
.av-elenco li button { border: 0; background: rgba(255,255,255,.1); border-radius: 10px; padding: 5px 9px; cursor: pointer; font-size: 15px; } .av-elenco p { margin: 8px 0 0; font-size: 12px; color: var(--dim, #d2c3e6); line-height: 1.35; }
.av-aiuto { position: fixed; z-index: 9; left: 50%; bottom: calc(14px + var(--sab, 0px)); transform: translateX(-50%); max-width: min(92vw, 560px); padding: 8px 16px; border-radius: 999px; background: rgba(26,14,52,.72); color: var(--dim, #d2c3e6); font: 600 12.5px var(--sans, system-ui); text-align: center; pointer-events: none; transition: opacity 1s; }
.av-aiuto.via { opacity: 0; }
.av-aiuto.touch { bottom: calc(190px + var(--sab, 0px)); }
body.gioco #chatBtn { right: 14px; bottom: auto; top: calc(66px + var(--sat, 0px)); padding: 9px 14px; font-size: 14px; }
body.gioco .brand a { display: none; }
body.gioco #numeri { display: none; } /* in gioco i numeri della pagina principale finivano sotto la barra dei pulsanti (stessa altezza) */
body.gioco #panel { bottom: auto; top: calc(110px + var(--sat, 0px)); height: min(60dvh, 520px); }
.av-toast { position: fixed; z-index: 40; left: 50%; top: calc(14px + var(--sat, 0px)); transform: translateX(-50%); max-width: min(92vw, 460px); padding: 11px 18px; border-radius: 16px; background: rgba(34,18,66,.95); border: 1px solid var(--line, #555); color: #fff; font: 700 14px var(--sans, system-ui); box-shadow: 0 10px 30px rgba(0,0,0,.45); text-align: center; }
.av-dialogo { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; background: rgba(12,5,30,.6); padding: 16px; }
.av-dialogo > div { width: min(340px, 100%); display: grid; gap: 8px; padding: 20px; border-radius: 22px; background: rgba(34,18,66,.97); border: 1px solid var(--line, #555); color: #fff; }
.av-dialogo h4 { margin: 0; font: 700 18px var(--serif, Georgia); color: var(--gold2, #ffdf9a); } .av-dialogo p { margin: 0 0 4px; font-size: 13.5px; color: var(--dim, #d2c3e6); }
.av-dialogo button { padding: 12px; border-radius: 14px; border: 1px solid var(--line, #555); background: rgba(255,255,255,.09); color: #fff; font: 700 14.5px var(--sans, system-ui); cursor: pointer; } .av-dialogo button.piccolo { background: transparent; }
@media (prefers-reduced-motion: reduce) { .av-aiuto { transition: none; } }

/* Stelle di Neverland: conto, codice del portafoglio, "Bel colpo!" */
.av-tabs button { font-size: 13px; padding: 9px 4px; }
.av-codice { margin: 6px 0 14px; padding: 16px 10px; border-radius: 16px; background: rgba(255,255,255,.09); border: 1px dashed var(--gold, #f6c85f); text-align: center; font: 800 26px ui-monospace, Consolas, monospace; letter-spacing: .08em; color: var(--gold2, #ffdf9a); user-select: all; word-break: break-all; }
.av-azioni { display: grid; gap: 8px; margin-top: 12px; }
.av-azioni button, .av-scheda .piccolo { padding: 12px; border-radius: 14px; border: 1px solid var(--line, #555); background: rgba(255,255,255,.09); color: #fff; font: 700 14.5px var(--sans, system-ui); cursor: pointer; }
.av-azioni .primario { background: var(--gold, #f6c85f); color: #3a2200; border-color: transparent; }
.av-spunta { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px; font-weight: 600; }
.av-spunta input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--gold, #f6c85f); }
.av-saldo { text-align: center; margin: 4px 0 10px; } .av-saldo b { font: 800 44px var(--serif, Georgia); color: var(--gold2, #ffdf9a); } .av-saldo span { display: block; font-size: 13px; color: var(--dim, #d2c3e6); }
.av-conto3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.av-conto3 div { padding: 10px 6px; border-radius: 14px; background: rgba(255,255,255,.07); text-align: center; } .av-conto3 b { display: block; font: 800 22px var(--sans, system-ui); } .av-conto3 small { font-size: 12px; color: var(--dim, #d2c3e6); }
.av-scheda h3 { margin: 12px 0 6px; font: 700 15px var(--sans, system-ui); color: var(--gold2, #ffdf9a); }
.av-mov { list-style: none; margin: 0 0 8px; padding: 0; max-height: 28vh; overflow: auto; }
.av-mov li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 2px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 14px; } .av-mov li small { display: block; font-size: 11.5px; color: var(--dim, #d2c3e6); }
.av-mov .piu { color: #b6f0b0; } .av-mov .meno { color: #ffb4a0; } .av-mov .vuoto { color: var(--dim, #d2c3e6); justify-content: center; }
.av-link { border: 0; background: none; padding: 0; color: var(--gold2, #ffdf9a); text-decoration: underline; font: inherit; cursor: pointer; }
.av-altri { margin: 4px 0 0; font-size: 13px; color: var(--dim, #d2c3e6); line-height: 1.7; }
.av-nota a { color: var(--gold2, #ffdf9a); }
#avStelle b { color: var(--gold2, #ffdf9a); }

/* Paese di Neverland - Fase 2: missione, lavoretti, carta */
.av-missione { position: fixed; z-index: 9; top: var(--av-hud-fine, calc(160px + var(--sat, 0px))); left: 14px; width: min(310px, calc(100vw - 28px)); padding: 8px 12px 10px; border-radius: 18px; background: rgba(26,14,52,.82); border: 1px solid var(--line, #555); color: var(--ink, #fff); backdrop-filter: blur(6px); font-size: 13.5px; line-height: 1.35; }
.av-m-testa { display: flex; width: 100%; justify-content: space-between; gap: 8px; padding: 4px 0; border: 0; background: none; color: inherit; font: 700 14.5px var(--sans, system-ui); cursor: pointer; text-align: left; }
.av-missione.chiuso > :not(.av-m-testa):not(.av-m-ob):not(.av-m-ok) { display: none; }
.av-missione.chiuso .av-m-testo { display: none; }
.av-m-testo { margin: 2px 0 6px; color: var(--dim, #d2c3e6); }
.av-m-ok { margin: 4px 0 6px; color: #b6f0b0; font-weight: 700; }
.av-m-ob { display: flex; align-items: center; gap: 8px; margin: 4px 0; padding: 6px 8px; border-radius: 12px; background: rgba(255,210,74,.12); }
.av-m-ob.lavoro { background: rgba(111,214,255,.14); } .av-m-ob.vicino { outline: 2px solid var(--gold, #f6c85f); }
.av-m-ob i { font-style: normal; color: var(--gold2, #ffdf9a); } .av-m-ob.lavoro i { color: #9fe3ff; }
.av-m-ob button { margin-left: auto; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; }
.av-freccia { display: inline-block; flex: none; width: 24px; text-align: center; font-size: 20px; color: var(--gold, #f6c85f); transition: transform .15s linear; }
.av-m-azioni { display: flex; gap: 8px; margin-top: 6px; }
.av-m-azioni button { flex: 1; padding: 7px 8px; border-radius: 12px; border: 1px solid var(--line, #555); background: rgba(255,255,255,.09); color: #fff; font: 700 13px var(--sans, system-ui); cursor: pointer; }
.av-azione-tocca { position: fixed; z-index: 10; left: 50%; transform: translateX(-50%); bottom: calc(210px + var(--sab, 0px)); max-width: min(92vw, 380px); padding: 15px 24px; border: 0; border-radius: 999px; background: var(--gold, #f6c85f); color: #3a2200; font: 800 17px var(--sans, system-ui); box-shadow: 0 6px 26px rgba(246,200,95,.5); cursor: pointer; animation: av-pulsa 1.4s ease-in-out infinite; }
@media (hover: hover) and (pointer: fine) { .av-azione-tocca { bottom: 64px; } }
@keyframes av-pulsa { 50% { transform: translateX(-50%) scale(1.05); } }
.av-lavori { display: grid; gap: 8px; }
.av-lavori button { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 2px 10px; padding: 12px; border-radius: 16px; border: 1px solid var(--line, #555); background: rgba(255,255,255,.08); color: #fff; text-align: left; cursor: pointer; font-family: var(--sans, system-ui); }
.av-lavori button span { grid-row: span 2; font-size: 28px; text-align: center; } .av-lavori button b { font-size: 15px; } .av-lavori button small { grid-column: 2; font-size: 12.5px; color: var(--dim, #d2c3e6); } .av-lavori button em { grid-row: 1 / span 2; grid-column: 3; font-style: normal; font-weight: 800; color: var(--gold2, #ffdf9a); }
.av-lavori button:disabled { opacity: .5; cursor: default; }
.av-carta { margin: 6px 0 4px; } .av-carta canvas { width: 100%; height: auto; border-radius: 18px; display: block; box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.av-festa { text-align: center; } .av-festa-e { font-size: 64px; animation: av-pulsa 1.4s ease-in-out infinite; } .av-festa h2 { margin-top: 0; }
.av-grado b { color: var(--gold2, #ffdf9a); }
@media (max-width: 520px) { .av-missione { top: var(--av-hud-fine, calc(150px + var(--sat, 0px))); font-size: 13px; } }

.av-touch .av-azione-tocca { bottom: calc(262px + var(--sab, 0px)); }
.av-touch .av-missione { top: var(--av-hud-fine, calc(150px + var(--sat, 0px))); }

/* Paese di Neverland - Fase 3: regali */
.av-regali-pila { position: fixed; z-index: 11; top: calc(14px + var(--sat, 0px)); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.av-regalo-cartello { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 18px; background: linear-gradient(135deg, rgba(246,200,95,.96), rgba(255,223,154,.96)); color: #3a2200; box-shadow: 0 6px 24px rgba(0,0,0,.35); font: 700 14px/1.35 var(--sans, system-ui); animation: av-entra .45s ease-out; transition: opacity .8s; }
.av-regalo-cartello.via { opacity: 0; } .av-rc-e { font-size: 30px; } .av-regalo-cartello q { display: block; margin-top: 2px; font-weight: 600; font-style: italic; quotes: "\201C" "\201D"; }
@keyframes av-entra { from { transform: translateY(-20px) scale(.92); opacity: 0; } }
.av-regali { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 6px 0 10px; }
.av-regalo { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 10px 6px; border-radius: 16px; border: 2px solid transparent; background: rgba(255,255,255,.08); color: #fff; font-family: var(--sans, system-ui); cursor: pointer; }
.av-regalo .e { font-size: 30px; } .av-regalo b { font-size: 13.5px; } .av-regalo small { font-size: 11px; color: var(--dim, #d2c3e6); line-height: 1.25; } .av-regalo em { font-style: normal; font-weight: 800; color: var(--gold2, #ffdf9a); }
.av-regalo.scelto { border-color: var(--gold, #f6c85f); background: rgba(246,200,95,.18); } .av-regalo:disabled { opacity: .45; cursor: default; }
.av-bigliettino { display: grid; gap: 4px; font-size: 13px; font-weight: 700; } .av-bigliettino small { font-weight: 400; color: var(--dim, #d2c3e6); }
.av-sottotabs { display: flex; gap: 6px; margin: 4px 0 8px; } .av-sottotabs button { flex: 1; padding: 7px; border-radius: 999px; border: 1px solid var(--line, #555); background: transparent; color: var(--dim, #d2c3e6); font: 700 13px var(--sans, system-ui); cursor: pointer; } .av-sottotabs button.on { background: rgba(246,200,95,.2); color: var(--gold2, #ffdf9a); }
.av-class, .av-ultimi { list-style: none; margin: 0 0 8px; padding: 0; max-height: 34vh; overflow: auto; }
.av-class li, .av-ultimi li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 14px; }
.av-class li b { flex: 1; } .av-class li em { font-style: normal; font-weight: 800; color: var(--gold2, #ffdf9a); } .av-class li.primo b { color: var(--gold2, #ffdf9a); font-size: 17px; text-shadow: 0 0 12px rgba(246,200,95,.6); }
.av-ultimi li span { font-size: 24px; } .av-ultimi q { display: block; font-size: 12.5px; font-style: italic; color: var(--dim, #d2c3e6); } .av-class .vuoto, .av-ultimi .vuoto { justify-content: center; color: var(--dim, #d2c3e6); }
#avRegali { font-size: 17px; }

/* Paese di Neverland - Fase 4: il paese (case, negozio, mercatino, asta) */
.pg .av-scheda { width: min(460px, 100%); max-height: 92vh; display: flex; flex-direction: column; }
.pg-tabs { overflow-x: auto; flex: none; flex-wrap: nowrap; } .pg-tabs button { flex: none; padding: 9px 12px; white-space: nowrap; }
.pg-corpo { overflow: auto; max-height: 58vh; padding-right: 4px; -webkit-overflow-scrolling: touch; }
.pg-corpo h3 { margin: 14px 0 6px; font: 700 15px var(--sans, system-ui); color: var(--gold2, #ffdf9a); } .pg-corpo h3 small { font-weight: 600; color: var(--dim, #d2c3e6); }
.pg-lista { list-style: none; margin: 0 0 8px; padding: 0; } .pg-lista li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 14px; }
.pg-lista li > span { font-size: 24px; width: 30px; text-align: center; flex: none; } .pg-lista li b { flex: 1; font-weight: 700; } .pg-lista li b small { display: block; font-weight: 400; font-size: 12px; color: var(--dim, #d2c3e6); } .pg-lista li em { font-style: normal; font-weight: 800; color: var(--gold2, #ffdf9a); text-align: right; }
.pg-lista li button, .pg-vendi button { padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line, #555); background: rgba(246,200,95,.18); color: #fff; font: 700 13px var(--sans, system-ui); cursor: pointer; white-space: nowrap; } .pg-lista li button:disabled { opacity: .4; cursor: default; }
.pg-lista .vuoto { justify-content: center; color: var(--dim, #d2c3e6); }
.pg-slot { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .pg-slot label { font-size: 12px; font-weight: 700; display: grid; gap: 3px; } .pg-slot select, .pg-vendi select, .pg-vendi input { padding: 9px 8px; border-radius: 10px; border: 1px solid var(--line, #555); background: rgba(10,4,24,.6); color: #fff; font: 600 13px var(--sans, system-ui); min-width: 0; }
.pg-vendi { display: flex; gap: 8px; margin: 6px 0; } .pg-vendi select { flex: 1; } .pg-vendi input { width: 110px; }
.pg-casa { padding: 10px; border-radius: 16px; background: rgba(246,200,95,.1); margin-bottom: 6px; }
.pg-asta { text-align: center; padding: 8px; } .pg-asta .e { font-size: 64px; } .pg-asta h3 { margin: 4px 0; font-size: 18px; }
#avPaese { font-size: 17px; }

/* correzione telefono: il menu del paese non deve allargarsi oltre lo schermo */
.pg .av-scheda { min-width: 0; max-width: 100%; overflow: hidden; box-sizing: border-box; }
.pg-tabs { max-width: 100%; min-width: 0; box-sizing: border-box; scrollbar-width: none; } .pg-tabs::-webkit-scrollbar { display: none; }
.pg-corpo { min-width: 0; } .pg-lista li { min-width: 0; } .pg-lista li b { min-width: 0; overflow-wrap: anywhere; }
.pg-lista li > span { font-size: 15px; width: auto; text-align: left; flex: none; } .pg-lista li > span.e { font-size: 24px; width: 30px; text-align: center; }
.pg-vendi input { width: 96px; } .pg-slot select { width: 100%; }

.pg-corpo { scrollbar-width: thin; scrollbar-color: rgba(246,200,95,.55) transparent; } .pg-corpo::-webkit-scrollbar { width: 6px; } .pg-corpo::-webkit-scrollbar-thumb { background: rgba(246,200,95,.55); border-radius: 3px; } .pg-corpo::-webkit-scrollbar-track { background: transparent; }

/* Paese di Neverland - Fase 5: eventi, ordinanze, idee, feste */
.ev-card { text-align: center; padding: 12px; border-radius: 18px; background: rgba(246,200,95,.1); margin-bottom: 6px; } .ev-card .e { font-size: 52px; } .ev-card h3 { margin: 2px 0; font-size: 18px; }
.ev-cr { margin: 4px 0 8px; font-size: 15px; } .ev-cr b { color: var(--gold2, #ffdf9a); font-variant-numeric: tabular-nums; }
.ev-idee li.ev-idea { align-items: flex-start; } .ev-idea > div { flex: 1; min-width: 0; } .ev-idea b { display: block; font-weight: 700; } .ev-idea small { display: block; font-size: 12px; color: var(--dim, #d2c3e6); } .ev-idea q { display: block; margin-top: 3px; font-size: 12.5px; font-style: italic; color: var(--gold2, #ffdf9a); quotes: none; }
.ev-idea button.sel { background: rgba(246,200,95,.5); color: #3a2200; } .ev-idea em { font-style: normal; font-weight: 800; color: var(--gold2, #ffdf9a); }
.av-m-ob.evento { background: rgba(255,255,255,.1); }
#avEventi { font-size: 17px; }

/* Fase 6 */
.av-invito { margin: 0 0 10px; padding: 9px 12px; border-radius: 14px; background: rgba(246,200,95,.14); color: var(--gold2, #ffdf9a); font-size: 13.5px; font-weight: 700; }
.av-riga { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .av-riga button[hidden] { display: none; }
#avFoto { font-size: 17px; }
.av-foto canvas { width: 100%; height: auto; }
