* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  width: 100%; height: 100%; overflow: hidden; background: #0b2a4a;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", Roboto, sans-serif;
  color: #fff; touch-action: none; user-select: none; -webkit-user-select: none;
  overscroll-behavior: none;
}
#gioco { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.nascosto { display: none !important; }

#hud {
  position: fixed; left: 0; right: 0; top: 0;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  pointer-events: none; text-shadow: 0 2px 6px rgba(0,0,0,.45);
}
.punti { font-size: 34px; font-weight: 800; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.luogo {
  margin-top: 4px; font-size: 13px; font-weight: 600; opacity: .9;
  background: rgba(10,30,60,.45); padding: 3px 9px; border-radius: 20px; display: inline-block;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hud-dx { display: flex; align-items: center; gap: 10px; }
.monete {
  display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 800;
  background: rgba(10,30,60,.45); padding: 5px 12px 5px 6px; border-radius: 30px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-variant-numeric: tabular-nums;
}
.moneta-icona {
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6b0, #f5c400 45%, #b07d00 100%);
  box-shadow: inset 0 0 0 2px rgba(120,80,0,.5);
}
#pausa {
  pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(10,30,60,.5); color: #fff; font-weight: 900; font-size: 15px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

.schermo {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px 16px; text-align: center;
  background: linear-gradient(180deg, rgba(8,28,58,.55) 0%, rgba(8,28,58,.25) 45%, rgba(8,28,58,.75) 100%);
}
.titolo { display: flex; flex-direction: column; line-height: .9; }
.titolo .t1 { font-size: 22px; letter-spacing: 10px; font-weight: 700; opacity: .95; }
.titolo .t2 {
  font-size: 58px; font-weight: 900; letter-spacing: 2px;
  background: linear-gradient(180deg, #ffffff, #ffd84a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35));
}
.titolo.piccolo .t2 { font-size: 46px; }
.sotto { max-width: 300px; font-size: 15px; opacity: .92; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.istruzioni {
  display: flex; flex-direction: column; gap: 6px; font-size: 14px;
  background: rgba(8,28,58,.5); padding: 12px 18px; border-radius: 14px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.istruzioni b { display: inline-block; min-width: 46px; color: #ffd84a; }
.bottone {
  margin-top: 6px; border: 0; padding: 16px 56px; border-radius: 40px;
  font-size: 22px; font-weight: 800; color: #3a2200; letter-spacing: .5px;
  background: linear-gradient(180deg, #ffe46b, #f5b800);
  box-shadow: 0 6px 0 #b07d00, 0 12px 24px rgba(0,0,0,.35);
}
.bottone:active { transform: translateY(4px); box-shadow: 0 2px 0 #b07d00, 0 6px 14px rgba(0,0,0,.35); }
.record { font-size: 14px; opacity: .85; }
.risultato { display: flex; gap: 12px; }
.risultato div {
  display: flex; flex-direction: column; min-width: 86px; padding: 10px 8px; border-radius: 14px;
  background: rgba(8,28,58,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.risultato small { font-size: 12px; opacity: .8; }
.risultato b { font-size: 26px; font-variant-numeric: tabular-nums; }

.avviso {
  position: fixed; left: 50%; top: 32%; transform: translate(-50%, -50%) scale(.8);
  font-size: 26px; font-weight: 900; opacity: 0; pointer-events: none; white-space: nowrap;
  text-shadow: 0 3px 10px rgba(0,0,0,.5); transition: opacity .3s, transform .3s;
}
.avviso.visibile { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.ruota {
  display: none; position: fixed; inset: 0; background: #0b2a4a; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; padding: 16px; text-align: center; z-index: 10;
}
@media (orientation: landscape) and (max-height: 500px) { .ruota { display: flex; } }
