:root {
  --notte: #0b2219;
  --notte-2: #123528;
  --oro: #e8c27a;
  --oro-scuro: #b8924a;
  --rosso: #b3262e;
  --rosso-2: #d8434b;
  --crema: #fbf4e6;
  --inchiostro: #3a2a1e;
  --corsivo: "Dancing Script", "Brush Script MT", cursive;
  --serif: "Lora", Georgia, serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--serif);
  color: var(--crema);
  background:
    radial-gradient(ellipse at 50% -10%, #1f4d3a 0%, transparent 60%),
    radial-gradient(ellipse at 100% 100%, #2a1215 0%, transparent 50%),
    var(--notte);
  background-attachment: fixed;
  padding: env(safe-area-inset-top) 16px calc(90px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

#neve { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

.testa, main, .piede { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; }

.testa { text-align: center; padding: 28px 0 18px; }
.sopratitolo { margin: 0; font-style: italic; color: var(--oro); letter-spacing: .06em; font-size: .95rem; }
h1 {
  margin: 4px 0 6px;
  font-family: var(--corsivo);
  font-weight: 700;
  font-size: clamp(2.4rem, 11vw, 3.4rem);
  line-height: 1.05;
  color: var(--crema);
  text-shadow: 0 2px 18px rgba(232, 194, 122, .35);
  cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation;
}
.conto { margin: 0; font-size: .9rem; opacity: .85; }

/* ---------- Griglia delle caselle ---------- */
.griglia {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  perspective: 900px;
}

.cella {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.cella.grande { grid-column: span 2; aspect-ratio: auto; }

.retro {
  position: absolute; inset: 0;
  border-radius: 12px;
  background: #07160f center / cover no-repeat;
  box-shadow: inset 0 0 0 2px rgba(232, 194, 122, .35), inset 0 6px 16px rgba(0,0,0,.6);
  overflow: hidden;
}
.retro .bollino {
  position: absolute; left: 6px; top: 6px;
  min-width: 26px; height: 26px; padding: 0 6px;
  border-radius: 13px;
  background: rgba(11, 34, 25, .85);
  color: var(--oro);
  font-weight: 600; font-size: .8rem;
  display: grid; place-items: center;
}

.anta {
  position: absolute; inset: 0;
  border-radius: 12px;
  transform-origin: left center;
  transition: transform .9s cubic-bezier(.3, .1, .2, 1), opacity .3s .7s;
  backface-visibility: hidden;
  display: grid; place-items: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,.07), transparent 45%),
    var(--sfondo, var(--rosso));
  box-shadow: 0 4px 12px rgba(0,0,0,.45), inset 0 0 0 2px rgba(232, 194, 122, .55);
}
.anta::before {
  content: ""; position: absolute; inset: 6px;
  border: 1px dashed rgba(232, 194, 122, .5);
  border-radius: 8px;
}
.anta .numero {
  font-family: var(--corsivo);
  font-size: clamp(1.9rem, 9vw, 2.6rem);
  font-weight: 700;
  color: var(--oro);
  text-shadow: 0 2px 0 rgba(0,0,0,.3);
}
.anta .maniglia {
  position: absolute; right: 4px; top: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--oro); box-shadow: 0 0 0 2px rgba(0,0,0,.2);
}
.anta .lucchetto { position: absolute; bottom: 8px; font-size: .75rem; opacity: .7; }

.cella.aperta .anta { transform: rotateY(-115deg); opacity: 0; pointer-events: none; }
.cella.disponibile .anta { animation: respiro 2.4s ease-in-out infinite; }
.cella.oggi .anta { box-shadow: 0 0 0 3px var(--oro), 0 0 22px rgba(232, 194, 122, .7); }
.cella.chiusa .anta { filter: saturate(.75) brightness(.85); }
.cella.scuoti .anta { animation: scuoti .45s; }

@keyframes respiro { 50% { transform: translateY(-2px) scale(1.02); } }
@keyframes scuoti {
  20%, 60% { transform: translateX(-4px) rotate(-2deg); }
  40%, 80% { transform: translateX(4px) rotate(2deg); }
}

.barra-test {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  background: rgba(232, 194, 122, .95); color: var(--notte);
  font-size: .9rem; font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.barra-test[hidden] { display: none; }
.barra-test button {
  border: 0; border-radius: 18px; padding: 7px 14px; cursor: pointer;
  font: inherit; background: var(--notte); color: var(--oro);
}
.barra-test #esci-test { background: transparent; color: var(--notte); border: 1px solid var(--notte); }
body.in-test .testa { padding-top: 64px; }

.piede { text-align: center; margin-top: 22px; font-size: .8rem; opacity: .6; }
.piede button {
  background: none; border: 1px solid rgba(232,194,122,.4); color: var(--oro);
  border-radius: 20px; padding: 6px 14px; font: inherit; margin-top: 8px; cursor: pointer;
}

/* ---------- Finestra contenuto ---------- */
.velo {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(4, 14, 10, .78);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 16px;
  animation: dissolvi .3s;
}
.velo[hidden] { display: none; }
.scheda {
  position: relative;
  width: 100%; max-width: 460px; max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  margin-bottom: 40px;
  background: var(--crema);
  color: var(--inchiostro);
  border-radius: 18px;
  padding: 22px 20px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6), inset 0 0 0 1px rgba(184,146,74,.5);
  animation: sali .45s cubic-bezier(.2, .9, .3, 1.2);
  text-align: center;
}
.chiudi {
  position: absolute; right: 10px; top: 8px;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(58,42,30,.08); color: var(--inchiostro);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.scheda .giorno { font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; color: var(--rosso); margin: 0; }
.scheda h2 { font-family: var(--corsivo); font-size: 2.1rem; margin: 2px 0 12px; color: var(--inchiostro); line-height: 1.1; }
.scheda img { width: 100%; max-height: 58dvh; object-fit: cover; object-position: center 60%; border-radius: 12px; display: block; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.scheda .testo { font-size: 1.02rem; line-height: 1.6; margin: 14px 4px 0; white-space: pre-line; }
.scheda .indizio {
  margin: 14px 0 0; padding: 10px 12px;
  background: #fff3d6; border: 1px dashed var(--oro-scuro); border-radius: 10px;
  font-size: .95rem;
}
.scheda .lettera { text-align: left; font-family: var(--corsivo); font-size: 1.45rem; line-height: 1.45; white-space: pre-line; }
.scheda .firma { text-align: right; font-family: var(--corsivo); font-size: 1.4rem; margin-top: 10px; color: var(--rosso); }

@keyframes dissolvi { from { opacity: 0; } }
@keyframes sali { from { opacity: 0; transform: translateY(30px) scale(.95); } }

/* ---------- Minigiochi ---------- */
.g-istruzioni { margin: -4px 0 12px; font-size: .92rem; opacity: .75; }
.g-stato { min-height: 1.4em; margin: 10px 0 0; font-weight: 600; color: var(--rosso); }
.g-scuoti { animation: scuoti .45s; }
.g-area { position: relative; margin: 0 auto; }
.g-area.g-vinto { animation: vittoria .6s ease; }
@keyframes vittoria { 50% { transform: scale(1.04); } }

/* puzzle */
.g-puzzle { border-radius: 12px; overflow: hidden; background: #0b2219; box-shadow: 0 6px 20px rgba(0,0,0,.25); touch-action: manipulation; }
.g-tessera {
  position: absolute; padding: 0; border: 0; cursor: pointer;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  transition: left .25s ease, top .25s ease, box-shadow .15s, filter .15s;
}
.g-tessera.scelta { box-shadow: inset 0 0 0 4px var(--oro); filter: brightness(1.15); z-index: 2; }
.g-puzzle.g-vinto .g-tessera { box-shadow: none; }
.g-puzzle::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: var(--intera) center / cover; opacity: 0; transition: opacity .2s;
}
.g-puzzle.sbirciando::after { opacity: 1; }
.g-sbircia {
  margin-top: 10px; border: 1px dashed var(--oro-scuro); background: #fff3d6; color: var(--inchiostro);
  border-radius: 20px; padding: 7px 14px; font: inherit; font-size: .85rem; cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}

/* memory */
.g-memory { display: grid; gap: 8px; }
.g-carta { aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; perspective: 600px; cursor: pointer; }
.g-carta-dentro { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.g-carta.girata .g-carta-dentro { transform: rotateY(180deg); }
.g-dorso, .g-faccia {
  position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: grid; place-items: center; overflow: hidden;
}
.g-dorso { background: linear-gradient(135deg, var(--rosso-2), var(--rosso)); color: var(--oro); font-size: 1.4rem; box-shadow: inset 0 0 0 2px rgba(232,194,122,.6); }
.g-faccia { background: #fff; transform: rotateY(180deg); font-size: 2rem; box-shadow: inset 0 0 0 2px var(--oro); }
.g-faccia img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; max-height: none; }
.g-carta.trovata .g-faccia { box-shadow: inset 0 0 0 3px #2f8a5f; }

/* quiz */
.g-domanda { font-size: 1.08rem; font-weight: 600; margin: 4px 0 14px; line-height: 1.4; }
.g-risposta {
  display: block; width: 100%; margin: 0 0 9px; padding: 13px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid #d9c9a6; background: #fff; color: var(--inchiostro); font: inherit; text-align: left;
  transition: background .2s, border-color .2s;
}
.g-risposta.giusta { background: #dff3e6; border-color: #2f8a5f; }
.g-risposta.sbagliata { background: #fbe1e1; border-color: var(--rosso); opacity: .7; }

/* lucchetto */
.g-lucchetto-icona { font-size: 3rem; margin-bottom: 6px; }
.g-cifre { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; }
.g-cifre span {
  width: 42px; height: 52px; border-radius: 10px; border: 2px solid #d9c9a6; background: #fff;
  display: grid; place-items: center; font-size: 1.5rem; font-weight: 600;
}
.g-cifre span.piena { border-color: var(--oro-scuro); }
.g-tastiera { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 260px; margin: 0 auto; }
.g-tastiera button {
  height: 52px; border-radius: 12px; border: 0; background: #fff; box-shadow: 0 2px 0 #d9c9a6;
  font: 600 1.3rem var(--serif); color: var(--inchiostro); cursor: pointer;
}
.g-tastiera button:active { transform: translateY(2px); box-shadow: none; }
.g-indizio-btn { margin-top: 12px; border: 0; background: none; color: var(--rosso); font: inherit; text-decoration: underline; cursor: pointer; }

/* cuori */
.g-cuori {
  height: 50dvh; border-radius: 14px; overflow: hidden; touch-action: manipulation;
  background: linear-gradient(#fff3d6, #f7c6cf);
  box-shadow: inset 0 0 0 2px rgba(184,146,74,.4);
}
.g-cuore {
  position: absolute; top: -50px; border: 0; background: none; padding: 6px; cursor: pointer; line-height: 1;
  animation: cuore-cade linear forwards;
  user-select: none; -webkit-user-select: none;
}
.g-cuore.preso { animation: none; transform: scale(1.8); opacity: 0; transition: transform .25s, opacity .25s; }
@keyframes cuore-cade { to { transform: translateY(calc(50dvh + 60px)) rotate(25deg); } }
.g-ricomincia { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; padding: 16px; }
.g-ricomincia p { margin: 0; font-weight: 600; }
.g-ricomincia button { justify-self: center; border: 0; border-radius: 22px; padding: 11px 26px; background: var(--rosso); color: #fff; font: 600 1rem var(--serif); cursor: pointer; }

/* parola */
.g-parola { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0 10px; }
.g-parola span {
  width: 30px; height: 38px; border-bottom: 3px solid var(--inchiostro);
  display: grid; place-items: center; font-size: 1.4rem; font-weight: 700;
}
.g-parola span.vista { color: var(--rosso); }
.g-parola i { width: 14px; font-style: normal; display: grid; place-items: end center; }
.g-vite { font-size: 1.1rem; letter-spacing: 2px; margin-bottom: 10px; }
.g-lettere { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.g-lettere button {
  height: 40px; border-radius: 8px; border: 0; background: #fff; box-shadow: 0 2px 0 #d9c9a6;
  font: 600 1rem var(--serif); color: var(--inchiostro); cursor: pointer; padding: 0;
}
.g-lettere button.si { background: #dff3e6; color: #1d5a40; }
.g-lettere button.no { background: #eee; color: #aaa; box-shadow: none; }

/* ---------- Video ---------- */
.video-box { position: relative; }
.video-giorno {
  width: 100%; max-height: 58dvh; display: block; background: #000;
  border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.audio {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  border: 0; border-radius: 20px; padding: 8px 14px; cursor: pointer;
  background: rgba(251, 244, 230, .95); color: var(--inchiostro); font: 600 .9rem var(--serif);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.audio[hidden] { display: none; }
.retro video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.retro .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(11, 34, 25, .75); color: var(--oro); font-size: .8rem; padding-left: 2px;
}
.gratta-sotto video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Gratta e scopri ---------- */
.gratta {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 58dvh;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.25), inset 0 0 0 2px rgba(184,146,74,.6);
  background: #0b2219;
}
.gratta-sotto, .gratta-strato { position: absolute; inset: 0; width: 100%; height: 100%; }
.gratta-sotto img { width: 100%; height: 100%; max-height: none; object-fit: cover; border-radius: 0; box-shadow: none; }
.gratta-simbolo {
  width: 100%; height: 100%; display: grid; place-items: center; font-size: 6rem;
  background: radial-gradient(circle at 50% 40%, #d8434b, #7a1d24);
}
.gratta-simbolo.lettera { background: radial-gradient(circle at 50% 40%, #f7c6cf, #a8323a); }
.gratta-strato {
  touch-action: none; cursor: grab;
  transition: opacity .8s ease;
}
.gratta-strato.svanisci { opacity: 0; pointer-events: none; }

/* ---------- Invito all'installazione ---------- */
.installa { z-index: 12; }
.installa .installa-icona { width: 76px; height: 76px; border-radius: 18px; margin: 4px auto 6px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.passi { text-align: left; margin: 16px 0 4px; padding: 0; list-style: none; counter-reset: passo; }
.passi li {
  counter-increment: passo; position: relative;
  padding: 10px 12px 10px 46px; margin-bottom: 8px;
  background: #fff3d6; border-radius: 12px; line-height: 1.4;
}
.passi li::before {
  content: counter(passo); position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--rosso); color: #fff; font-weight: 600; font-size: .85rem;
  display: grid; place-items: center;
}
.passi small { opacity: .7; font-size: .8rem; }
.passi .simbolo {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px;
  border-radius: 6px; background: #fff; border: 1px solid #d9c9a6; font-size: .9rem; vertical-align: middle;
}
.bottone {
  display: block; width: 100%; margin-top: 16px; padding: 14px;
  border: 0; border-radius: 14px; cursor: pointer;
  background: var(--rosso); color: #fff; font: 600 1.05rem var(--serif);
  box-shadow: 0 6px 16px rgba(179, 38, 46, .35);
}
.bottone[hidden] { display: none; }
.link { margin-top: 12px; background: none; border: 0; color: var(--inchiostro); opacity: .65; font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Pacco regalo ---------- */
.pacco-zona { padding: 10px 0 4px; }
.pacco {
  position: relative; width: 170px; height: 160px; margin: 20px auto 10px;
  cursor: pointer; border: 0; background: none; padding: 0;
  animation: dondola 2s ease-in-out infinite;
}
.pacco .scatola {
  position: absolute; bottom: 0; left: 10px; right: 10px; height: 105px;
  background: var(--rosso); border-radius: 6px;
  box-shadow: inset -12px 0 0 rgba(0,0,0,.12);
}
.pacco .coperchio {
  position: absolute; top: 22px; left: 0; right: 0; height: 36px;
  background: var(--rosso-2); border-radius: 6px;
  box-shadow: 0 4px 0 rgba(0,0,0,.15);
  transition: transform .7s cubic-bezier(.3, -.4, .5, 1), opacity .7s;
  z-index: 2;
}
.pacco .nastro-v { position: absolute; left: 50%; width: 22px; margin-left: -11px; top: 22px; bottom: 0; background: var(--oro); z-index: 3; transition: opacity .3s; }
.pacco .fiocco { position: absolute; top: -2px; left: 50%; transform: translateX(-50%); font-size: 2.6rem; z-index: 4; transition: transform .7s, opacity .7s; }
.pacco.scartato { animation: none; }
.pacco.scartato .coperchio { transform: translate(60px, -120px) rotate(35deg); opacity: 0; }
.pacco.scartato .fiocco { transform: translate(-120%, -140px) rotate(-40deg); opacity: 0; }
.pacco.scartato .nastro-v { opacity: 0; }
.suggerimento { font-style: italic; opacity: .7; margin: 4px 0 0; }
.sorpresa { animation: sali .6s cubic-bezier(.2, .9, .3, 1.2); }

@keyframes dondola { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

.coriandolo {
  position: fixed; z-index: 20; width: 9px; height: 14px; top: -20px;
  pointer-events: none; border-radius: 2px;
  animation: cadi linear forwards;
}
@keyframes cadi { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- Avviso ---------- */
.avviso {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 30;
  transform: translate(-50%, 200%);
  visibility: hidden;
  background: var(--crema); color: var(--inchiostro);
  padding: 10px 18px; border-radius: 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  font-size: .95rem; max-width: calc(100% - 32px); text-align: center;
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.2), visibility .35s;
}
.avviso.visibile { transform: translate(-50%, 0); visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01s !important; }
}

/* ---------- Barra test compatta ---------- */
.barra-test { gap: 7px; font-size: .85rem; }
.barra-test button { padding: 7px 11px; }

/* ---------- Pannello admin ---------- */
body.admin-aperto { overflow: hidden; }
.admin {
  position: fixed; inset: 0; z-index: 40;
  background: var(--crema); color: var(--inchiostro);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
}
.admin[hidden] { display: none; }
.admin-testa {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 10px 12px; background: var(--notte); color: var(--oro);
}
.admin-testa strong { font-size: 1rem; }
.admin-testa button { background: none; border: 0; color: var(--oro); font: inherit; cursor: pointer; padding: 6px; }
.admin-indietro { justify-self: start; }
.admin-chiudi { justify-self: end; font-size: 1.6rem !important; line-height: 1; }
.admin-corpo { flex: 1; overflow-y: auto; padding: 14px 16px calc(40px + env(safe-area-inset-bottom)); }
.admin-login { text-align: center; padding-top: 40px; }
.admin-login input { font-size: 1.6rem; text-align: center; letter-spacing: .4em; width: 200px; }
.admin-nota { font-size: .85rem; opacity: .7; margin: 4px 0 12px; }
.admin-msg { min-height: 1.2em; margin: 10px 0; font-weight: 600; }
.admin-msg.ok { color: #1d5a40; }
.admin-msg.errore { color: var(--rosso); }
.admin-riga {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; margin-bottom: 8px; border: 0; border-radius: 12px;
  background: #fff; box-shadow: 0 1px 0 #e6d9bb; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
}
.admin-num {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--rosso); color: #fff; font-weight: 700;
}
.admin-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-info b, .admin-info small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-info small { opacity: .7; }
.admin-pallino { width: 9px; height: 9px; border-radius: 50%; background: var(--oro-scuro); flex: none; }
.admin-freccia { opacity: .4; font-size: 1.4rem; }
.admin-form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .9rem; }
.admin-form small { display: block; font-weight: 400; opacity: .7; margin: 2px 0 4px; }
.admin input, .admin textarea, .admin select {
  display: block; width: 100%; margin-top: 5px; padding: 11px 12px;
  border: 1px solid #d9c9a6; border-radius: 10px; background: #fff; color: var(--inchiostro);
  font: 16px var(--serif);
}
.admin textarea { resize: vertical; line-height: 1.45; }
.admin-bottoni { display: flex; gap: 10px; }
.admin-primario, .admin-secondario {
  flex: 1; padding: 13px; border-radius: 12px; border: 0; cursor: pointer; font: 600 1rem var(--serif);
}
.admin-primario { background: var(--rosso); color: #fff; }
.admin-login .admin-primario { display: block; width: 200px; margin: 14px auto 0; }
.admin-secondario { background: var(--notte); color: var(--oro); }
.admin-link { display: block; margin: 18px auto 0; background: none; border: 0; color: var(--rosso); text-decoration: underline; font: inherit; font-size: .85rem; cursor: pointer; }

/* ---------- Nuovi giochi ---------- */
.g-scorrevole { border-radius: 12px; overflow: hidden; background: #0b2219; box-shadow: 0 6px 20px rgba(0,0,0,.25); touch-action: manipulation; }
.g-scorrevole::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: var(--intera) center / cover; opacity: 0; transition: opacity .2s;
}
.g-scorrevole.sbirciando::after { opacity: 1; }
.g-tessera.g-vuota { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(232,194,122,.3); cursor: default; }

.g-sequenza {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  max-width: 280px; padding: 14px; border-radius: 18px;
  background: radial-gradient(circle at 50% 30%, #1f4d3a, #0b2219);
}
.g-pallina {
  aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; position: relative;
  box-shadow: inset -8px -10px 18px rgba(0,0,0,.35), inset 6px 6px 12px rgba(255,255,255,.25);
  opacity: .55; transition: opacity .12s, transform .12s, filter .12s;
  touch-action: manipulation;
}
.g-pallina::before { content: ""; position: absolute; top: -8px; left: 50%; width: 16px; height: 12px; margin-left: -8px; border-radius: 3px; background: #c9a24f; }
.g-pallina.rosso { background: #d8434b; } .g-pallina.verde { background: #2f8a5f; }
.g-pallina.oro { background: #e8c27a; } .g-pallina.blu { background: #3b6fd1; }
.g-pallina.accesa { opacity: 1; transform: scale(1.08); filter: brightness(1.35) drop-shadow(0 0 14px rgba(255,255,255,.8)); }
.g-via { grid-column: span 2; border: 0; border-radius: 22px; padding: 11px; background: var(--rosso); color: #fff; font: 600 1rem var(--serif); cursor: pointer; }

.g-caselle { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0 16px; }
.g-caselle span {
  width: 34px; height: 42px; border-radius: 8px; border: 2px dashed #d9c9a6; background: #fff;
  display: grid; place-items: center; font-size: 1.3rem; font-weight: 700; color: var(--rosso);
}
.g-caselle span.piena { border-style: solid; border-color: var(--oro-scuro); cursor: pointer; }
.g-caselle i { width: 12px; }
.g-tessere-lettere { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.g-tessere-lettere button {
  width: 42px; height: 46px; border-radius: 10px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--rosso-2), var(--rosso)); color: #fff;
  font: 700 1.25rem var(--serif); box-shadow: 0 3px 0 #7a1d24;
}
.g-tessere-lettere button:disabled { opacity: .2; box-shadow: none; }
.g-cancella { margin-top: 14px; border: 0; background: none; color: var(--inchiostro); opacity: .7; font: inherit; text-decoration: underline; cursor: pointer; }
