/* Q-Flow — stile comune (sito pubblico, display, admin) */
:root {
  --bg: #080706;
  --bg-warm: #4a200e;
  --card: #060505;
  --card-2: #0b0908;
  --line: rgba(190, 140, 85, 0.32);
  --line-soft: rgba(190, 140, 85, 0.18);
  --gold: #f3b568;
  --gold-strong: #f2b266;
  --gold-deep: #c98a45;
  --cream: #fbf3e6;
  --text: #ece2d6;
  --muted: #bdb0a1;
  --brown: #8e3b1f;
  --brown-light: #c45a2d;
  --ink: #2b1408;
  --green: #5ec269;
  --red: #e5533d;
  --radius-xl: 26px;
  --radius-lg: 22px;
  --shadow-gold: 0 0 22px rgba(243, 165, 85, 0.18);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-cond: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  color-scheme: dark;
}

html.light {
  /* tema chiaro: grigio perla caldo, accenti ambra più profondi per restare leggibili sul chiaro */
  --bg: #ebe4da;
  --bg-warm: #e3c49c;
  --card: #f7f3ed;
  --card-2: #f4efe8;
  --line: rgba(146, 94, 46, 0.26);
  --line-soft: rgba(146, 94, 46, 0.16);
  --gold: #9a5216;
  --gold-strong: #8f4a12;
  --gold-deep: #7d3f0e;
  --cream: #2a170b;
  --text: #3b2a1e;
  --muted: #62503f;
  --green: #3f9b4c;
  --red: #b3361d;
  --shadow-gold: 0 6px 22px rgba(120, 72, 30, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }

/* ---------- sfondo caldo ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 55% at 50% 108%, var(--bg-warm) 0%, rgba(74, 32, 14, 0.55) 38%, transparent 72%),
    radial-gradient(60% 30% at 15% 52%, rgba(120, 60, 25, 0.18), transparent 70%),
    var(--bg);
}
.embers { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: .9; }
html.light .embers { display: none; }
.bokeh { position: absolute; width: 70px; height: 70px; border-radius: 50%; filter: blur(22px); background: rgba(240, 150, 70, 0.22); animation: float 9s ease-in-out infinite; }
.bokeh.b1 { left: 12%; top: 48%; }
.bokeh.b2 { right: 18%; top: 49%; animation-delay: -3s; }
.bokeh.b3 { left: 30%; top: 11%; width: 40px; height: 40px; opacity: 0.6; animation-delay: -5s; }
@keyframes float { 0%, 100% { transform: translateY(0); opacity: 0.7; } 50% { transform: translateY(-14px); opacity: 1; } }

/* ---------- layout pubblico ---------- */
.app {
  width: 100%; max-width: 560px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 15px calc(env(safe-area-inset-bottom, 0px) + 24px);
}

.top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 26px 0 12px;
}
.live { display: flex; align-items: center; gap: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(94, 194, 105, 0.6); animation: pulse 2.4s infinite; flex: none; }
.dot.off { background: var(--gold); animation: none; }
.dot.err { background: var(--red); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(94, 194, 105, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(94, 194, 105, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 194, 105, 0); } }
.caps { text-transform: uppercase; letter-spacing: 0.3em; font-size: 10px; font-weight: 400; line-height: 1.55; color: var(--text); }
.live .caps { max-width: 118px; }
.updated { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.updated span:first-child { white-space: nowrap; }
.logo { width: 74px; height: auto; display: block; transform: scale(1.119); filter: drop-shadow(0 4px 14px rgba(0,0,0,.45)); user-select: none; -webkit-user-drag: none; }

/* ---------- card numero ----------
   Stesso aspetto delle altre card (bordo sottile, stesso raggio e ombra).
   L'unica particolarità sono le scie luminose animate (vedi js/trails.js). */
.hero {
  position: relative; margin-top: 12px; border-radius: var(--radius-xl);
  border: 1px solid transparent; padding: 4px; background: transparent;
}
.hero-frame {
  position: relative; border-radius: var(--radius-lg); background: var(--card);
  border: 1px solid var(--line);
  min-height: 280px; display: flex; align-items: center; justify-content: center; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  overflow: hidden;
}
.hero.flash .hero-frame { animation: hero-flash 1.1s ease-out; }
@keyframes hero-flash { 0% { box-shadow: 0 0 0 rgba(243,181,104,0); } 30% { box-shadow: 0 0 40px rgba(243,181,104,.35); } 100% { box-shadow: 0 10px 30px rgba(0,0,0,.25); } }

/* avviso "i numeri si aggiornano da soli" (solo nei primi 5 secondi) */
.auto-note {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 1;
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 20px);
  padding: 7px 12px 7px 10px; border-radius: 14px;
  background: rgba(243, 181, 104, .07); border: 1px solid var(--line);
  color: var(--muted); text-align: left; animation: note-in .8s ease-in-out backwards;
  transition: opacity .8s ease-in-out;
}
.auto-note svg { width: 18px; height: 18px; flex: none; color: var(--gold); }
.auto-note p { margin: 0; font-size: clamp(11px, 3.1vw, 12.5px); line-height: 1.35; font-weight: 400; }
.auto-note b { color: var(--gold); font-weight: 700; letter-spacing: .06em; }
.auto-note.out { opacity: 0; }
@keyframes note-in { from { opacity: 0; } to { opacity: 1; } }
.hero.paused .auto-note { display: none; }

