/* =========================================================================
   RATSDEN — Città di Natale · stile
   Layout: città panoramica a tutta larghezza come hero, schermate dei giochi
   in colonna stretta sotto una barra fissa; navigazione in basso sul telefono.
   Palette notturna unica (festa di sera): blu notte, neve, luci calde.
   ========================================================================= */
:root {
  --bg: #0b1030;
  --bg2: #121a48;
  --surface: #1a2357;
  --surface2: #233070;
  --fg: #f3f6ff;
  --muted: #a9b4e0;
  --line: rgba(255, 255, 255, .12);
  --red: #ff3b5c;
  --gold: #ffd166;
  --green: #3ddc84;
  --ice: #4cc3ff;
  --pink: #ff7ad9;
  --ink: #1b1a3a;
  --radius: 16px;
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, sans-serif;
  --nav-h: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 40; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(26px, 6vw, 34px); }
h2 { font-size: clamp(20px, 5vw, 26px); }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: var(--ice); }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ------------------------------- barra ------------------------------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 8px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: linear-gradient(180deg, rgba(11, 16, 48, .98), rgba(11, 16, 48, .9));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand-text { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .06em; line-height: 1; display: flex; flex-direction: column; }
.brand-text small { font-family: var(--body); font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.me-chip {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; font-weight: 800; font-size: 14px; min-height: 38px;
}
.me-chip .pts { color: var(--gold); font-family: var(--display); font-size: 15px; }
.me-chip .avatar { flex: none; }

/* ------------------------------- viste ------------------------------- */
.view { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px); min-height: 60vh; }
.wrap {
  max-width: 680px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 18px 24px;
  display: grid; gap: 16px;
}
.wrap.wide { max-width: 1100px; }
.page-head { display: grid; gap: 6px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.lead { color: var(--muted); max-width: 60ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.card.accent { border-color: rgba(255, 209, 102, .4); background: linear-gradient(180deg, rgba(255, 209, 102, .08), transparent), var(--surface); }
.card.good { border-color: rgba(61, 220, 132, .45); }
.card.soft { background: var(--bg2); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.row.between { justify-content: space-between; }
.row.gap { gap: 12px; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 800; letter-spacing: .04em; background: var(--surface2); border: 1px solid var(--line); white-space: nowrap; }
.pill.live { background: rgba(255, 59, 92, .18); border-color: rgba(255, 59, 92, .5); color: #ffb3c0; }
.pill.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 59, 92, .6); animation: ping 1.4s infinite; }
.pill.ok { background: rgba(61, 220, 132, .16); border-color: rgba(61, 220, 132, .5); color: #baf5d4; }
.pill.gold { background: rgba(255, 209, 102, .16); border-color: rgba(255, 209, 102, .5); color: #ffe7a8; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 92, .6); } 100% { box-shadow: 0 0 0 10px rgba(255, 59, 92, 0); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 800; font-size: 15px; cursor: pointer;
  background: var(--red); color: #fff; min-height: 46px; text-decoration: none;
  box-shadow: 0 4px 0 #b4203a; transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b4203a; }
.btn:disabled { opacity: .5; cursor: default; filter: grayscale(.3); }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 #c49a2e; }
.btn.gold:active { box-shadow: 0 1px 0 #c49a2e; }
.btn.green { background: var(--green); color: var(--ink); box-shadow: 0 4px 0 #22a05b; }
.btn.green:active { box-shadow: 0 1px 0 #22a05b; }
.btn.ice { background: var(--ice); color: var(--ink); box-shadow: 0 4px 0 #2d8fc2; }
.btn.ice:active { box-shadow: 0 1px 0 #2d8fc2; }
.btn.ghost { background: var(--surface2); color: var(--fg); box-shadow: 0 4px 0 #121a48; }
.btn.ghost:active { box-shadow: 0 1px 0 #121a48; }
.btn.danger { background: #8a2338; box-shadow: 0 4px 0 #561422; }
.btn.danger:active { box-shadow: 0 1px 0 #561422; }
.btn.big { font-size: 18px; padding: 16px 28px; min-height: 56px; }
.btn.sm { font-size: 13px; padding: 7px 14px; min-height: 34px; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 40px; min-height: 40px; }

.input, textarea.input, select.input {
  width: 100%; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); color: var(--fg);
  padding: 12px 14px; font: inherit; font-weight: 600; min-height: 48px;
}
.input:focus { border-color: var(--gold); outline: none; }
textarea.input { min-height: 90px; resize: vertical; }
label.lbl { display: grid; gap: 6px; font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.field-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }

.list { display: grid; gap: 8px; }
.item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); min-width: 0; }
.item .grow { min-width: 0; }
.item .t { font-weight: 800; overflow-wrap: anywhere; }
.item .s { font-size: 13px; color: var(--muted); }
.item.mine { border-color: rgba(255, 209, 102, .5); }
a.item { text-decoration: none; color: inherit; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; border: 2px dashed var(--line); border-radius: var(--radius); font-size: 14px; }
.sep { height: 1px; background: var(--line); }
.avatar { flex: none; border-radius: 50%; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.kv b { color: var(--gold); font-family: var(--display); font-weight: 600; letter-spacing: .02em; }

.noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 80px; color: var(--muted); font-size: 12px; background: var(--bg2); }
img.ph { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .3s; background: var(--bg2); }
img.ph.loaded { opacity: 1; }

/* ---------------------------- nav in basso --------------------------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
  background: rgba(11, 16, 48, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.bottomnav a, .bottomnav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: none; border: 0; cursor: pointer;
}
.bottomnav .ic { font-size: 22px; line-height: 1; filter: grayscale(.4); transition: transform .15s, filter .15s; }
.bottomnav .active { color: var(--fg); }
.bottomnav .active .ic { filter: none; transform: translateY(-2px) scale(1.12); }
@media (min-width: 900px) {
  .bottomnav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 56px); bottom: auto; height: 52px; grid-template-columns: repeat(5, 140px); justify-content: center; border-top: 0; border-bottom: 1px solid var(--line); }
  .bottomnav a, .bottomnav button { flex-direction: row; gap: 8px; font-size: 12px; }
  .bottomnav .ic { font-size: 18px; }
  .view { padding-bottom: 40px; }
}

/* ------------------------------ overlay ------------------------------ */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(5, 8, 26, .78); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 640px) { .overlay { align-items: center; padding: 20px; } }
.modal {
  position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - env(safe-area-inset-top, 0px) - 20px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  display: grid; gap: 14px; animation: rise .25s ease-out;
}
@media (min-width: 640px) { .modal { border-radius: 22px; padding: 26px; } }
.modal.sheet { max-width: 420px; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface2); color: var(--fg); cursor: pointer; font-size: 15px; }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-pick button { border: 3px solid transparent; border-radius: 50%; padding: 2px; background: none; cursor: pointer; line-height: 0; }
.avatar-pick button.sel { border-color: var(--gold); }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.menu-grid a, .menu-grid button { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); color: var(--fg); text-decoration: none; font-weight: 800; cursor: pointer; text-align: left; }
.menu-grid .ic { font-size: 22px; }

/* ------------------------------- toast ------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 14px); transform: translate(-50%, 20px); z-index: 60;
  background: #fff; color: var(--ink); font-weight: 800; padding: 10px 16px; border-radius: 999px; max-width: calc(100% - 32px);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; font-size: 14px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); color: #fff; }
.toast.ok { background: var(--green); }
.netbar { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 56px); left: 50%; transform: translateX(-50%); z-index: 35; background: var(--gold); color: var(--ink); font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; }

/* --------------------------- festa di luci --------------------------- */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; opacity: 0; transition: opacity .3s; }
.fx.on { opacity: 1; }
.celebrate { position: fixed; inset: 0; z-index: 71; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(5, 8, 26, .55); opacity: 0; transition: opacity .3s; }
.celebrate.show { opacity: 1; }
.cel-card {
  background: #fff; color: var(--ink); border-radius: 26px; padding: 28px 24px; text-align: center; max-width: 440px; width: 100%;
  display: grid; gap: 12px; transform: scale(.7); transition: transform .45s cubic-bezier(.2, 1.6, .4, 1); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 6px var(--gold);
}
.celebrate.show .cel-card { transform: scale(1); }
.cel-card.win { box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 6px var(--green); }
.cel-card.info { box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 6px var(--ice); }
.cel-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #b4203a; }
.cel-title { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 8vw, 44px); line-height: 1; }
.cel-text { font-size: 18px; font-weight: 700; }
.cel-sub { font-size: 14px; color: #5a5f86; }
.cel-code { display: grid; gap: 2px; background: #f3f0ff; border: 2px dashed #b9b1e6; border-radius: 14px; padding: 10px; }
.cel-code span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #5a5f86; font-weight: 800; }
.cel-code strong { font-family: var(--display); font-size: 40px; letter-spacing: .2em; line-height: 1; }
.celebrate .btn { justify-self: center; }
.cel-card .thumb { width: min(60vw, 320px); aspect-ratio: 1; border-radius: 16px; overflow: hidden; margin: 0 auto; border: 3px solid var(--ink); }

/* ------------------------------- CITTÀ ------------------------------- */
.city-hero { position: relative; background: #0b1030; border-bottom: 1px solid var(--line); }
.city-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; position: relative; }
.city-scroll::-webkit-scrollbar { display: none; }
.city-svg { display: block; height: min(64vh, 540px); width: auto; min-width: 100%; user-select: none; }
@media (min-width: 1100px) { .city-svg { width: 100%; height: auto; max-height: 72vh; } }
.city-snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.city-hint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(27, 26, 58, .85); color: #fff; font-size: 12px; font-weight: 800; padding: 6px 12px; border-radius: 999px; pointer-events: none; animation: fadeHint 6s forwards; white-space: nowrap; }
@keyframes fadeHint { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.city-countdown { position: absolute; top: 10px; right: 12px; background: rgba(27, 26, 58, .85); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; font-size: 12px; font-weight: 800; }
.city-countdown b { font-family: var(--display); color: var(--gold); font-size: 16px; font-weight: 600; }

.city-svg .wip.off { display: none; }
/* città 3D (diorama) */
.city-hero.is3d { background: radial-gradient(120% 90% at 50% 20%, #1c2b63 0%, #0b1030 70%); overflow: hidden; }
.city-stage { position: relative; height: min(60vh, 560px); width: 100%; overflow: hidden; touch-action: pan-y; }
@media (min-width: 1100px) { .city-stage { height: 72vh; } }
.city3d-canvas { display: block; width: 100% !important; height: 100% !important; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.city3d-canvas:active { cursor: grabbing; }
.city-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(90% 75% at 50% 45%, transparent 58%, rgba(5, 8, 30, .6) 100%); }
.city-stage.storm::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; background: #fff; animation: stormFlash 6s forwards; }
@keyframes stormFlash { 0% { opacity: .7; } 12% { opacity: 0; } 20% { opacity: .35; } 30% { opacity: 0; } 100% { opacity: 0; } }
/* effetto tilt-shift: sfocatura leggera in alto e in basso, come una foto di un plastico */
.c3-tilt { position: absolute; inset: 0; pointer-events: none; }
.c3-tilt::before, .c3-tilt::after { content: ''; position: absolute; left: 0; right: 0; -webkit-backdrop-filter: blur(2.5px); backdrop-filter: blur(2.5px); }
.c3-tilt::before { top: 0; height: 24%; -webkit-mask-image: linear-gradient(#000 20%, transparent); mask-image: linear-gradient(#000 20%, transparent); }
.c3-tilt::after { bottom: 0; height: 22%; -webkit-mask-image: linear-gradient(transparent, #000 85%); mask-image: linear-gradient(transparent, #000 85%); }
.c3-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.c3-label { position: absolute; left: 0; top: 0; pointer-events: auto; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); border: 2.5px solid #1b1a3a; color: #1b1a3a; box-shadow: 0 6px 14px rgba(0, 0, 0, .45); will-change: transform; cursor: pointer; margin-top: -12px; animation: pinBob 2.6s ease-in-out infinite; }
.c3-label:nth-child(2n) { animation-delay: -1.3s; }
.c3-label:active { filter: brightness(1.15); }
.c3-label .ic { font-size: 20px; line-height: 1; }
.c3-label .badge { position: absolute; top: -3px; right: -3px; width: 13px; height: 13px; padding: 0; border-radius: 50%; background: var(--red); border: 2px solid #fff; font-size: 0; animation: ping 1.2s infinite; }
.c3-label .badge.wip { background: var(--gold); animation: none; }
.c3-label::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid #1b1a3a; transform: translateX(-50%); }
@keyframes pinBob { 0%, 100% { margin-top: -12px; } 50% { margin-top: -16px; } }
.c3-name::after { content: ''; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid rgba(27, 26, 58, .9); }
.c3-name.mine::after { border-top-color: var(--gold); }
.c3-name { position: absolute; left: 0; top: 0; pointer-events: none; padding: 3px 9px; border-radius: 999px; background: rgba(27, 26, 58, .9); color: #fff; font: 800 11px/1.2 var(--body); white-space: nowrap; border: 1.5px solid rgba(255, 255, 255, .3); box-shadow: 0 4px 10px rgba(0, 0, 0, .4); will-change: transform; margin-top: -6px; }
.c3-name.mine { background: var(--gold); color: var(--ink); border-color: #fff; }
.screen-mode .c3-label { width: 64px; height: 64px; border-width: 3.5px; }
.screen-mode .c3-label .ic { font-size: 34px; }
.screen-mode .c3-name { font-size: 16px; padding: 5px 12px; }
.scene-citta .city-stage { height: 100%; }
.scene-citta .city-stage::after { background: radial-gradient(80% 70% at 50% 50%, transparent 60%, rgba(5, 8, 30, .55) 100%); }
.scene-citta .city-overlay { z-index: 2; pointer-events: none; }

.city-svg text { font-family: var(--display); font-weight: 700; text-anchor: middle; }
.city-svg .sign-text { font-size: 17px; fill: var(--ink); letter-spacing: .04em; }
.city-svg .banner-text { font-size: 26px; fill: var(--ink); letter-spacing: .08em; }
.city-svg .marquee-text { font-size: 30px; fill: var(--gold); letter-spacing: .14em; }
.city-svg .neon-text { font-size: 18px; fill: #ff7ad9; letter-spacing: .14em; filter: drop-shadow(0 0 6px #ff7ad9); }
.city-svg .jumbo-text { font-size: 14px; fill: var(--gold); text-anchor: start; }
.city-svg .jumbo-sub { font-size: 11px; fill: #cdd6ff; text-anchor: start; font-family: var(--body); font-weight: 700; }
.city-svg .tiny-num { font-size: 13px; fill: var(--ink); }
.city-svg .tiny-label { font-size: 12px; fill: var(--ink); }
.city-svg .podio-num { font-size: 20px; fill: var(--ink); }
.city-svg .live-badge { font-size: 14px; fill: #fff; letter-spacing: .1em; }
.city-svg .spot { cursor: pointer; transition: transform .25s cubic-bezier(.2, 1.4, .4, 1), filter .25s; transform-box: fill-box; transform-origin: 50% 100%; }
.city-svg .spot:hover, .city-svg .spot:focus-visible { transform: translateY(-6px) scale(1.02); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)) brightness(1.08); outline: none; }
.city-svg .spot.deco { cursor: default; }
.city-svg .spot.deco:hover { transform: none; filter: none; }
.city-svg .sign { pointer-events: none; }
.city-svg .win.lit rect, .city-svg .win.lit path { animation: winFlicker 5s infinite; animation-delay: calc(var(--d) * -.7s); }
@keyframes winFlicker { 0%, 100% { fill: #ffd166; } 50% { fill: #ffbf47; } 52% { fill: #ffe29a; } }
.city-svg .bulb { animation: bulb 1.6s infinite; }
.city-svg .bulb.b0 { fill: #ff3b5c; animation-delay: 0s; }
.city-svg .bulb.b1 { fill: #ffd166; animation-delay: -.4s; }
.city-svg .bulb.b2 { fill: #3ddc84; animation-delay: -.8s; }
.city-svg .bulb.b3 { fill: #4cc3ff; animation-delay: -1.2s; }
@keyframes bulb { 0%, 100% { opacity: 1; filter: drop-shadow(0 0 4px currentColor); } 50% { opacity: .35; filter: none; } }
.city-svg .star-dot { animation: twinkle 3s infinite; animation-delay: calc(var(--d) * -.4s); }
@keyframes twinkle { 0%, 100% { opacity: .9; } 50% { opacity: .25; } }
.city-svg .lamp-glow { animation: glow 4s infinite; }
@keyframes glow { 0%, 100% { opacity: .9; } 50% { opacity: .6; } }
.city-svg .lasers path { opacity: .55; transform-box: fill-box; transform-origin: 50% 100%; animation: laser 2.4s ease-in-out infinite alternate; }
.city-svg .lasers path:nth-child(2) { animation-delay: -.8s; }
.city-svg .lasers path:nth-child(3) { animation-delay: -1.6s; }
@keyframes laser { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
.city-svg .neon { animation: neon 3s infinite; }
@keyframes neon { 0%, 100% { filter: drop-shadow(0 0 6px #ff7ad9); opacity: 1; } 45% { opacity: 1; } 50% { opacity: .5; filter: none; } 55% { opacity: 1; } }
.city-svg .smoke circle { animation: smoke 3s infinite ease-out; transform-box: fill-box; transform-origin: center; }
.city-svg .smoke circle:nth-child(2) { animation-delay: -1s; }
.city-svg .smoke circle:nth-child(3) { animation-delay: -2s; }
@keyframes smoke { 0% { transform: translateY(0) scale(.6); opacity: .9; } 100% { transform: translateY(-40px) scale(1.4); opacity: 0; } }
.city-svg .elf .wave { transform-box: fill-box; transform-origin: 0% 100%; animation: wave 1.6s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-30deg); } }
.city-svg .flag { transform-box: fill-box; transform-origin: 0% 50%; animation: flag 2s ease-in-out infinite alternate; }
@keyframes flag { from { transform: skewY(-4deg); } to { transform: skewY(4deg); } }
.city-svg .train { transition: none; }
.city-svg .train.go { animation: train 16s linear forwards; }
@keyframes train { from { transform: translateX(-460px); } to { transform: translateX(1900px); } }
.city-svg .train .egg-treno { cursor: pointer; }
.city-svg .sleigh.go { animation: sleigh 14s linear forwards; }
@keyframes sleigh { from { transform: translate(-300px, 170px); } 50% { transform: translate(800px, 90px); } to { transform: translate(2100px, 150px); } }
.city-svg .shooting { opacity: 0; }
.city-svg .shooting.go { animation: shoot 1.4s ease-out forwards; }
@keyframes shoot { 0% { opacity: 0; transform: translate(var(--sx, 300px), var(--sy, 60px)); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(var(--sx, 300px) + 260px), calc(var(--sy, 60px) + 95px)); } }
.city-svg .camera .flash { opacity: 0; }
.city-svg .camera.flash-on .flash { opacity: 1; }
.city-svg .camera.flash-on rect:first-child { fill: #3a3a6a; }
.city-svg .treelights .bulb { animation-duration: 2.2s; }
.city-svg .egg { cursor: pointer; }
.city-svg .egg-luna .lid { opacity: 0; transition: opacity .15s; }
.city-svg .egg-luna.wink .lid { opacity: 1; }
.city-svg .egg-luna.wink .eye.right circle { opacity: 0; }
.city-svg .egg-luna.nudge { animation: nudge .4s; transform-box: fill-box; transform-origin: center; }
@keyframes nudge { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-6deg); } 70% { transform: rotate(6deg); } }
.city-svg .egg-stella .star-glow { opacity: calc(.25 + var(--glow, 0) * .75); }
.city-svg .egg-stella.pulse .star { animation: starpop .3s; transform-box: fill-box; transform-origin: center; }
.city-svg .egg-stella.lit .star-glow { animation: starburst 1.2s infinite alternate; }
@keyframes starpop { 50% { transform: scale(1.35) rotate(10deg); } }
@keyframes starburst { from { transform: scale(1); } to { transform: scale(1.6); } }
.city-svg .hold-ring { stroke-dasharray: 164; stroke-dashoffset: 164; opacity: 0; }
.city-svg .egg-camino.holding .hold-ring { opacity: 1; animation: ring 2.5s linear forwards; }
@keyframes ring { to { stroke-dashoffset: 0; } }
.city-svg .egg-camino .santa-legs { transform-box: fill-box; transform-origin: 50% 100%; animation: kick 1s ease-in-out infinite alternate; }
@keyframes kick { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.city-svg .egg-camino.freed .santa-legs { animation: freed .8s forwards; }
@keyframes freed { to { transform: translateY(-80px) rotate(180deg); opacity: 0; } }
.city-svg .egg-pupazzo.done { opacity: 0; transition: opacity .4s; }
.city-svg .egg-topo { transition: transform .3s; }
.city-svg .egg-topo.found { filter: drop-shadow(0 0 8px var(--gold)); }
.city-svg .rat.bouncer { animation: bounce 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.city-svg .letters rect { animation: letters 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.city-svg .letters rect:nth-child(2) { animation-delay: -1.3s; }
@keyframes letters { 0%, 100% { transform: translateY(0) rotate(-12deg); } 50% { transform: translateY(-6px) rotate(-6deg); } }
.city-svg .marquee .bulb { animation-duration: .9s; }
.city-svg.storm .star-dot { animation-duration: .4s; }

/* sotto la città: la cosa da fare adesso + riquadri icona/parola */
.city-strip { display: grid; gap: 12px; }
.now-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(100deg, rgba(255, 209, 102, .22), rgba(255, 122, 217, .14)); border: 1.5px solid rgba(255, 209, 102, .45); color: var(--fg); text-decoration: none; }
.now-card .ic { font-size: 30px; width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(0, 0, 0, .25); }
.now-card .grow { display: grid; gap: 1px; min-width: 0; flex: 1; }
.now-card b { font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.1; }
.now-card .eyebrow { font-size: 10px; }
.now-card.live { border-color: rgba(255, 59, 92, .6); background: linear-gradient(100deg, rgba(255, 59, 92, .25), rgba(255, 209, 102, .12)); }
.now-card.live .eyebrow { color: #ff8da0; }
.now-card .btn { flex: none; pointer-events: none; }
.city-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 760px) { .city-legend { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.legend-card { position: relative; display: grid; justify-items: center; align-content: center; gap: 6px; padding: 12px 4px 10px; border-radius: 16px; background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--c, #fff) 35%, transparent); color: var(--fg); text-decoration: none; min-width: 0; transition: transform .15s, border-color .15s; }
.legend-card:hover, .legend-card:active { transform: translateY(-2px); border-color: var(--c, var(--gold)); }
.legend-card .ic { font-size: 28px; line-height: 1; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--c, #fff) 22%, transparent); }
.legend-card .t { font-family: var(--display); font-weight: 600; font-size: 13px; line-height: 1; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-card .s { position: absolute; top: 6px; right: 6px; padding: 2px 6px; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .06em; background: var(--gold); color: var(--ink); line-height: 1.3; }
.legend-card.live .s { background: var(--red); color: #fff; animation: ping 1.4s infinite; }
.legend-card.wip { opacity: .72; }
.legend-card.wip .s { background: rgba(255, 255, 255, .85); }
.legend-card.secrets .s { background: rgba(255, 255, 255, .16); color: var(--fg); }
.legend-card.secrets.some .s { background: var(--gold); color: var(--ink); }
.ticker { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; justify-content: center; }
.ticker::-webkit-scrollbar { display: none; }
.ticker .pill { flex: none; }

/* ------------------------------ TOMBOLA ------------------------------ */
.last-number { display: grid; place-items: center; gap: 4px; padding: 18px; border-radius: 20px; background: radial-gradient(circle at 50% 30%, #2a3a8a, var(--bg2)); border: 1px solid var(--line); text-align: center; }
.last-number .num { font-family: var(--display); font-weight: 700; font-size: 84px; line-height: 1; color: var(--gold); text-shadow: 0 6px 0 rgba(0, 0, 0, .35); }
.last-number .smorfia { font-style: italic; color: var(--muted); font-weight: 700; }
.last-number.pop .num { animation: numpop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes numpop { from { transform: scale(.4); } to { transform: scale(1); } }
.cartella { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; padding: 10px; border-radius: 16px; background: #fff8e6; border: 3px solid var(--ink); box-shadow: 0 6px 0 rgba(0, 0, 0, .35); }
.cartella .c { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: clamp(14px, 4vw, 22px); color: var(--ink); background: #fff; border: 2px solid #e6d7b5; position: relative; }
.cartella .c.e { background: transparent; border-color: transparent; }
.cartella .c.hit { background: var(--red); color: #fff; border-color: #b4203a; animation: numpop .4s; }
.cartella-wrap { display: grid; gap: 8px; }
.cartella-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); font-weight: 800; }
.tabellone { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.tabellone .n { aspect-ratio: 1; display: grid; place-items: center; border-radius: 6px; background: var(--bg2); border: 1px solid var(--line); font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--muted); }
.tabellone .n.x { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.tabellone .n.last { background: var(--red); color: #fff; border-color: var(--red); transform: scale(1.12); box-shadow: 0 0 12px var(--red); }
.wins-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.win-slot { display: grid; gap: 2px; place-items: center; text-align: center; padding: 8px 2px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); min-width: 0; }
.win-slot.done { background: rgba(61, 220, 132, .14); border-color: rgba(61, 220, 132, .5); color: var(--fg); }
.win-slot .who { font-size: 12px; color: var(--green); font-weight: 800; text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; }
.win-slot .pz { font-size: 10px; color: var(--muted); text-transform: none; letter-spacing: 0; }

/* ------------------------------ CACCIA ------------------------------- */
.mission { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); cursor: pointer; text-align: left; color: var(--fg); min-width: 0; }
.mission .em { font-size: 30px; line-height: 1; text-align: center; }
.mission .t { font-weight: 800; }
.mission .pts { font-family: var(--display); color: var(--gold); font-size: 18px; font-weight: 600; white-space: nowrap; }
.mission.done { border-color: rgba(61, 220, 132, .5); }
.mission.done .pts { color: var(--green); }
.mission.pending { border-color: rgba(255, 209, 102, .5); }
.mission .st { font-size: 12px; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery .g { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); cursor: pointer; }
.gallery .g .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-box { display: grid; gap: 10px; }
.upload-prev { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; border: 2px solid var(--line); background: var(--bg2); }
.progress { height: 10px; border-radius: 999px; background: var(--bg2); overflow: hidden; border: 1px solid var(--line); }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--ice)); transition: width .3s; }
.progress.indet i { width: 40%; animation: indet 1.2s infinite linear; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.lightbox { position: fixed; inset: 0; z-index: 55; background: rgba(5, 8, 26, .94); display: grid; grid-template-rows: 1fr auto; }
.lightbox img { width: 100%; height: 100%; object-fit: contain; }
.lightbox .cap { padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ------------------------------- SANTA ------------------------------- */
.santa-card { display: grid; gap: 10px; padding: 18px; border-radius: 20px; background: linear-gradient(135deg, #8a2338, #d8434f); border: 3px solid var(--ink); box-shadow: 0 8px 0 rgba(0, 0, 0, .35); }
.santa-card .who { font-family: var(--display); font-size: 30px; font-weight: 700; }
.santa-card .wish { background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.guess-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.guess-grid button { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); color: var(--fg); font-weight: 800; cursor: pointer; text-align: left; min-width: 0; }
.guess-grid button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guess-grid button.sel { border-color: var(--gold); background: rgba(255, 209, 102, .14); }
.reveal-row { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); animation: rise .4s; }
.reveal-row .big { font-family: var(--display); font-size: 20px; font-weight: 600; }
.reveal-row.ok { border-color: rgba(61, 220, 132, .5); }

/* ------------------------------ BACHECA ------------------------------ */
.post { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); animation: rise .3s; }
.post .txt { font-weight: 700; overflow-wrap: anywhere; }
.post .meta { font-size: 12px; color: var(--muted); }
.post.mine { border-color: rgba(255, 209, 102, .4); }
.counter { font-size: 12px; color: var(--muted); text-align: right; }

/* ------------------------------ JUKEBOX ------------------------------ */
.song { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); }
.song .rank { font-family: var(--display); font-size: 22px; color: var(--gold); width: 28px; text-align: center; }
.song .t { font-weight: 800; overflow-wrap: anywhere; }
.song .s { font-size: 12px; color: var(--muted); }
.song .vote { display: grid; place-items: center; gap: 0; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); padding: 6px 12px; cursor: pointer; font-weight: 800; min-width: 58px; }
.song .vote.on { border-color: var(--pink); background: rgba(255, 122, 217, .16); }
.song .vote b { font-family: var(--display); font-size: 18px; font-weight: 600; }
.song.played { opacity: .5; }

/* ----------------------------- CLASSIFICA ---------------------------- */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end; }
.podium .p { display: grid; gap: 6px; place-items: center; text-align: center; padding: 12px 8px; border-radius: 16px 16px 6px 6px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.podium .p .nm { font-weight: 800; font-size: 14px; overflow-wrap: anywhere; }
.podium .p .pt { font-family: var(--display); color: var(--gold); font-size: 24px; font-weight: 700; }
.podium .p.first { background: linear-gradient(180deg, rgba(255, 209, 102, .25), var(--surface)); border-color: rgba(255, 209, 102, .6); padding-bottom: 28px; }
.podium .p.second { padding-bottom: 18px; }
.podium .medal { font-size: 28px; line-height: 1; }
.rank-row { display: grid; grid-template-columns: 34px auto 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.rank-row .r { font-family: var(--display); color: var(--muted); font-size: 16px; }
.rank-row .nm { font-weight: 800; overflow-wrap: anywhere; }
.rank-row .pt { font-family: var(--display); color: var(--gold); font-size: 18px; }
.rank-row.me { border-color: rgba(255, 209, 102, .5); }
.breakdown { display: flex; gap: 6px; flex-wrap: wrap; }

/* ------------------------------- GUIDA ------------------------------- */
.guide-section { display: grid; gap: 10px; }
.programme { display: grid; gap: 6px; }
.programme .pr { display: grid; grid-template-columns: 58px 1fr; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 10px; background: var(--bg2); }
.programme .pr b { font-family: var(--display); color: var(--gold); font-weight: 600; }
.secret { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.secret .chk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; }
.secret.found .chk { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.secret .nm { font-weight: 800; }
.secret .hint { font-size: 13px; color: var(--muted); }
.secret.found .hint { color: var(--green); }
.rat-talk { display: grid; grid-template-columns: 60px 1fr; gap: 12px; align-items: center; }

/* ------------------------------- ADMIN ------------------------------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 13px; cursor: pointer; }
.tabs button.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 0 6px; margin-left: 4px; }
.numpad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.numpad button { aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); color: var(--fg); font-family: var(--display); font-size: 15px; cursor: pointer; }
.numpad button.x { background: var(--gold); color: var(--ink); }
.review { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start; padding: 10px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); }
.review .thumb { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface); }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; }
.toggle input { width: 22px; height: 22px; accent-color: var(--green); }
.pin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 280px; margin: 0 auto; }
.pin-grid button { aspect-ratio: 1.4; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--fg); font-family: var(--display); font-size: 24px; cursor: pointer; }
.pin-dots { display: flex; justify-content: center; gap: 10px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); }
.pin-dots i.on { background: var(--gold); border-color: var(--gold); }
.chip-list { display: flex; gap: 6px; flex-wrap: wrap; }
.scene-btn { border: 2px solid var(--line); background: var(--bg2); color: var(--fg); border-radius: 12px; padding: 10px 12px; font-weight: 800; cursor: pointer; }
.scene-btn.on { border-color: var(--ice); background: rgba(76, 195, 255, .16); }
.danger-zone { border-color: rgba(255, 59, 92, .4); }
.qr-box { background: #fff; padding: 10px; border-radius: 12px; display: inline-block; line-height: 0; }

/* ----------------------------- MAXISCHERMO --------------------------- */
body.screen-mode { overflow: hidden; }
body.screen-mode .topbar, body.screen-mode .bottomnav { display: none; }
body.screen-mode .view { padding: 0; min-height: 100vh; }
.screen { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto; background: var(--bg); overflow: hidden; }
.screen-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: rgba(11, 16, 48, .8); z-index: 2; }
.screen-top .brand-text { font-size: 28px; }
.screen-top .clock { font-family: var(--display); font-size: 30px; color: var(--gold); font-variant-numeric: tabular-nums; }
.screen-top .scene-name { font-size: 14px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.screen-body { position: relative; overflow: hidden; display: grid; }
.scene { position: absolute; inset: 0; padding: 28px 36px; display: grid; gap: 20px; animation: sceneIn .6s ease-out; min-width: 0; }
@keyframes sceneIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.scene h2 { font-size: clamp(28px, 4vw, 48px); }
.screen-bottom { display: flex; align-items: center; gap: 24px; padding: 10px 28px; border-top: 1px solid var(--line); background: rgba(11, 16, 48, .85); overflow: hidden; z-index: 2; }
.screen-bottom .qr { flex: none; display: flex; align-items: center; gap: 12px; }
.screen-bottom .qr .qr-box { padding: 6px; border-radius: 8px; }
.screen-bottom .qr .lbl { font-size: 13px; font-weight: 800; line-height: 1.25; max-width: 180px; }
.screen-bottom .qr .lbl b { color: var(--gold); font-family: var(--display); font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.marquee-wrap { flex: 1; overflow: hidden; white-space: nowrap; min-width: 0; }
.marquee-run { display: inline-block; padding-left: 100%; animation: marquee 40s linear infinite; font-size: 22px; font-weight: 800; }
.marquee-run span { margin-right: 60px; }
.marquee-run span b { color: var(--gold); }
@keyframes marquee { to { transform: translateX(-100%); } }
.scene-citta .city-svg { width: 100%; height: 100%; max-height: none; }
.scene-citta { padding: 0; }
.scene-citta .city-overlay { position: absolute; left: 40px; top: 28px; display: grid; gap: 8px; }
.scene-citta .big-title { font-family: var(--display); font-weight: 700; font-size: clamp(32px, 4.5vw, 64px); line-height: .95; text-shadow: 0 6px 0 rgba(0, 0, 0, .35); }
.scene-citta .big-sub { font-size: clamp(16px, 2vw, 26px); font-weight: 800; color: var(--gold); letter-spacing: .1em; text-transform: uppercase; }
.scene-tombola { grid-template-columns: 1.2fr .8fr; grid-template-rows: auto 1fr; }
.scene-tombola .tabellone { grid-template-columns: repeat(10, 1fr); grid-auto-rows: 1fr; gap: 8px; height: 100%; min-height: 0; }
.scene-tombola .tabellone .n { aspect-ratio: auto; font-size: clamp(16px, 2.2vw, 34px); border-radius: 12px; min-height: 0; }
.scene-tombola > .stack { min-height: 0; align-content: start; }
.scene-tombola .last-number { align-content: center; }
.scene-tombola .last-number .num { font-size: clamp(90px, 16vw, 220px); }
.scene-tombola .last-number .smorfia { font-size: clamp(16px, 2vw, 28px); }
.scene-tombola .wins-grid { gap: 10px; }
.scene-tombola .win-slot { font-size: 14px; padding: 12px 6px; }
.scene-tombola .win-slot .who { font-size: 16px; }
.scene-tombola .recent { display: flex; gap: 10px; flex-wrap: wrap; }
.scene-tombola .recent .n { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 14px; background: var(--surface2); font-family: var(--display); font-size: 26px; border: 1px solid var(--line); }
.scene-galleria .gallery { grid-template-columns: repeat(6, 1fr); gap: 12px; align-content: start; }
.scene-galleria .gallery .g { border-radius: 16px; }
.scene-galleria .gallery .g.hero { grid-column: span 2; grid-row: span 2; }
.scene-galleria .gallery .g .cap { font-size: 16px; padding: 24px 12px 10px; }
.scene-classifica { grid-template-columns: 1fr 1fr; }
.scene-classifica .rank-row { padding: 12px 18px; grid-template-columns: 54px auto 1fr auto; }
.scene-classifica .rank-row .r { font-size: 26px; }
.scene-classifica .rank-row .nm { font-size: 24px; }
.scene-classifica .rank-row .pt { font-size: 30px; }
.scene-classifica .podium .p .nm { font-size: 24px; }
.scene-classifica .podium .p .pt { font-size: 40px; }
.scene-classifica .podium .medal { font-size: 52px; }
.scene-bacheca .posts { columns: 3; column-gap: 16px; }
.scene-bacheca .post { break-inside: avoid; margin-bottom: 16px; font-size: 20px; }
.scene-bacheca .post .meta { font-size: 14px; }
.scene-jukebox .song { padding: 16px 22px; }
.scene-jukebox .song .t { font-size: 26px; }
.scene-jukebox .song .rank { font-size: 34px; width: 48px; }
.scene-jukebox .song .vote b { font-size: 28px; }
.scene-santa .reveal-row { padding: 18px 24px; font-size: 20px; }
.scene-santa .reveal-row .big { font-size: 34px; }
.scene-santa .reveal-list { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; align-content: start; }
.screen-announce { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(5, 8, 26, .5); animation: sceneIn .4s; padding: 40px; }
.screen-announce .cel-card { max-width: 900px; padding: 48px; }
.screen-announce .cel-title { font-size: clamp(40px, 7vw, 96px); }
.screen-announce .cel-text { font-size: clamp(22px, 3vw, 40px); }
.screen-announce .cel-code strong { font-size: 64px; }
.screen-announce .thumb { width: 260px; height: 260px; border-radius: 20px; overflow: hidden; margin: 0 auto; border: 4px solid var(--ink); }
.screen-cursor-hide { cursor: none; }

@media (max-width: 900px) {
  .scene-tombola, .scene-classifica { grid-template-columns: 1fr; }
  .scene-galleria .gallery { grid-template-columns: repeat(3, 1fr); }
  .scene-bacheca .posts { columns: 1; }
  .scene-santa .reveal-list { grid-template-columns: 1fr; }
}

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

/* ----------------------------- LAVORI IN CORSO ----------------------------- */
.card.wip { border-color: rgba(255, 209, 102, .5); background: repeating-linear-gradient(135deg, rgba(255, 209, 102, .07) 0 10px, transparent 10px 20px), var(--surface); }
fieldset.ro { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 12px; opacity: .55; filter: grayscale(.35); pointer-events: none; }
.how { display: grid; gap: 10px; }
.how > div { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.how b { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; flex: none; font-family: var(--display); font-weight: 700; }

/* -------------------------------- TUTORIAL --------------------------------- */
.tour { position: fixed; inset: 0; z-index: 65; animation: tourIn .25s; }
.tour.out { opacity: 0; transition: opacity .25s; pointer-events: none; }
@keyframes tourIn { from { opacity: 0; } to { opacity: 1; } }
.tour-hole { position: absolute; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(5, 8, 26, .84); border: 2px solid var(--gold); transition: left .35s, top .35s, width .35s, height .35s, border-radius .35s; pointer-events: none; }
.tour-hole.none { border-color: transparent; }
.tour-card { position: absolute; left: 16px; right: 16px; max-width: 440px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); transition: top .3s; animation: rise .3s; }
.tour-head { display: flex; gap: 12px; align-items: center; }
.tour-ic { font-size: 32px; width: 56px; height: 56px; display: grid; place-items: center; background: var(--surface2); border-radius: 16px; flex: none; }
.tour-card h3 { margin: 2px 0 0; font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.1; }
.tour-card p { margin: 0; font-size: 15px; line-height: 1.45; }
.tour-dots { display: flex; gap: 6px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 6px; background: var(--surface2); transition: width .25s, background .25s; }
.tour-dots i.on { background: var(--gold); width: 22px; }
.tour-dots i.done { background: rgba(255, 209, 102, .5); }