/* scie luminose lungo il bordo */
.trail-svg { position: absolute; left: 4px; top: 4px; width: calc(100% - 8px); height: calc(100% - 8px); overflow: visible; pointer-events: none; z-index: 2; }
.trail-svg rect { fill: none; stroke-linecap: butt; animation: trail-run var(--trail-period, 12s) linear infinite; }
@keyframes trail-run { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -1000; } }
@media (prefers-reduced-motion: reduce) { .trail-svg { display: none; } }
@keyframes glow { 0% { box-shadow: 0 0 0 rgba(243,181,104,0); } 30% { box-shadow: 0 0 46px rgba(243,181,104,.55); } 100% { box-shadow: var(--shadow-gold); } }

.hero-label {
  margin: 0; font-weight: 600; font-size: clamp(13px, 3.75vw, 17px); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-strong);
}
.hero-number {
  font-family: var(--font-cond); font-weight: 800; color: var(--cream);
  font-size: clamp(110px, 31vw, 168px); line-height: 0.86; letter-spacing: 0.01em;
  margin-top: 4px; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.hero-number.bump { animation: bump .6s cubic-bezier(.2,.9,.25,1.25); }
@keyframes bump { 0% { transform: translateY(18px) scale(.82); opacity: 0; filter: blur(6px); } 100% { transform: none; opacity: 1; filter: none; } }
.hero-sub { margin: 14px 18px 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.hero.paused .hero-label { color: #ff9b7d; }
.hero.paused .hero-number { opacity: .35; }
/* spazio in basso riservato all'avviso temporaneo, così linea e avviso non si toccano mai */
.app .hero-frame { padding: 16px 0 56px; }
@media (min-width: 600px) { .app .hero-frame { min-height: 320px; } }
/* telefono: gruppo scritta-numero-linea più vicino al centro del box (lo spazio totale resta uguale,
   così l'avviso temporaneo non viene mai toccato) e compensazione della spaziatura finale delle lettere */
@media (max-width: 599px) {
  .app .hero-frame { padding: 28px 0 44px; }
  .app .hero-label { padding-left: .14em; }
  .app .hero .hero-number { padding-left: .08em; }
}
/* numero in servizio: carattere più snello + sottile linea luminosa giallo-arancio */
.hero .hero-number {
  font-weight: 500; letter-spacing: .02em;
  display: inline-block; position: relative; padding: 0 .06em .14em;
}
.hero .hero-number::after {
  content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: clamp(2px, .012em, 4px); border-radius: 2px;
  background: linear-gradient(90deg, rgba(240,138,44,0), #f08a2c 22%, #ffd36e 50%, #f08a2c 78%, rgba(240,138,44,0));
  box-shadow: 0 0 .06em rgba(255,190,90,.45);
  opacity: .9;
}

/* ---------- card generiche ---------- */
.card {
  margin-top: 16px; border-radius: var(--radius-lg); background: var(--card);
  border: 1px solid var(--line); position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.pill {
  flex: none; background: var(--gold); color: var(--ink); border-radius: 999px; padding: 9px 15px;
  font-weight: 600; font-size: 12.5px; letter-spacing: .17em; text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(243, 181, 104, .25); transition: transform .15s, filter .15s;
}
.pill:active, .btn:active { transform: scale(.96); }
.pill.ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold); box-shadow: none; }
.notify.on { border-color: rgba(243, 181, 104, .55); }
.notify.turn { border-color: var(--gold); box-shadow: 0 0 30px rgba(243,181,104,.35); animation: glow 1.5s ease-in-out infinite; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
  background: var(--gold); color: var(--ink); border-radius: 999px; min-height: 47px; padding: 12px 18px;
  font-weight: 600; font-size: clamp(15px, 4.4vw, 17px); text-decoration: none; transition: transform .15s, filter .15s;
  box-shadow: 0 8px 22px rgba(243, 181, 104, .18);
}
/* pulsanti ATTIVA e RECENSISCI: gradiente oro con riflesso */
.pill-shine:not(.ghost) {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #ffcd85 0%, #f3b568 55%, #e9a352 100%);
  color: #23100a; font-weight: 700; border: 1px solid #ffd9a3;
  box-shadow: 0 0 0 1px rgba(243,181,104,.25), 0 8px 22px rgba(243,160,80,.28), inset 0 1px 0 rgba(255,255,255,.45);
  transition: transform .18s ease, box-shadow .25s ease, filter .25s ease;
}
.pill-shine:not(.ghost)::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-130%); animation: review-shine 5.5s ease-in-out 2.2s infinite;
}
.pill-shine:not(.ghost):hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(243,181,104,.4), 0 12px 30px rgba(243,160,80,.4), inset 0 1px 0 rgba(255,255,255,.5); }
.pill-shine:not(.ghost):active { transform: translateY(1px) scale(.97); box-shadow: 0 4px 12px rgba(243,160,80,.25), inset 0 1px 0 rgba(255,255,255,.35); }
.pill-shine:focus-visible { outline: 2px solid #fff3dc; outline-offset: 3px; }
.btn svg { width: 22px; height: 22px; color: #9b2a14; }
.btn:hover, .pill:hover { filter: brightness(1.06); }
.btn.secondary { background: transparent; color: var(--gold); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: #5a1c12; color: #ffd9cc; border: 1px solid #a23a24; box-shadow: none; }
.btn:disabled, .pill:disabled { opacity: .45; cursor: not-allowed; }

.tools { display: flex; gap: 12px; margin-top: -4px; padding-left: 5px; position: relative; z-index: 2; }
.round {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(40, 20, 10, .55); border: 1px solid var(--line-soft); color: var(--text);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .15s;
}
.round svg { width: 17px; height: 17px; }
.round.active { color: var(--gold); border-color: var(--gold); }
/* barra a pillola con i controlli tema e suono, sotto il box del numero */
.dock-wrap { display: flex; justify-content: center; margin-top: 14px; }
.dock {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px;
  background: rgba(20, 12, 8, .55); border: 1px solid rgba(243, 181, 104, .35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0,0,0,.3), inset 0 1px 0 rgba(255, 220, 170, .06);
}
.dock .round { width: 44px; height: 44px; background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition: transform .15s, color .2s, background .2s, border-color .2s; }
.dock .round:hover { background: rgba(243, 181, 104, .08); }
.dock .round:active { transform: scale(.92); }
.dock .round.active { border-color: rgba(243, 181, 104, .55); background: rgba(243, 181, 104, .08); }
.dock .round:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.dock .round svg { width: 19px; height: 19px; }
.dock-sep { width: 1px; height: 22px; background: linear-gradient(180deg, transparent, rgba(243, 181, 104, .45), transparent); }
.footer-note { text-align: center; font-size: 11px; color: var(--muted); opacity: .7; margin-top: 22px; letter-spacing: .08em; }

/* ---------- bottom sheet ---------- */
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .25s; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-back.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; margin: 0 auto; max-width: 560px;
  background: var(--card-2); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 26px 26px 0 0; padding: 10px 20px calc(env(safe-area-inset-bottom, 0px) + 22px);
  transform: translateY(105%); transition: transform .32s cubic-bezier(.2,.8,.2,1); max-height: 92vh; overflow-y: auto;
}
.sheet.open { transform: none; }
.grab { width: 42px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 14px; }
.sheet h2 { margin: 0 0 4px; font-family: var(--font-cond); font-size: 26px; text-transform: uppercase; color: var(--cream); letter-spacing: .02em; }
.sheet p { margin: 6px 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.sheet .section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.sheet .section:first-of-type { border-top: 0; padding-top: 0; }
.label { display: block; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--gold-strong); margin-bottom: 8px; font-weight: 600; }
.numrow { display: flex; gap: 10px; }
.input {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px;
  font-size: 17px; outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--gold); }
.numrow .input { font-family: var(--font-cond); font-weight: 700; font-size: 34px; text-align: center; letter-spacing: .05em; padding: 6px 10px; max-width: 140px; }
.hint { font-size: 13.5px; color: var(--muted); background: rgba(243,181,104,.07); border: 1px dashed var(--line); border-radius: 14px; padding: 10px 12px; margin-top: 12px; line-height: 1.45; }
.hint b { color: var(--gold); }
.msg { margin-top: 10px; font-size: 14px; min-height: 1em; }
.msg.err { color: #ff9b7d; }
.msg.ok { color: var(--green); }
.ticket-big { font-family: var(--font-cond); font-weight: 800; font-size: 92px; line-height: .9; color: var(--cream); text-align: center; }

/* ---------- overlay "è il tuo turno" ---------- */
.turn {
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px; background: radial-gradient(circle at 50% 40%, #6e2d14, #080706 70%);
  animation: fadein .35s ease-out;
}
.turn h2 { font-family: var(--font-cond); text-transform: uppercase; color: var(--gold); font-size: 30px; margin: 0; letter-spacing: .08em; }
.turn .ticket-big { font-size: 170px; color: #fbf3e6; margin: 10px 0; animation: bump .7s cubic-bezier(.2,.9,.25,1.25); }
.turn p { font-size: 20px; color: #fbf3e6; max-width: 340px; line-height: 1.4; margin: 0 0 30px; }
.turn .btn { max-width: 300px; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); transform: translate(-50%, 30px);
  background: #1b120c; color: #fbf3e6; border: 1px solid var(--line); border-radius: 14px; padding: 11px 16px;
  font-size: 14.5px; z-index: 90; opacity: 0; transition: all .25s; max-width: 92vw; text-align: center; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .app { padding-top: 30px; }
  .logo { width: 86px; }
  .caps { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- mini giochi: sezione nella pagina ---------- */
.box { padding: 16px 15px 15px; }
.games-title, .box-title { margin: 0; font-family: var(--font-cond); font-weight: 700; font-size: 21px; letter-spacing: .02em; color: var(--cream); text-transform: uppercase; line-height: 1.1; }
.games-desc, .box-desc { margin: 3px 0 0; font-weight: 300; font-size: 15px; color: var(--text); }
.games-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 14px; }
.game-tile, .box-row {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; border-radius: 16px;
  background: linear-gradient(180deg, #17100b, #0f0a07); border: 1px solid rgba(243,181,104,.28); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,220,170,.05); transition: transform .15s, border-color .2s, box-shadow .2s;
}
.game-tile:active { transform: scale(.95); }
.game-tile:hover, .game-tile:focus-visible { border-color: rgba(243,181,104,.65); box-shadow: 0 0 18px rgba(243,160,80,.18); outline: none; }
.gt-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--gold);
  background: radial-gradient(circle at 50% 35%, rgba(243,181,104,.18), rgba(243,181,104,.04)); border: 1px solid rgba(243,181,104,.35); }
.gt-ico svg { width: 24px; height: 24px; }
.gt-name { font-size: 12.5px; font-weight: 500; letter-spacing: .02em; line-height: 1.15; text-align: center; }
@media (max-width: 340px) { .games-grid { gap: 6px; } .gt-name { font-size: 11.5px; } }

/* ---------- box uniformi (notifiche, recensioni, avvisi) ----------
   Stesso linguaggio del box dei mini giochi: intestazione con titolo + descrizione,
   poi una "tessera" con icona a riquadro dorato (gt-ico), testo e pulsante a pillola. */
.box-row .gt-ico, .announce .gt-ico { flex: none; }
.box-row { flex-direction: row; gap: 12px; margin-top: 14px; padding: 12px; text-align: left; }
.box-row-text { flex: 1; min-width: 0; }
.box-row-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: .01em; color: var(--cream); }
.box-row-desc { margin: 3px 0 0; font-size: 13px; font-weight: 300; line-height: 1.35; color: var(--muted); }
.box-row-desc b { font-weight: 600; color: var(--gold); }
.box-row .pill { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 9px 14px; letter-spacing: .12em; text-decoration: none; }
.box-row .pill.ghost { background: transparent; }
.pill-ico { display: grid; place-items: center; width: 16px; height: 16px; }
.pill-ico svg { width: 16px; height: 16px; color: #8e2a12; }
.stars { display: flex; align-items: center; gap: 3px; margin-top: 5px; color: #f6b93b; }
.stars svg { width: 13px; height: 13px; }
/* stati dell'avviso: si illumina la tessera, come una tessera di gioco attiva */
.notify.on .box-row { border-color: rgba(243,181,104,.6); box-shadow: 0 0 18px rgba(243,160,80,.15), inset 0 1px 0 rgba(255,220,170,.05); }
.notify.turn .box-row { border-color: var(--gold); }
/* recensioni: filo con i colori Google in cima al box */
.review { overflow: hidden; }
.review::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 3px;
  background: linear-gradient(90deg, #4f7fe0 0 25%, #c0392b 25% 50%, #e0a52a 50% 75%, #3c9d55 75% 100%);
  border-radius: 0 0 3px 3px;
}
/* avvisi del negozio: stessa card e stessa icona a riquadro */
.announce { display: flex; gap: 12px; padding: 15px; align-items: center; }
.announce p { margin: 0; flex: 1; min-width: 0; font-size: 15px; font-weight: 400; line-height: 1.45; color: var(--text); white-space: pre-line; }
.announce.important { border-color: rgba(229, 83, 61, .6); }
.announce.important .gt-ico { color: #ff9b7d; border-color: rgba(229,83,61,.55); background: radial-gradient(circle at 50% 35%, rgba(229,83,61,.22), rgba(229,83,61,.05)); }
/* schermi stretti: pulsante a tutta larghezza sotto il testo, così il testo non si schiaccia */
@media (max-width: 374px) {
  .box-row { flex-wrap: wrap; }
  .box-row .pill { width: 100%; }
}

/* ---------- mini giochi: pannello ---------- */
.game-panel {
  position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(120% 55% at 50% 108%, rgba(74,32,14,.9) 0%, rgba(74,32,14,.35) 40%, transparent 72%), var(--bg);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px calc(env(safe-area-inset-bottom, 0px) + 12px);
  /* nessuna animazione di base: l'entrata è gestita solo dalla transizione del box (classe gp-fly-in).
     Un'animazione qui ripartirebbe alla rimozione di gp-fly-in e renderebbe trasparente il pannello. */
}
.game-panel > * { width: 100%; max-width: 520px; margin-left: auto; margin-right: auto; }
.gp-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 999px;
  background: rgba(20,12,8,.82); border: 1px solid rgba(243,181,104,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.gp-back { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 14px 0 8px; border-radius: 999px; font-weight: 600; font-size: 14px;
  color: var(--ink); background: linear-gradient(180deg, #ffcd85, #f3b568 55%, #e9a352); border: 1px solid #ffd9a3; flex: none; }
.gp-back svg { width: 20px; height: 20px; }
.gp-q { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 0; }
.gp-q .gp-v { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.gp-q .dot { width: 7px; height: 7px; }
.gp-q-k { text-transform: uppercase; letter-spacing: .1em; font-size: 9.5px; }
.gp-q b { font-family: var(--font-cond); font-weight: 700; font-size: 24px; color: var(--cream); line-height: 1; }
/* numero in servizio durante il gioco: più grande e in evidenza */
.gp-now {
  padding: 5px 14px 5px 11px; border-radius: 999px; gap: 8px;
  background: linear-gradient(180deg, rgba(243,181,104,.16), rgba(243,181,104,.06));
  border: 1px solid rgba(243,181,104,.6); box-shadow: 0 0 16px rgba(243,160,80,.22), inset 0 1px 0 rgba(255,220,170,.1);
}
.gp-now .gp-q-k { color: var(--gold); font-weight: 600; }
.gp-now b { font-size: clamp(30px, 9.5vw, 36px); text-shadow: 0 0 12px rgba(255,210,150,.35); }
@media (max-width: 350px) { .gp-now { padding: 3px 7px 3px 6px; gap: 4px; margin-right: -4px; } .gp-now .gp-q-k { font-size: 8px; letter-spacing: .06em; } .gp-now b { font-size: 28px; } }
.gp-mine { margin-left: auto; padding-right: 10px; text-align: right; }
.gp-mine .gp-v { align-items: flex-end; }
.gp-mine b { color: var(--gold); }
.gp-mine .gp-link { color: var(--gold); font-weight: 600; font-size: 12.5px; padding: 8px 4px; }
.gp-mine.turn b { animation: pulse-num 1s ease-in-out infinite; }
@keyframes pulse-num { 50% { opacity: .35; } }
.gp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.gp-head h2 { margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-cond); font-weight: 700; font-size: clamp(18px, 5.4vw, 26px); text-transform: uppercase; letter-spacing: .03em; color: var(--cream); }
.gp-new { white-space: nowrap; flex: none; padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(243,181,104,.55); color: var(--gold); font-weight: 600; font-size: 13px; letter-spacing: .04em; }
.gp-new:active { transform: scale(.96); }
.gp-info { min-height: 22px; margin: 8px 0 10px; font-size: 14px; color: var(--muted); }
.gp-info b { color: var(--cream); font-weight: 600; }
.gp-info .ok { color: var(--green); font-weight: 600; }
.gp-hero, .gp-head, .gp-info { flex: none; }
/* area del gioco: occupa esattamente lo spazio rimasto sotto al box del numero (niente scorrimento).
   Le griglie si adattano con la variabile --fit calcolata in public.js (fitGame). */
.gp-body { flex: 1 1 0; min-height: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.gp-loading { text-align: center; color: var(--muted); padding: 40px 0; }

/* box del numero dentro al gioco: identico a quello principale, più stretto e più basso */
.gp-hero { width: 86%; margin-top: 12px; }
.gp-hero .hero-frame { min-height: 0; padding: 22px 12px 14px; }
.gp-hero-in { width: 100%; display: flex; flex-direction: column; align-items: center; }
/* pulsanti Coda e Avvisami dentro il box, in basso */
.gp-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; margin-top: 12px; width: 100%; }
.gp-actions .gp-back { height: 40px; }
.gp-actions .gp-dot { position: absolute; top: 9px; right: 14px; margin: 0; }
.gp-hero .gp-mine { margin: 0; padding: 0; text-align: left; }
.gp-hero .gp-link { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(243,181,104,.65);
  color: var(--gold); font-weight: 600; font-size: 14px; background: rgba(243,181,104,.06); box-shadow: 0 0 14px rgba(243,160,80,.15); }
.gp-hero .gp-link svg { width: 17px; height: 17px; }
.gp-link:active, .gp-back:active { transform: scale(.96); }
.gp-mine-pill { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(243,181,104,.65); background: rgba(243,181,104,.06); white-space: nowrap; }
.gp-mine-pill b { font-family: var(--font-cond); font-weight: 700; font-size: 24px; color: var(--gold); line-height: 1; }
.gp-mine-t { display: flex; flex-direction: column; line-height: 1.15; }
.gp-mine-t .gp-q-k { color: var(--muted); font-size: 8.5px; }
.gp-mine-s { font-size: 12px; font-weight: 600; color: var(--cream); }
.gp-mine.turn .gp-mine-pill { border-color: var(--gold); box-shadow: 0 0 18px rgba(243,181,104,.4); }
@media (max-width: 350px) { .gp-actions { gap: 6px; } .gp-actions .gp-back, .gp-hero .gp-link { padding: 0 11px; font-size: 13px; } .gp-mine-pill { padding: 0 10px; gap: 5px; } .gp-actions { gap: 6px 8px; } }
.gp-hero .hero-number { font-size: clamp(66px, 21vw, 92px); font-size: clamp(54px, min(21vw, 11vh), 92px); font-size: clamp(54px, min(21vw, 11dvh), 92px); padding-left: .08em; }
/* schermi bassi (iPhone con le barre di Safari): box del numero e intestazione più compatti */
@media (max-height: 760px) {
  .gp-hero { margin-top: 6px; }
  .gp-hero .hero-frame { padding: 16px 12px 12px; }
  .gp-actions { margin-top: 8px; }
  .gp-head { margin-top: 10px; }
  .gp-info { margin: 4px 0 8px; }
}
@media (max-height: 620px) {
  .gp-hero { margin-top: 2px; }
  .gp-hero .hero-frame { padding: 13px 12px 10px; }
  .gp-actions { margin-top: 6px; }
  .gp-actions .gp-back, .gp-hero .gp-link, .gp-mine-pill { height: 36px; }
  .gp-head { margin-top: 8px; }
  .gp-new { padding: 7px 13px; }
  .gp-info { min-height: 20px; margin: 2px 0 6px; }
}
.gp-hero .hero-label { padding-left: .14em; font-size: clamp(11.5px, 3.4vw, 16px); white-space: nowrap; }
.gp-dot { width: 7px; height: 7px; margin-left: 6px; }

/* istruzioni dei giochi: icona accanto al titolo + pannello a comparsa */
.gp-title-row { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1 1 auto; }
@media (max-width: 350px) { .gp-new { padding: 8px 11px; font-size: 12.5px; } .gp-title-row { gap: 7px; } }
.gp-help { position: relative; width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; line-height: 1;
  color: var(--gold); border: 1.5px solid rgba(243,181,104,.7); background: rgba(243,181,104,.08); transition: background .2s, box-shadow .2s, transform .15s; }
.gp-help::before { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); } /* area di tocco più ampia */
.gp-help[aria-expanded="true"], .gp-help:hover { background: rgba(243,181,104,.2); box-shadow: 0 0 12px rgba(243,160,80,.35); }
.gp-help:active { transform: scale(.92); }
.gp-help-panel {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 5; width: min(320px, calc(100vw - 28px));
  background: linear-gradient(180deg, #1a110b, #0e0907); border: 1px solid rgba(243,181,104,.55); border-radius: 16px;
  box-shadow: 0 14px 34px rgba(0,0,0,.55), 0 0 18px rgba(243,160,80,.12); padding: 12px 14px 14px;
  transform-origin: 20px -6px; animation: help-in .22s cubic-bezier(.2,.8,.2,1);
}
.gp-help-panel::before { content: ""; position: absolute; top: -6px; left: var(--arrow-x, 100px); width: 10px; height: 10px; background: #1a110b;
  border-left: 1px solid rgba(243,181,104,.55); border-top: 1px solid rgba(243,181,104,.55); transform: rotate(45deg); }
.gp-help-panel.out { animation: help-out .16s ease-in forwards; }
@keyframes help-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes help-out { to { opacity: 0; transform: translateY(-6px) scale(.97); } }
.gp-help-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.gp-help-top span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.gp-help-x { width: 30px; height: 30px; border-radius: 50%; color: var(--text); border: 1px solid rgba(190,140,85,.35); font-size: 13px; display: grid; place-items: center; }
.gp-help-body { font-size: 14px; line-height: 1.45; color: #ece2d6; }
.gp-help-body ul { margin: 0; padding-left: 18px; }
.gp-help-body li { margin: 4px 0; }
.gp-help-body li::marker { color: var(--gold); }
.gp-help-body b { color: #ffd398; font-weight: 600; }

/* transizione del box del numero tra pagina e gioco */
.hero.fly-layer { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; z-index: 75; margin: 0; padding: 0; border: 0; border-radius: 0; pointer-events: none; overflow: visible; }
.fly-layer > * { position: absolute; left: 0; top: 0; will-change: transform; }
.fly-layer > .fly-box { min-height: 0; padding: 0; box-sizing: border-box; }
.fly-layer .gp-actions { pointer-events: none; }
/* le scie luminose ricompaiono dolcemente quando il box arriva */
.trail-in .trail-svg { animation: trail-fade .45s ease both; }
@keyframes trail-fade { from { opacity: 0; } to { opacity: 1; } }
.game-panel.gp-fly-in { animation: gp-fade-in .48s cubic-bezier(.4,0,.2,1) both; }
.game-panel.gp-fly-out { animation: gp-fade-out .48s cubic-bezier(.4,0,.2,1) both; pointer-events: none; }
@keyframes gp-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes gp-fade-out { from { opacity: 1; } to { opacity: 0; } }

/* intestazione dei box: una sola icona, accanto a titolo e descrizione, uguale in tutti i box */
.box-head.has-ico { display: grid; grid-template-columns: 40px 1fr; column-gap: 13px; align-items: center; }
.box-head.has-ico > .box-ico { grid-row: 1 / span 2; align-self: center; }
.box-head.has-ico > .box-title, .box-head.has-ico > .box-desc { grid-column: 2; min-width: 0; }
.box-head.has-ico > .box-desc { margin-top: 3px; }

/* animazioni delle icone accanto ai titoli: solo transform/opacity sul disegno interno,
   il riquadro dell'icona non cambia mai dimensioni né posizione */
.box-head .box-ico { position: relative; }
.box-head .box-ico svg { will-change: transform; }
/* campanella: oscilla come se suonasse, poi resta ferma qualche secondo */
#notifyIcon svg { transform-origin: 50% 12%; animation: ico-ring 4.5s ease-in-out infinite; }
@keyframes ico-ring {
  0%, 22%, 100% { transform: rotate(0); }
  3% { transform: rotate(14deg); } 6% { transform: rotate(-12deg); } 9% { transform: rotate(9deg); }
  12% { transform: rotate(-6deg); } 15% { transform: rotate(3deg); } 18% { transform: rotate(-1.5deg); }
}
/* controller: leggera pulsazione in entrata e in uscita, dentro il proprio riquadro */
.games-head .box-ico svg { animation: ico-pulse 2.8s ease-in-out infinite; }
@keyframes ico-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
/* G di Google: alone luminoso che si accende e si spegne piano (stesso colore) */
.gt-ico-google.box-ico::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 14px rgba(243,181,104,.45), inset 0 0 10px rgba(243,181,104,.28); opacity: 0; animation: ico-glow 3.6s ease-in-out infinite; }
.gt-ico-google.box-ico svg { animation: ico-breathe 3.6s ease-in-out infinite; }
@keyframes ico-glow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@keyframes ico-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) {
  #notifyIcon svg, .games-head .box-ico svg, .gt-ico-google.box-ico svg, .gt-ico-google.box-ico::after { animation: none; }
}

/* =====================================================================
   TEMA CHIARO — solo colori, ombre e bordi (misure, layout e animazioni invariati).
   Box grigio perla (mai bianco puro), testi scuri color caffè, accenti ambra profondi.
   ===================================================================== */
html.light .bg {
  background:
    radial-gradient(120% 55% at 50% 108%, rgba(227, 186, 136, .55) 0%, rgba(227, 196, 156, .28) 40%, transparent 72%),
    radial-gradient(70% 40% at 50% -8%, rgba(255, 252, 247, .7), transparent 70%),
    var(--bg);
}
html.light .logo { filter: drop-shadow(0 3px 8px rgba(90, 50, 20, .18)); }
html.light .caps { color: #4a3727; }

/* card e box: perla con bordo sottile, luce in alto e ombra morbida su due livelli */
html.light .card, html.light .hero-frame {
  background: linear-gradient(180deg, #f9f6f1 0%, #f4efe8 100%);
  border-color: rgba(146, 94, 46, .22);
  box-shadow: 0 1px 2px rgba(70, 40, 15, .06), 0 8px 24px rgba(90, 55, 25, .09), inset 0 1px 0 rgba(255, 255, 255, .8);
}
html.light .hero.flash .hero-frame { animation-name: hero-flash-light; }
@keyframes hero-flash-light { 0% { box-shadow: 0 0 0 rgba(240,150,60,0); } 30% { box-shadow: 0 0 40px rgba(240,150,60,.35); } 100% { box-shadow: 0 1px 2px rgba(70,40,15,.06), 0 8px 24px rgba(90,55,25,.09), inset 0 1px 0 rgba(255,255,255,.8); } }
html.light .hero-number { text-shadow: 0 2px 0 rgba(120, 72, 30, .10); }
html.light .hero .hero-number::after { box-shadow: 0 0 .05em rgba(240, 140, 50, .35); opacity: 1; }
html.light .hero.paused .hero-label { color: var(--red); }
html.light .auto-note { background: rgba(214, 140, 60, .08); border-color: rgba(146, 94, 46, .22); color: var(--muted); }

/* tessere (giochi, avvisami, recensioni) un tono più profondo del box che le contiene */
html.light .game-tile, html.light .box-row {
  background: linear-gradient(180deg, #f1ebe2, #ebe3d8);
  border-color: rgba(160, 100, 45, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 1px 2px rgba(70, 40, 15, .05);
}
html.light .game-tile:hover, html.light .game-tile:focus-visible { border-color: rgba(176, 98, 28, .55); box-shadow: 0 0 0 3px rgba(214, 140, 60, .12), inset 0 1px 0 rgba(255,255,255,.75); }
html.light .gt-ico {
  background: radial-gradient(circle at 50% 30%, rgba(255, 214, 160, .55), rgba(214, 140, 60, .10));
  border-color: rgba(176, 98, 28, .32);
}
html.light .notify.on, html.light .notify.on .box-row { border-color: rgba(176, 98, 28, .5); }
html.light .notify.on .box-row { box-shadow: 0 0 0 3px rgba(214, 140, 60, .10), inset 0 1px 0 rgba(255,255,255,.75); }
html.light .notify.turn { border-color: #c77a2e; }
html.light .stars { color: #e39b1b; }
html.light .announce.important { border-color: rgba(179, 54, 29, .45); }
html.light .announce.important .gt-ico { color: var(--red); border-color: rgba(179, 54, 29, .4); background: radial-gradient(circle at 50% 30%, rgba(255, 190, 170, .55), rgba(179, 54, 29, .08)); }
html.light .gt-ico-google.box-ico::after { box-shadow: 0 0 14px rgba(214, 140, 60, .45), inset 0 0 10px rgba(214, 140, 60, .22); }

/* pulsanti: il pieno resta l'oro della versione scura, i contorni passano all'ambra profonda */
html.light .pill, html.light .btn:not(.secondary):not(.danger) { background: #f3b568; color: var(--ink); box-shadow: 0 6px 16px rgba(200, 120, 40, .22); }
html.light .pill-shine:not(.ghost) {
  background: linear-gradient(180deg, #ffcd85 0%, #f3b568 55%, #e9a352 100%); border-color: #f0b66c;
  box-shadow: 0 0 0 1px rgba(200, 120, 40, .18), 0 6px 18px rgba(200, 120, 40, .26), inset 0 1px 0 rgba(255, 255, 255, .5);
}
html.light .pill-shine:not(.ghost):hover { box-shadow: 0 0 0 1px rgba(200,120,40,.3), 0 10px 24px rgba(200,120,40,.32), inset 0 1px 0 rgba(255,255,255,.55); }
html.light .pill-shine:focus-visible { outline-color: #9a5216; }
html.light .pill.ghost, html.light .box-row .pill.ghost { background: rgba(255, 252, 247, .5); color: var(--gold); border-color: rgba(154, 82, 22, .55); box-shadow: none; }
html.light .btn.secondary { background: rgba(255, 252, 247, .55); color: var(--gold); border-color: rgba(154, 82, 22, .4); box-shadow: none; }
html.light .btn svg { color: #8e2a12; }
html.light .dot.off { background: #e39a45; }

/* barra tema/suono */
html.light .dock {
  background: rgba(247, 243, 237, .82); border-color: rgba(146, 94, 46, .26);
  box-shadow: 0 6px 18px rgba(90, 55, 25, .10), inset 0 1px 0 rgba(255, 255, 255, .8);
}
html.light .round { background: rgba(247, 243, 237, .8); }
html.light .dock .round { background: transparent; color: #4a3727; }
html.light .dock .round:hover { background: rgba(214, 140, 60, .10); }
html.light .dock .round.active { color: var(--gold); border-color: rgba(154, 82, 22, .45); background: rgba(214, 140, 60, .10); }
html.light .dock-sep { background: linear-gradient(180deg, transparent, rgba(154, 82, 22, .35), transparent); }

/* pannello "Avvisami" */
html.light .sheet-back { background: rgba(45, 28, 15, .38); }
html.light .sheet { background: #f4efe8; border-color: rgba(146, 94, 46, .24); box-shadow: 0 -10px 30px rgba(70, 40, 15, .12); }
html.light .grab { background: rgba(146, 94, 46, .35); }
html.light .input { background: #fbf8f4; border-color: rgba(146, 94, 46, .3); color: var(--cream); }
html.light .input:focus { border-color: #c77a2e; box-shadow: 0 0 0 3px rgba(214, 140, 60, .14); }
html.light .input::placeholder { color: #a8988a; }
html.light .hint { background: rgba(214, 140, 60, .08); border-color: rgba(146, 94, 46, .32); }
html.light .msg.err { color: var(--red); }
html.light .msg.ok { color: #22702f; }

/* schermata "è il tuo turno" */
html.light .turn { background: radial-gradient(circle at 50% 40%, #f6d6a8, #ebe4da 70%); }
html.light .turn h2 { color: var(--gold); }
html.light .turn .ticket-big, html.light .turn p { color: var(--cream); }

/* pannello dei giochi */
html.light .game-panel { background: radial-gradient(120% 55% at 50% 108%, rgba(227, 186, 136, .5) 0%, rgba(227, 196, 156, .22) 40%, transparent 72%), var(--bg); }
html.light .gp-bar { background: rgba(247, 243, 237, .9); border-color: rgba(146, 94, 46, .26); box-shadow: 0 6px 18px rgba(90, 55, 25, .10); }
html.light .gp-back { color: var(--ink); border-color: #f0b66c; box-shadow: 0 4px 12px rgba(200, 120, 40, .22); }
html.light .gp-now { background: linear-gradient(180deg, rgba(214,140,60,.14), rgba(214,140,60,.05)); border-color: rgba(154, 82, 22, .45); box-shadow: none; }
html.light .gp-now b { text-shadow: none; }
html.light .gp-hero .gp-link, html.light .gp-mine-pill { background: rgba(255, 252, 247, .55); border-color: rgba(154, 82, 22, .45); box-shadow: none; }
html.light .gp-new { border-color: rgba(154, 82, 22, .45); background: rgba(255, 252, 247, .5); }
html.light .gp-help { border-color: rgba(154, 82, 22, .55); background: rgba(214, 140, 60, .10); }
html.light .gp-help[aria-expanded="true"], html.light .gp-help:hover { color: var(--gold-deep); background: rgba(214, 140, 60, .16); box-shadow: 0 0 0 3px rgba(214, 140, 60, .12); }
html.light .gp-help-panel { background: #f8f4ee; border-color: rgba(154, 82, 22, .38); box-shadow: 0 14px 30px rgba(70, 40, 15, .16); }
html.light .gp-help-panel::before { background: #f8f4ee; border-color: rgba(154, 82, 22, .38); }
html.light .gp-help-x { border-color: rgba(146, 94, 46, .3); }
html.light .gp-help-body { color: var(--text); }
html.light .gp-help-body b { color: var(--gold-strong); }

/* =====================================================================
   BOX DEL NUMERO IN SERVIZIO: bagliore ambra permanente + impulso di luce al cambio numero.
   Solo ombre e opacità: nessuna variazione di misure o di layout.
   L'impulso è un livello separato (::before) di cui si anima solo l'opacità, quindi è leggerissimo.
   ===================================================================== */
.app .hero-frame, .game-panel .gp-hero .hero-frame, .fly-layer .fly-box {
  box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 0 34px rgba(243,150,60,.22), 0 0 0 1px rgba(243,181,104,.08);
}
html.light .app .hero-frame, html.light .game-panel .gp-hero .hero-frame, html.light .fly-layer .fly-box {
  box-shadow: 0 1px 2px rgba(70,40,15,.06), 0 8px 24px rgba(90,55,25,.09), 0 0 26px rgba(232,138,48,.22), inset 0 1px 0 rgba(255,255,255,.8);
}
.app .hero::before, .game-panel .gp-hero::before {
  content: ""; position: absolute; inset: 4px; border-radius: var(--radius-lg); pointer-events: none; opacity: 0;
  box-shadow: 0 0 30px 4px rgba(246,160,70,.42), 0 0 72px 14px rgba(240,120,40,.20);
}
html.light .app .hero::before, html.light .game-panel .gp-hero::before {
  box-shadow: 0 0 26px 3px rgba(238,140,48,.40), 0 0 64px 12px rgba(232,120,40,.16);
}
/* al cambio numero il vecchio lampo sul bordo è sostituito dall'impulso: sale piano, resta un attimo, si spegne dolcemente */
.app .hero.flash .hero-frame, .game-panel .gp-hero.flash .hero-frame { animation: none; }
.app .hero.flash::before, .game-panel .gp-hero.flash::before { animation: hero-glow-pulse 2s cubic-bezier(.4,0,.2,1); }
@keyframes hero-glow-pulse { 0% { opacity: 0; } 30% { opacity: 1; } 45% { opacity: 1; } 100% { opacity: 0; } }
