:root { --blu: #0f1b2d; --giallo: #ffc93c; --rosso: #ff4d5a; --verde: #5be37d; --azzurro: #49b6ff; --carta: rgba(12, 22, 38, .78); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--blu); color: #fff; font: 600 15px/1.3 system-ui, "Segoe UI", Roboto, sans-serif;
  user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
canvas#scena { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.tenue { opacity: .7; font-weight: 500; }

/* ---- schermi (menu, lancio, fine, classifica) ---- */
.schermo { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); text-align: center; }
#menu { background: radial-gradient(ellipse 75% 95% at 50% 50%, rgba(8, 16, 30, .82), rgba(8, 16, 30, .4) 55%, transparent 80%); }
#menu > * { width: min(340px, 86vw); }
#menu .marchio { text-align: center; }
@media (orientation: portrait) { #menu { align-items: center; justify-content: flex-end; padding-bottom: 5vh; background: linear-gradient(0deg, rgba(8, 16, 30, .85), rgba(8, 16, 30, .3) 55%, transparent 75%); } .marchio { text-align: center; } }
#lancio, #fine, #classifica, #modi, #gruppo { background: rgba(8, 16, 30, .8); backdrop-filter: blur(4px); }
#armadio { align-items: flex-start; padding-left: max(6vw, env(safe-area-inset-left)); background: linear-gradient(90deg, rgba(8, 16, 30, .85), rgba(8, 16, 30, .3) 50%, transparent 72%); }
#armadio > * { width: min(360px, 88vw); }
.due { display: flex; gap: 8px; } .due > * { flex: 1; }
/* i giochi: due righe, si scorre in orizzontale */
#griglia { display: grid; grid-template-rows: repeat(2, 1fr); grid-auto-flow: column; grid-auto-columns: min(230px, 62vw); gap: 10px; width: min(1100px, 96vw); overflow-x: auto; overflow-y: hidden; touch-action: pan-x; padding: 6px 4px 12px; scroll-snap-type: x proximity; }
#griglia .gioco { scroll-snap-align: start; min-height: 150px; }
.gioco { background: var(--carta); border: 2px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 12px 14px; text-align: left; display: flex; flex-direction: column; gap: 4px; transition: transform .1s, border-color .1s; }
.gioco:hover { transform: translateY(-3px); border-color: var(--giallo); }
.gioco i { font-style: normal; font-size: 34px; line-height: 1; } .gioco b { font-size: 17px; } .gioco span { font-size: 12px; font-weight: 500; opacity: .8; } .gioco u { text-decoration: none; font-size: 11px; color: var(--giallo); }
#gruppo > div { display: flex; flex-direction: column; gap: 10px; align-items: center; width: min(360px, 90vw); } #gruppo p { margin: 0; }
#gruppo .due, #gruppo .grosso, #gruppo #membri { width: 100%; }
#gruppo-codice { font-size: 54px; font-weight: 900; letter-spacing: .18em; color: var(--giallo); line-height: 1; user-select: text; -webkit-user-select: text; }
#membri { background: var(--carta); border-radius: 16px; overflow: hidden; text-align: left; }
#membri div { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
#membri div.vuoto { opacity: .4; font-weight: 500; } #membri div.io { background: rgba(255, 201, 60, .14); }
#membri i { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); } #membri b { flex: 1; } #membri small { opacity: .7; }
/* in alto: chi sei (profilo YouppyApps) oppure il bottone per accedere */
#conto { position: fixed; z-index: 3; left: 50%; transform: translateX(-50%); width: min(340px, 86vw); top: max(10px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; background: var(--carta); border-radius: 16px; padding: 6px 8px 6px 6px; backdrop-filter: blur(4px); }
#conto span { flex: 1; min-width: 0; } #conto b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#conto-tondo { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 900; color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
#conto span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; padding-right: 6px; } #conto small { font-size: 11px; font-weight: 500; opacity: .75; }
#conto.youppy small { color: var(--verde); opacity: 1; }
#accedi { text-decoration: none; background: var(--giallo); color: #2a1c00; font-weight: 800; border-radius: 999px; padding: 8px 14px; }
/* il giochino dell'attesa */
#caricamento { background: linear-gradient(180deg, #14233a, #0f1b2d); z-index: 2; } #caricamento .marchio { text-align: center; }
#corsa { width: min(720px, 96vw); aspect-ratio: 880 / 352; pointer-events: none; } /* senza sfondo e senza comandi: va da sola */
#corsa > * { width: 100%; height: 100%; display: block; object-fit: contain; }
#corsa-attesa:empty { display: none; }
#apri-gruppo.attivo { background: rgba(255, 201, 60, .28); outline: 2px solid var(--giallo); }
#codice { width: 130px; padding: 8px 10px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .25); background: rgba(0, 0, 0, .35); color: #fff; font: inherit; text-transform: uppercase; letter-spacing: .1em; user-select: text; -webkit-user-select: text; }
#modo-stato { position: absolute; left: 50%; top: max(34px, calc(env(safe-area-inset-top) + 26px)); transform: translateX(-50%); display: flex; gap: 8px; align-items: center; background: var(--carta); border-radius: 12px; padding: 6px 12px; font-size: 14px; white-space: nowrap; }
#modo-stato b { color: var(--giallo); font-size: 17px; font-variant-numeric: tabular-nums; } #modo-stato i { font-style: normal; opacity: .75; font-variant-numeric: tabular-nums; }
#hud.verde { box-shadow: inset 0 0 0 8px var(--verde); } #hud.rosso { box-shadow: inset 0 0 0 8px var(--rosso); }
/* ---- prima persona, alla maniera degli sparatutto da browser: mirino a croce che si allarga, vita in basso a sinistra,
   colpi grandi in basso a destra, segno quando colpisci, arco rosso da dove ti colpiscono ---- */
#mirino { position: absolute; left: 50%; top: 50%; width: 0; height: 0; --gap: 7px; }
#mirino i { position: absolute; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .75); transition: transform .06s linear; }
#mirino i:nth-child(1), #mirino i:nth-child(2) { width: 2px; height: 9px; left: -1px; } #mirino i:nth-child(3), #mirino i:nth-child(4) { height: 2px; width: 9px; top: -1px; }
#mirino i:nth-child(1) { bottom: 0; transform: translateY(calc(-1 * var(--gap))); } #mirino i:nth-child(2) { top: 0; transform: translateY(var(--gap)); }
#mirino i:nth-child(3) { right: 0; transform: translateX(calc(-1 * var(--gap))); } #mirino i:nth-child(4) { left: 0; transform: translateX(var(--gap)); }
#mirino b { position: absolute; left: -1.5px; top: -1.5px; width: 3px; height: 3px; border-radius: 50%; background: var(--giallo); box-shadow: 0 0 0 1px rgba(0, 0, 0, .7); }
#segno-colpo { position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; opacity: 0; transform: rotate(45deg) scale(.6); transition: opacity .25s, transform .25s;
  background: linear-gradient(#fff, #fff) center / 2px 100% no-repeat, linear-gradient(#fff, #fff) center / 100% 2px no-repeat; -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); }
#segno-colpo.su { opacity: 1; transform: rotate(45deg) scale(1); transition: none; } #segno-colpo.rosso { filter: drop-shadow(0 0 2px #f00) brightness(.9) sepia(1) saturate(20) hue-rotate(-50deg); }
#da-dove { position: absolute; left: 50%; top: 50%; width: 190px; height: 190px; margin: -95px; border-radius: 50%; border: 7px solid transparent; border-top-color: rgba(255, 40, 60, .9); opacity: 0; transition: opacity .5s; }
#da-dove.su { opacity: 1; transition: none; }
#hud.prima #in-basso { flex-direction: row; justify-content: space-between; align-items: flex-end; transform: none; padding: 0 max(22px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); }
#hud.prima #salute { width: min(280px, 40vw); gap: 4px; }
#hud.prima .barra { border-radius: 3px; transform: skewX(-14deg); box-shadow: 0 0 0 2px rgba(0, 0, 0, .55); } #hud.prima .barra i { border-radius: 0; }
#hud.prima .barra.vita { height: 26px; } #hud.prima .barra.scudo { height: 9px; }
#hud.prima .barra.vita span { font-size: 17px; font-weight: 900; line-height: 26px; text-align: left; padding-left: 10px; transform: skewX(14deg); }
#hud.prima #munizioni, #hud.prima #raccogli { display: none; }
#hud.prima #modo-stato { background: rgba(0, 0, 0, .45); border-radius: 4px; transform: translateX(-50%) skewX(-10deg); }
/* i due selettori della vista stanno sulla minimappa: a sinistra prima/terza persona, a destra nord fisso / vista che gira */
/* accanto alla minimappa, in colonna: la bussola (toccala per passare da nord fisso a vista che gira), sotto la prima
   persona, sotto ancora la pausa (solo contro i bot) */
#mappa { display: flex; align-items: flex-start; gap: 6px; line-height: 0; }
#viste { display: flex; flex-direction: column; gap: 6px; align-items: center; }
#viste button { width: 46px; height: 46px; border-radius: 50%; background: var(--carta); border: 2px solid rgba(255, 255, 255, .3); font-size: 13px; font-weight: 900; line-height: 1; display: grid; place-items: center; }
#bussola { background: radial-gradient(circle, #1d3150 55%, #0f1b2d) !important; }
#bussola.attivo { border-color: var(--giallo) !important; box-shadow: 0 0 0 2px rgba(255, 201, 60, .35); }
#ago { position: relative; width: 34px; height: 34px; display: block; transition: transform .08s linear; }
#ago::before { content: ""; position: absolute; left: 50%; top: 3px; margin-left: -5px; border: 5px solid transparent; border-bottom: 13px solid var(--rosso); border-top: 0; }
#ago::after { content: ""; position: absolute; left: 50%; bottom: 3px; margin-left: -5px; border: 5px solid transparent; border-top: 13px solid #e6edf5; border-bottom: 0; }
#ago b { position: absolute; left: 0; right: 0; top: -9px; font-size: 9px; color: var(--rosso); text-shadow: 0 1px 1px #000; }
#vista.attivo, #notte.attivo { background: var(--giallo) !important; color: #2a1c00; border-color: #fff; }
/* col visore notturno lo schermo prende una velatura verde con le righe del monitor */
#hud.notte::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(25, 240, 255, .05) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 20, 10, .65)); }
#pausa { background: rgba(8, 16, 30, .82); backdrop-filter: blur(5px); z-index: 4; }
#mappe { display: flex; gap: 8px; overflow-x: auto; max-width: min(1100px, 96vw); padding: 2px 4px 8px; touch-action: pan-x; }
#mappe button { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--carta); border: 2px solid rgba(255, 255, 255, .14); font-size: 13px; }
#mappe button.scelta { border-color: var(--giallo); background: rgba(255, 201, 60, .18); } #mappe button small { opacity: .7; font-weight: 500; }
.etichetta.amico { color: #8fd0ff; } .etichetta.amico i u { background: var(--azzurro); } .etichetta.nemico { color: #ffb3b8; }
.marchio { margin: 0 0 6px; font-size: clamp(40px, 9vw, 68px); font-weight: 900; letter-spacing: -.02em; line-height: .95; text-align: left; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.marchio b { color: var(--giallo); }
h2 { margin: 0; font-size: clamp(24px, 5vw, 38px); font-weight: 900; }
.grosso { padding: 16px 28px; border-radius: 16px; background: var(--giallo); color: #2a1c00; font-size: 24px; font-weight: 900; letter-spacing: .03em; box-shadow: 0 6px 0 #b8860b, 0 10px 24px rgba(0, 0, 0, .35); transition: transform .08s, box-shadow .08s; }
.grosso:active { transform: translateY(4px); box-shadow: 0 2px 0 #b8860b; }
.grosso:disabled { filter: grayscale(.7); opacity: .7; }
.secondo { padding: 10px 18px; border-radius: 12px; background: rgba(255, 255, 255, .14); }
.secondo:hover { background: rgba(255, 255, 255, .22); }
#profilo { background: var(--carta); border-radius: 16px; padding: 14px 16px; text-align: left; }
#nome-riga { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; }
#nome-riga button { background: none; opacity: .7; font-size: 18px; }
#livello { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
#liv { flex: none; background: var(--giallo); color: #2a1c00; border-radius: 8px; padding: 2px 8px; font-weight: 900; }
#numeri { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: 12px; opacity: .9; }
#numeri b { display: block; font-size: 20px; }
#aspetto { display: flex; align-items: center; justify-content: space-between; background: var(--carta); border-radius: 16px; padding: 6px; }
#aspetto button { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .12); font-size: 26px; line-height: 1; }
#carta { width: min(72vh, 92vw); height: min(72vh, 92vw); border-radius: 50%; cursor: crosshair; touch-action: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, .15), 0 20px 50px rgba(0, 0, 0, .5); }
#lancio p { margin: 0; font-size: 18px; }
#fine-posto { margin: 0; font-size: 20px; }
#fine-numeri { display: flex; gap: 22px; font-size: 13px; }
#fine-numeri b { display: block; font-size: 30px; color: var(--giallo); }
#fine.vittoria h2 { color: var(--giallo); font-size: clamp(34px, 8vw, 64px); text-shadow: 0 4px 0 #7a5200; }
#righe { width: min(520px, 94vw); max-height: 60vh; overflow: auto; touch-action: pan-y; background: var(--carta); border-radius: 16px; text-align: left; }
.riga { display: grid; grid-template-columns: 34px minmax(0, 1fr) 62px 62px 46px; gap: 6px; align-items: center; padding: 9px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-variant-numeric: tabular-nums; }
.riga.testa { font-size: 11px; opacity: .65; text-transform: uppercase; position: sticky; top: 0; background: #14233a; }
.riga.io { background: rgba(255, 201, 60, .16); }
.riga span:nth-child(n+3) { text-align: right; }
.riga span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* nomi lunghi (fino a 16 lettere): coi puntini, senza spingere fuori le colonne */
.riga.vuota span { grid-column: 1 / -1; text-align: center; opacity: .75; } /* classifica ancora vuota: il messaggio su tutta la riga */
#errore { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--rosso); padding: 10px 16px; border-radius: 12px; z-index: 9; max-width: 90vw; }

/* ---- durante la partita ---- */
#hud { position: fixed; inset: 0; pointer-events: none; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
#hud button { pointer-events: auto; }
#hud::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 110px 30px rgba(255, 0, 40, .6); opacity: 0; transition: opacity .25s; }
#hud.colpito::after { opacity: 1; transition: none; }
#etichette { position: absolute; inset: 0; overflow: hidden; }
.etichetta { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); text-align: center; font-size: 12px; font-weight: 800; white-space: nowrap; text-shadow: 0 1px 2px #000, 0 0 4px #000; will-change: transform; }
.etichetta i { display: block; width: 46px; height: 5px; margin: 2px auto 0; border-radius: 3px; background: rgba(0, 0, 0, .55); overflow: hidden; }
.etichetta i u { display: block; height: 100%; background: var(--rosso); }
.numero { position: absolute; left: 0; top: 0; font-size: 18px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #000; animation: su .7s ease-out forwards; }
.numero.scudo { color: var(--azzurro); } .numero.mio { color: var(--rosso); }
@keyframes su { from { opacity: 1; margin-top: 0; } to { opacity: 0; margin-top: -46px; } }
#in-alto { position: absolute; left: 0; right: 0; top: 0; padding: inherit; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
#uccisi { flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; font-size: 12px; padding-left: 40px; }
#uccisi div { background: var(--carta); border-radius: 8px; padding: 3px 8px; animation: sparisce 5s forwards; }
#uccisi div b { color: var(--giallo); } #uccisi div.io { outline: 2px solid var(--giallo); }
@keyframes sparisce { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
#avviso { flex: 1; text-align: center; font-size: 15px; font-weight: 800; text-shadow: 0 2px 3px #000; min-height: 22px; }
#avviso.allarme { color: var(--rosso); animation: batte .8s infinite; }
@keyframes batte { 50% { opacity: .45; } }
#destra { flex: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
#minimappa { width: clamp(96px, 20vh, 168px); height: clamp(96px, 20vh, 168px); border-radius: 50%; background: rgba(8, 16, 30, .6); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
#conta { display: flex; gap: 6px; font-size: 12px; }
#conta span { background: var(--carta); border-radius: 8px; padding: 3px 8px; } #conta b { color: var(--giallo); font-size: 15px; }
#zona { font-size: 12px; background: var(--carta); border-radius: 8px; padding: 3px 8px; }
#centro { position: absolute; left: 0; right: 0; top: 26%; text-align: center; font-size: clamp(22px, 5vw, 40px); font-weight: 900; text-shadow: 0 3px 0 rgba(0, 0, 0, .5); opacity: 0; transition: opacity .3s; }
#centro.su { opacity: 1; }
#osservo { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); background: var(--carta); border-radius: 10px; padding: 6px 12px; }
#raccogli { position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%); background: var(--carta); border-radius: 10px; padding: 6px 12px; font-size: 13px; }
#raccogli kbd { background: #fff; color: #111; border-radius: 4px; padding: 0 6px; margin-right: 6px; }
#in-basso { position: absolute; left: 0; right: 0; bottom: 0; padding: inherit; display: flex; flex-direction: column; align-items: center; gap: 6px; }
#salute { width: min(300px, 46vw); display: flex; flex-direction: column; gap: 3px; }
.barra { position: relative; height: 16px; border-radius: 8px; background: rgba(0, 0, 0, .55); overflow: hidden; }
.barra i { position: absolute; inset: 0; right: auto; width: 0; border-radius: 8px; transition: width .15s; }
.barra span { position: absolute; inset: 0; font-size: 11px; line-height: 16px; text-align: center; text-shadow: 0 1px 1px #000; }
.barra.scudo { height: 10px; } .barra.scudo i { background: var(--azzurro); } .barra.scudo span { display: none; }
.barra.vita i { background: var(--verde); } .barra.vita.bassa i { background: var(--rosso); }
.barra.xp { flex: 1; height: 10px; } .barra.xp i { background: var(--giallo); }
#armi { display: flex; gap: 8px; }
.arma { position: relative; width: 156px; height: 54px; border-radius: 12px; background: var(--carta) no-repeat; background-size: 100% 100%, 84px auto; background-position: 0 0, right -2px center; background-blend-mode: normal, normal; border: 2px solid rgba(255, 255, 255, .15); padding: 4px 8px; text-align: left; overflow: hidden; }
.arma.scelta { border-color: #fff; transform: translateY(-3px); }
.arma b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arma span { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
.arma span small { font-size: 11px; opacity: .7; margin-left: 4px; }
.arma i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--giallo); width: 0; }
.arma.vuota { opacity: .45; }
#munizioni { display: flex; gap: 6px; font-size: 11px; font-variant-numeric: tabular-nums; }
#munizioni span { background: var(--carta); border-radius: 6px; padding: 2px 6px; border-left: 4px solid; }
#esci-partita { position: absolute; left: max(10px, env(safe-area-inset-left)); top: max(8px, env(safe-area-inset-top)); width: 30px; height: 30px; border-radius: 50%; background: var(--carta); font-size: 14px; }
/* comandi a tocco */
#tocco { position: absolute; inset: 0; }
.leva { position: absolute; bottom: max(26px, env(safe-area-inset-bottom)); width: 124px; height: 124px; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .28); }
.leva i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
#leva-muovi { left: max(26px, env(safe-area-inset-left)); } #leva-mira { right: max(26px, env(safe-area-inset-right)); }
#leva-mira i { background: rgba(255, 77, 90, .75); }
#tocco button { position: absolute; right: max(26px, env(safe-area-inset-right)); width: 68px; height: 40px; border-radius: 12px; background: var(--carta); border: 2px solid rgba(255, 255, 255, .25); font-size: 12px; }
#t-ricarica { bottom: 168px; } #t-cambia { bottom: 216px; } #t-raccogli { bottom: 264px; background: var(--giallo) !important; color: #2a1c00; }
@media (pointer: coarse) { #in-basso { transform: scale(.86); transform-origin: bottom center; } #raccogli { display: none; } }
@media (max-height: 420px) { #minimappa { width: 92px; height: 92px; } .leva { width: 104px; height: 104px; } }

/* ---- telefono in verticale: stessa partita, comandi più in alto per lasciare posto a salute e armi ---- */
@media (orientation: portrait) {
  #modo-stato { top: max(172px, calc(env(safe-area-inset-top) + 164px)); max-width: 94vw; white-space: normal; flex-wrap: wrap; justify-content: center; text-align: center; font-size: 13px; padding: 5px 10px; }
  #osservo { top: 24%; } #centro { top: 30%; }
  #minimappa { width: 104px; height: 104px; }
  #uccisi { font-size: 11px; max-width: 56vw; } #uccisi div { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .leva { bottom: max(150px, calc(env(safe-area-inset-bottom) + 140px)); width: 112px; height: 112px; }
  #t-ricarica { bottom: 280px; } #t-cambia { bottom: 328px; } #t-raccogli { bottom: 376px; }
  .arma { width: 44vw; max-width: 170px; }
  #salute { width: min(300px, 80vw); }
  #carta { width: min(92vw, 60vh); height: min(92vw, 60vh); }
  #griglia { grid-auto-columns: min(72vw, 250px); }
  #conto span small { display: none; }
  #fine-numeri { gap: 16px; }
  /* l'armadio in verticale: le scelte in basso, così il personaggio che si prova resta visibile sopra */
  #armadio { align-items: center; justify-content: flex-end; padding: 16px 16px max(3vh, env(safe-area-inset-bottom)); gap: 8px; background: linear-gradient(0deg, rgba(8, 16, 30, .88), rgba(8, 16, 30, .3) 55%, transparent 75%); }
  #armadio h2 { margin: 0; } #scelte { gap: 6px; }
}

/* ---- telefono in orizzontale (poco alto): tutto più compatto, i bottoni accanto alla leva destra ---- */
@media (max-height: 480px) {
  .schermo { gap: 7px; } h2 { font-size: 24px; }
  .marchio { font-size: 34px; margin: 0; } #profilo { padding: 8px 12px; } #nome-riga { font-size: 17px; } #livello { margin: 4px 0; } #numeri b { font-size: 16px; }
  .grosso { padding: 9px 20px; font-size: 19px; border-radius: 13px; } .secondo { padding: 7px 14px; }
  #tocco button { right: max(164px, calc(env(safe-area-inset-right) + 150px)); } #t-ricarica { bottom: 22px; } #t-cambia { bottom: 68px; } #t-raccogli { bottom: 114px; }
  #conto span small { display: none; } #conto-tondo { width: 28px; height: 28px; }
  /* in orizzontale il profilo va nell'angolo in alto a destra: al centro copriva il marchio, i titoli e l'armadio */
  #conto { left: auto; right: max(10px, env(safe-area-inset-right)); transform: none; width: min(250px, 30vw); padding: 4px 6px 4px 4px; gap: 8px; }
  #conto #accedi { padding: 6px 12px; }
  #armadio { gap: 5px; padding-top: 6px; padding-bottom: 6px; } #armadio h2 { margin: 0; } #scelte { gap: 5px; } .scelta { padding: 3px 5px; } #armadio-nota { margin: 0; font-size: 12px; }
  #griglia .gioco { min-height: 0; padding: 8px 12px; } .gioco i { font-size: 22px; } .gioco span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #gruppo-codice { font-size: 36px; } #membri div { padding: 5px 12px; }
  #carta { width: min(56vh, 92vw); height: min(56vh, 92vw); }
}

/* ---- barre di scorrimento: solo il cursore, giallo come "Town"; niente frecce né binario ---- */
::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-thumb { background: var(--giallo); border-radius: 8px; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--giallo) transparent; } }

/* =================================================================================================================
   HOME (solo ingresso), LOBBY, STANZA, BATTLE PASS
   ================================================================================================================= */
#menu { align-items: center !important; justify-content: center !important; padding-left: 16px !important; background: radial-gradient(ellipse at 50% 60%, rgba(8, 16, 30, .25), rgba(8, 16, 30, .82)) !important; }
#menu > * { width: auto !important; }
.marchio.grande { font-size: clamp(54px, 12vw, 120px); text-align: center; }
.motto { margin: -4px 0 18px; opacity: .85; font-weight: 700; letter-spacing: .04em; text-shadow: 0 2px 4px #000; }
.ingresso { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.ingresso .grosso { min-width: 220px; font-size: 26px; padding: 18px 30px; }
.grosso.viola { background: #7b5cff; color: #fff; box-shadow: 0 6px 0 #4b33b5, 0 10px 24px rgba(0, 0, 0, .35); }
.grosso.oro { background: linear-gradient(180deg, #ffe08a, #ffb627); }
.mini { padding: 3px 9px; border-radius: 8px; background: rgba(255, 255, 255, .14); font-size: 12px; text-decoration: none; color: #fff; }
.mini.oro { background: var(--giallo); color: #2a1c00; font-weight: 800; }
.tondo { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .12); font-size: 20px; flex: none; }
.tondo:hover { background: rgba(255, 255, 255, .22); }

/* ---- la moneta del gioco: un disco d'oro con la B ---- */
.moneta-ico { display: inline-block; width: 1.15em; height: 1.15em; border-radius: 50%; vertical-align: -0.2em; margin-right: .3em; flex: none; position: relative;
  background: radial-gradient(circle at 35% 30%, #fff6c2 0 12%, #ffd24a 30%, #f0a400 70%, #b87400); box-shadow: inset 0 0 0 .09em #a86a00, inset 0 0 0 .2em #ffd96b, 0 .06em .12em rgba(0, 0, 0, .45); }
.moneta-ico::after { content: "B"; position: absolute; inset: 0; display: grid; place-items: center; font-size: .62em; font-weight: 900; color: #8a5600; font-style: normal; }
.figura { display: block; width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }

/* ---- battle pass ---- */
#pass { position: fixed; inset: 0; z-index: 3; display: flex; flex-direction: column; gap: 14px; overflow: hidden;
  padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: radial-gradient(ellipse at 20% -10%, #ff8a1f55, transparent 45%), radial-gradient(ellipse at 90% 110%, #7b5cff66, transparent 50%), linear-gradient(160deg, #241452, #0b1224 70%); }
#pass::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(-35deg, rgba(255, 255, 255, .03) 0 3px, transparent 3px 26px); }
.pass-alto { display: flex; align-items: center; gap: 18px; z-index: 1; }
.pass-stagione { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pass-stagione small { font-size: 11px; letter-spacing: .3em; color: var(--giallo); font-weight: 900; }
.pass-stagione h2 { font-size: clamp(24px, 3.6vw, 40px); line-height: 1.05; margin: 2px 0; background: linear-gradient(180deg, #fff, #ffd98a); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .4)); }
.pass-stagione span { font-size: 13px; opacity: .75; }
.pass-livello { display: flex; align-items: center; gap: 12px; background: rgba(0, 0, 0, .35); border-radius: 18px; padding: 8px 14px 8px 8px; box-shadow: inset 0 0 0 2px rgba(255, 201, 60, .35); }
.pass-livello > b { width: 58px; height: 58px; display: grid; place-items: center; font-size: 28px; font-weight: 900; color: #2a1c00; background: linear-gradient(160deg, #ffe08a, #ff9f1c);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.pass-livello small { font-size: 12px; opacity: .85; font-weight: 700; }
.barra-pass { width: min(240px, 22vw); height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .12); margin-top: 5px; overflow: hidden; }
.barra-pass i { display: block; height: 100%; background: linear-gradient(90deg, #ffc93c, #ff7b1f); box-shadow: 0 0 10px #ffb02e; }
.pass-oro-box { display: flex; align-items: center; gap: 10px; }
.saldo { background: rgba(0, 0, 0, .4); border-radius: 999px; padding: 8px 14px; font-size: 18px; display: flex; align-items: center; } .saldo b { color: var(--giallo); }
#compra-oro { font-size: 16px; padding: 12px 18px; display: flex; align-items: center; gap: 2px; white-space: nowrap; }
#compra-oro:disabled { filter: none; opacity: 1; background: linear-gradient(180deg, #5be37d, #2e9e4f); color: #fff; box-shadow: 0 6px 0 #1f6e36; }
#pass-corsia { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; z-index: 1; }
.pass-etichette { display: grid; grid-template-rows: 186px 46px 186px; gap: 0; margin-right: 10px; flex: none; }
.pass-etichette span { writing-mode: vertical-rl; transform: rotate(180deg); display: grid; place-items: center; font-weight: 900; letter-spacing: .25em; font-size: 13px; border-radius: 12px; }
.et-gratis { background: rgba(73, 182, 255, .18); color: #9fd7ff; } .et-oro { background: linear-gradient(180deg, rgba(255, 201, 60, .35), rgba(255, 138, 31, .2)); color: var(--giallo); }
#pass-binari { flex: 1; display: flex; overflow-x: auto; scroll-behavior: smooth; touch-action: pan-x; padding: 4px 2px 10px; scrollbar-width: none; } #pass-binari::-webkit-scrollbar { height: 0; }
.freccia { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 64px; border-radius: 14px; background: rgba(0, 0, 0, .55); font-size: 30px; font-weight: 900; }
#pass-sx { left: 40px; } #pass-dx { right: 0; }
.colonna { flex: none; display: grid; grid-template-rows: 186px 46px 186px; width: 150px; }
.premio { position: relative; margin: 0 6px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px 12px; overflow: hidden;
  background: linear-gradient(170deg, var(--c1), var(--c2)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14), 0 8px 18px rgba(0, 0, 0, .35); text-align: center; }
.premio::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .28), transparent 55%); pointer-events: none; }
.premio.r-monete { --c1: #2c6fb8; --c2: #173a66; } .premio.r-gadget { --c1: #8a4fe0; --c2: #3c1f73; } .premio.r-aspetto { --c1: #ff9f1c; --c2: #a2370f; }
.premio .figura { width: 86px; height: 86px; } .premio b { font-size: 13px; line-height: 1.15; } .premio .tipo { font-size: 9px; letter-spacing: .18em; opacity: .75; font-weight: 900; }
.pila { font-size: 34px; display: flex; } .pila .moneta-ico { margin-right: -.55em; } .pila .moneta-ico:last-child { margin-right: 0; }
.premio.lontano { filter: saturate(.55) brightness(.75); } .premio.chiuso::after { content: "🔒"; position: absolute; top: 8px; right: 10px; font-size: 16px; }
.premio.preso { filter: saturate(.3) brightness(.65); } .premio.preso .stato { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; color: var(--verde); text-shadow: 0 3px 0 #000; }
.premio.pronto { box-shadow: inset 0 0 0 3px var(--giallo), 0 0 22px rgba(255, 201, 60, .65); animation: pulsa 1.3s ease-in-out infinite; cursor: pointer; }
.premio.pronto .stato { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); background: var(--giallo); color: #2a1c00; border-radius: 10px; padding: 3px 10px; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.premio.pronto .figura, .premio.pronto .pila { margin-bottom: 18px; }
@keyframes pulsa { 50% { transform: translateY(-4px) scale(1.02); } }
.nodo { position: relative; display: grid; place-items: center; }
.nodo::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 8px; margin-top: -4px; background: rgba(255, 255, 255, .12); }
.nodo.pieno::before { background: linear-gradient(90deg, #ffc93c, #ff8a1f); box-shadow: 0 0 10px rgba(255, 176, 46, .6); }
.nodo b { position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 900; background: #1d2740; box-shadow: 0 0 0 3px rgba(255, 255, 255, .2); }
.nodo.pieno b { background: var(--giallo); color: #2a1c00; box-shadow: 0 0 0 3px #fff3c4; } .nodo.qui b { transform: scale(1.25); box-shadow: 0 0 0 4px #fff, 0 0 16px #ffc93c; }
#pass-testo { margin: 0; text-align: center; font-size: 13px; opacity: .8; z-index: 1; }
@media (max-width: 820px) { .pass-alto { flex-wrap: wrap; gap: 10px; } .pass-oro-box { width: 100%; justify-content: space-between; } .freccia { display: none; } .colonna { width: 128px; } }
@media (max-height: 640px) { .colonna, .pass-etichette { grid-template-rows: 150px 40px 150px; } .premio .figura { width: 62px; height: 62px; } }

/* le figurine renderizzate hanno margine attorno: un po' più grandi, si leggono meglio */
.premio .figura { width: 112px; height: 112px; margin: -10px 0 -8px; }
.premio.pronto .figura { margin-bottom: 10px; }

/* ---- lobby (Fun Run / Call of Duty): il personaggio al centro, i box negli angoli ---- */
#lobby, #pre { --m: max(14px, env(safe-area-inset-left)); --mt: max(12px, env(safe-area-inset-top)); --mb: max(12px, env(safe-area-inset-bottom)); --mr: max(14px, env(safe-area-inset-right));
  position: fixed; inset: 0; pointer-events: none; z-index: 1; }
#lobby > *, #pre > * { pointer-events: auto; position: absolute; }
#lobby::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 30% 46% at 50% 54%, transparent 45%, rgba(6, 12, 24, .45) 100%), linear-gradient(180deg, rgba(6, 12, 24, .45), transparent 22%, transparent 70%, rgba(6, 12, 24, .55)); }
.tile { background: rgba(10, 18, 32, .82); backdrop-filter: blur(6px); border-radius: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, .38), inset 0 0 0 2px rgba(255, 255, 255, .07); text-align: left; }
button.tile { transition: transform .12s, box-shadow .12s; } button.tile:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 201, 60, .55); }
.pillola { display: inline-flex; align-items: center; gap: 2px; background: rgba(10, 18, 32, .82); backdrop-filter: blur(6px); border-radius: 999px; padding: 8px 14px; font-size: 16px; white-space: nowrap; box-shadow: inset 0 0 0 2px rgba(255, 201, 60, .35); }
.pillola b { color: var(--giallo); } .pillola small { opacity: .6; }
.l-profilo { top: var(--mt); left: var(--m); display: flex; align-items: center; gap: 8px; }
.chi { display: flex; align-items: center; gap: 10px; width: min(330px, 40vw); padding: 7px 14px 7px 7px; border-radius: 18px; background: rgba(10, 18, 32, .82); backdrop-filter: blur(6px); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); text-align: left; }
.chi:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 201, 60, .5); }
#l-avatar { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 22px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .6); flex: none; }
.chi-testo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.chi .riga1 { display: flex; align-items: center; gap: 8px; font-size: 17px; } .chi .riga1 b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#l-youppy { font-style: normal; font-size: 10px; font-weight: 900; color: var(--verde); background: rgba(91, 227, 125, .14); border-radius: 6px; padding: 1px 6px; }
.chi .livello { display: flex; align-items: center; gap: 8px; } #liv { background: var(--giallo); color: #2a1c00; border-radius: 7px; padding: 0 7px; font-size: 13px; font-weight: 900; flex: none; }
.chi .barra.xp { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .14); overflow: hidden; display: block; } .chi .barra.xp i { display: block; height: 100%; background: var(--giallo); }
.l-valute { top: var(--mt); right: var(--mr); display: flex; align-items: center; gap: 8px; }
.tondo { width: 46px; height: 46px; border-radius: 50%; background: rgba(10, 18, 32, .82); backdrop-filter: blur(6px); font-size: 21px; flex: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.tondo:hover { background: rgba(40, 54, 80, .95); }
.l-sinistra { left: var(--m); top: calc(var(--mt) + 76px); width: 300px; display: flex; flex-direction: column; gap: 12px; }
.tile-armadio { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 6px; min-height: 112px; background: linear-gradient(135deg, rgba(255, 159, 28, .55), rgba(10, 18, 32, .85) 70%); }
.tile-armadio .figura { width: 96px; height: 96px; flex: none; margin: -6px -4px -6px 0; }
.tile-armadio span { display: flex; flex-direction: column; min-width: 0; } .tile-armadio small { font-size: 10px; letter-spacing: .16em; font-weight: 900; opacity: .8; }
.tile-armadio b { font-size: 20px; line-height: 1.1; } .tile-armadio span i { font-style: normal; font-size: 12px; opacity: .85; margin-top: 4px; }
#novita { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
#novita header { display: flex; align-items: center; justify-content: space-between; } #novita header small { font-size: 10px; letter-spacing: .16em; font-weight: 900; opacity: .8; padding-left: 4px; }
#novita-carte { display: grid; } #novita-carte > .promo { grid-area: 1 / 1; width: auto; min-height: 118px; opacity: 0; visibility: hidden; transition: opacity .35s; }
#novita-carte > .promo.attiva { opacity: 1; visibility: visible; }
#novita-punti { display: flex; justify-content: center; gap: 6px; } #novita-punti button { width: 8px; height: 8px; padding: 0; border-radius: 4px; background: rgba(255, 255, 255, .3); transition: width .2s; }
#novita-punti button.su { width: 22px; background: var(--giallo); }
#lobby #pass-striscia { left: var(--m); bottom: var(--mb); width: 300px; }
#chat-lobby { left: calc(var(--m) + 314px); bottom: var(--mb); width: min(400px, calc(100vw - 760px)); height: 190px; }
.l-destra { right: var(--mr); bottom: var(--mb); width: min(380px, 30vw); display: flex; flex-direction: column; gap: 12px; }
.box-modo { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 20px; border-radius: 22px; text-align: left; overflow: hidden; transition: transform .12s, filter .12s; }
.box-modo:hover { transform: translateY(-3px); filter: brightness(1.07); } .box-modo:active { transform: translateY(2px); }
.box-modo::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .07) 0 3px, transparent 3px 18px); }
.box-modo small { font-size: 12px; letter-spacing: .18em; font-weight: 900; opacity: .8; } .box-modo b { font-size: clamp(30px, 3.2vw, 46px); line-height: 1; font-weight: 900; letter-spacing: .02em; }
.box-modo span { font-size: 13px; font-weight: 700; opacity: .9; }
.box-modo.singolo { min-height: 150px; justify-content: flex-end; background: linear-gradient(160deg, #ffe08a, #ffb627 55%, #ff8a1f); color: #2a1c00; box-shadow: 0 7px 0 #b5770c, 0 14px 30px rgba(0, 0, 0, .4); }
.box-modo.stanza { min-height: 112px; justify-content: flex-end; background: linear-gradient(160deg, #a08bff, #7b5cff 55%, #5a3de0); color: #fff; box-shadow: 0 7px 0 #3b2596, 0 14px 30px rgba(0, 0, 0, .4); }
.box-modo.stanza b { font-size: clamp(24px, 2.4vw, 34px); }
.tile-stanze { padding: 11px 14px; border-radius: 14px; background: rgba(10, 18, 32, .82); backdrop-filter: blur(6px); font-weight: 800; text-align: left; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.tile-stanze:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 201, 60, .5); }
#n-stanze:not(:empty) { background: var(--rosso); color: #fff; border-radius: 8px; padding: 0 7px; margin-left: 6px; font-size: 12px; }
#pass-striscia { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; gap: 6px 10px; text-align: left; padding: 10px 14px; border-radius: 18px;
  background: linear-gradient(135deg, #3b2a7a, #14233a); box-shadow: 0 6px 20px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 201, 60, .35); }
.pass-testa { display: flex; flex-direction: column; min-width: 0; } .pass-testa small { font-size: 10px; letter-spacing: .14em; color: var(--giallo); font-weight: 900; } .pass-testa span { font-size: 11px; opacity: .75; }
.pass-testa b { font-size: 14px; }
.pass-barra { grid-column: 1 / -1; height: 9px; border-radius: 5px; background: rgba(0, 0, 0, .4); overflow: hidden; } .pass-barra i { display: block; height: 100%; background: linear-gradient(90deg, #ffc93c, #ff8a1f); }
.pass-prossimi { grid-column: 1 / -1; display: flex; gap: 5px; } .pass-prossimi span { display: flex; align-items: center; gap: 3px; background: rgba(0, 0, 0, .3); border-radius: 8px; padding: 2px 6px; font-size: 12px; }
.pass-prossimi small { opacity: .6; } .pass-prossimi .figura { width: 22px; height: 22px; filter: none; } .pass-prossimi .moneta-ico { margin-right: .2em; }
#pass-striscia > u { grid-column: 2; grid-row: 1; align-self: start; text-decoration: none; background: rgba(255, 255, 255, .15); border-radius: 10px; padding: 4px 10px; font-size: 12px; }
#pass-striscia > u.riscuoti { background: var(--giallo); color: #2a1c00; font-weight: 900; animation: batte 1.2s infinite; }
/* le carte delle novità e del negozio */
.promo { position: relative; flex: none; width: 210px; min-height: 108px; padding: 10px 12px; border-radius: 16px; text-align: left; overflow: hidden; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(135deg, var(--tinta, #7b5cff), rgba(10, 18, 32, .9) 85%); box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.promo.evento { --tinta: #b5121b; } .promo.mappe { --tinta: #2a9d8f; }
.promo small { font-size: 10px; font-weight: 900; letter-spacing: .12em; background: rgba(0, 0, 0, .35); align-self: flex-start; padding: 2px 7px; border-radius: 6px; }
.promo b { font-size: 17px; } .promo span { font-size: 12px; opacity: .9; font-weight: 500; padding-right: 40px; }
.promo .grande { position: absolute; right: 10px; bottom: 6px; font-size: 46px; font-style: normal; opacity: .95; }
.promo .contenuto { display: flex; gap: 2px; margin-top: auto; } .promo .contenuto .figura { width: 44px; height: 44px; margin: -4px -4px 0; }
.promo u { position: absolute; right: 10px; bottom: 10px; text-decoration: none; background: var(--giallo); color: #2a1c00; border-radius: 10px; padding: 3px 9px; font-weight: 900; }
.promo u .moneta-ico { margin-right: .2em; } .promo.presa { filter: saturate(.4); } .promo.presa u { background: rgba(255, 255, 255, .25); color: #fff; }
.griglia-promo { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; } .griglia-promo .promo { width: auto; min-height: 140px; }

/* ---- chat ---- */
.chat { display: flex; flex-direction: column; background: rgba(6, 12, 24, .72); backdrop-filter: blur(6px); border-radius: 16px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); min-height: 0; }
.chat header small { font-size: 10px; letter-spacing: .16em; font-weight: 900; opacity: .75; }
.chat nav { display: flex; gap: 4px; } .chat nav button { padding: 3px 10px; border-radius: 8px; background: rgba(255, 255, 255, .08); font-size: 12px; } .chat nav button.scelta { background: var(--giallo); color: #2a1c00; }
.msgs { flex: 1; overflow-y: auto; touch-action: pan-y; margin: 6px 0; font-size: 13px; line-height: 1.35; min-height: 0; user-select: text; -webkit-user-select: text; }
.msgs p { margin: 4px 0; font-size: 12px; }
.msg { overflow-wrap: anywhere; } .msg time { font-size: 10px; opacity: .45; margin-right: 5px; font-variant-numeric: tabular-nums; } .msg b { font-weight: 900; text-shadow: 0 1px 2px #000; }
.msg small { font-size: 10px; background: rgba(255, 255, 255, .12); border-radius: 5px; padding: 0 4px; margin: 0 4px; } .msg span { font-weight: 500; }
.scrivi { display: flex; gap: 6px; } .scrivi input { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .15); background: rgba(0, 0, 0, .35); color: #fff; font: inherit; font-weight: 500; user-select: text; -webkit-user-select: text; }
.scrivi input:focus { outline: none; border-color: var(--giallo); } .scrivi button { width: 38px; border-radius: 10px; background: var(--giallo); color: #2a1c00; font-weight: 900; }
body.senza-chat .chat:not(.finestra-chat) { display: none !important; }

/* ---- prepartita (come la lobby di Call of Duty) ---- */
#pre::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5, 10, 20, .82), rgba(5, 10, 20, .2) 30%, transparent 45%, transparent 62%, rgba(5, 10, 20, .3) 75%, rgba(5, 10, 20, .85)),
  linear-gradient(180deg, rgba(5, 10, 20, .7), transparent 18%, transparent 72%, rgba(5, 10, 20, .7)); }
#pre::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .02) 0 2px, transparent 2px 22px); }
.pre-alto { top: var(--mt); left: var(--m); right: var(--mr); display: flex; align-items: center; gap: 12px; z-index: 1; }
.pre-titolo { flex: 1; display: flex; flex-direction: column; min-width: 0; } .pre-titolo small { font-size: 11px; letter-spacing: .2em; font-weight: 900; color: var(--giallo); }
.pre-titolo b { font-size: clamp(20px, 2.4vw, 30px); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 6px #000; }
.codice-box { display: flex; align-items: center; gap: 8px; background: rgba(10, 18, 32, .82); border-radius: 14px; padding: 6px 8px 6px 12px; }
.codice-box small { font-size: 10px; letter-spacing: .18em; opacity: .6; font-weight: 900; } .codice-box b { font-size: 22px; letter-spacing: .2em; color: var(--giallo); user-select: text; -webkit-user-select: text; }
.pre-sinistra { left: var(--m); top: calc(var(--mt) + 70px); width: 290px; display: flex; flex-direction: column; gap: 12px; z-index: 1; }
.box-classifica, .box-stat { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; }
.box-classifica > small, .box-stat > small { font-size: 10px; letter-spacing: .16em; font-weight: 900; opacity: .8; }
.box-classifica .pos { display: flex; align-items: baseline; gap: 8px; } .box-classifica .pos b { font-size: 34px; font-weight: 900; color: var(--giallo); line-height: 1; } .box-classifica .pos span { font-size: 12px; opacity: .8; }
.box-classifica ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.box-classifica li { display: flex; align-items: center; gap: 8px; font-size: 13px; background: rgba(255, 255, 255, .06); border-radius: 8px; padding: 3px 8px; }
.box-classifica li.io { background: rgba(255, 201, 60, .18); } .box-classifica li i { font-style: normal; } .box-classifica li span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .box-classifica li b { font-size: 11px; opacity: .8; }
.box-classifica u, .box-stat u { text-decoration: none; font-size: 12px; color: var(--giallo); font-weight: 800; }
.numeri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .numeri span { display: flex; flex-direction: column; background: rgba(255, 255, 255, .06); border-radius: 10px; padding: 6px 8px; font-size: 10px; opacity: .95; font-weight: 600; }
.numeri b { font-size: 18px; line-height: 1.1; font-weight: 900; } .numeri.grandi { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } .numeri.grandi b { font-size: 24px; color: var(--giallo); } .numeri.grandi span { font-size: 12px; }
.pre-membri { right: var(--mr); top: calc(var(--mt) + 70px); bottom: calc(var(--mb) + 320px); width: 240px; display: flex; flex-direction: column; gap: 6px; z-index: 1; }
.pre-membri > small { font-size: 11px; letter-spacing: .18em; font-weight: 900; opacity: .8; text-align: right; }
#pre-membri { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; touch-action: pan-y; min-height: 0; padding: 2px; }
.membro { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; background: linear-gradient(90deg, rgba(10, 18, 32, .9), rgba(10, 18, 32, .65)); border-right: 4px solid rgba(255, 255, 255, .2);
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%); text-align: left; width: 100%; flex: none; border-radius: 0 10px 10px 0; }
.membro i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 17px; flex: none; margin-left: 8px; }
.membro span { flex: 1; display: flex; flex-direction: column; min-width: 0; } .membro span b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; } .membro small { opacity: .75; font-size: 11px; }
.membro.pronto { border-right-color: var(--verde); } .membro.io { background: linear-gradient(90deg, rgba(255, 201, 60, .35), rgba(10, 18, 32, .7)); }
.membro.vuoto { background: rgba(10, 18, 32, .45); } .membro.vuoto i { background: transparent; border: 2px dashed rgba(255, 255, 255, .45); font-size: 22px; }
.membro.vuoto:hover { background: rgba(123, 92, 255, .45); }
.pre-basso-sx { left: var(--m); bottom: var(--mb); display: flex; align-items: flex-end; gap: 10px; z-index: 1; }
#chat-pre { width: min(380px, 30vw); height: 210px; }
.pre-basso-sx .tile-armadio { flex-direction: column; align-items: flex-start; width: 150px; min-height: 0; height: 210px; padding: 10px 12px; justify-content: flex-end; position: relative; overflow: hidden; }
.pre-basso-sx .tile-armadio .figura { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 120px; height: 120px; margin: 0; }
.pre-basso-sx .tile-armadio b { font-size: 16px; }
.pre-basso-dx { right: var(--mr); bottom: var(--mb); width: min(390px, 34vw); display: flex; flex-direction: column; gap: 8px; z-index: 1; }
.box-scelta { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; background: rgba(10, 18, 32, .85); backdrop-filter: blur(6px); text-align: left; box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .08); }
.box-scelta[data-capo="1"]:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 0 0 2px var(--giallo); } .box-scelta:not([data-capo="1"]) { cursor: default; }
.box-scelta .icona { font-style: normal; font-size: 34px; width: 56px; height: 56px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); border-radius: 12px; flex: none; }
.box-scelta span { flex: 1; display: flex; flex-direction: column; min-width: 0; } .box-scelta small { font-size: 10px; letter-spacing: .18em; font-weight: 900; opacity: .65; }
.box-scelta b { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .box-scelta em { font-style: normal; font-size: 12px; opacity: .8; font-weight: 600; }
.box-scelta u { text-decoration: none; font-size: 11px; font-weight: 900; letter-spacing: .1em; color: var(--giallo); }
#pre-carta { width: 72px; height: 72px; border-radius: 12px; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .2); }
#pre-mappa-testo { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#gruppo-nota { margin: 0 4px; font-size: 12px; opacity: .85; text-align: right; font-weight: 600; text-shadow: 0 1px 3px #000; }
#pre-avvia { font-size: 24px; padding: 16px; letter-spacing: .04em; } #pre-avvia.pronto { background: var(--verde); box-shadow: 0 6px 0 #2e9e4f; }

/* ---- la finestra (armadio, negozio, modalità, mappe, classifica, conquiste, impostazioni) ---- */
#finestra { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(4, 8, 16, .62); backdrop-filter: blur(3px); padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); }
.f-corpo { width: min(880px, 96vw); max-height: min(90vh, 900px); display: flex; flex-direction: column; background: linear-gradient(160deg, #1b2945, #0d1626); border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), inset 0 0 0 2px rgba(255, 255, 255, .08); overflow: hidden; animation: entra .18s ease-out; }
@keyframes entra { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.f-corpo > header { display: flex; align-items: center; gap: 10px; padding: 14px 14px 8px 22px; } .f-corpo h2 { flex: 1; margin: 0; font-size: 24px; }
#f-contenuto { overflow-y: auto; touch-action: pan-y; padding: 4px 22px 22px; min-height: 0; }
#f-contenuto h3 { margin: 18px 0 8px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; opacity: .7; } #f-contenuto h3:first-child { margin-top: 4px; }
/* l'armadio: pannello a sinistra, il personaggio resta visibile */
#finestra.f-armadio { place-items: stretch start; background: linear-gradient(90deg, rgba(4, 8, 16, .7), rgba(4, 8, 16, .2) 50%, transparent 70%); backdrop-filter: none; }
#finestra.f-armadio .f-corpo { width: min(560px, 94vw); max-height: none; animation-name: entraSx; } @keyframes entraSx { from { transform: translateX(-30px); opacity: 0; } }
#armadio-corpo { display: flex; flex-direction: column; gap: 10px; }
#schede { display: flex; gap: 4px; } #schede button { flex: 1; padding: 9px 4px; border-radius: 10px; background: rgba(255, 255, 255, .08); font-size: 13px; } #schede button.scelta { background: var(--giallo); color: #2a1c00; }
#oggetti { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.oggetto { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 2px solid transparent; text-align: center; }
.oggetto:hover { background: rgba(255, 255, 255, .13); } .oggetto.addosso { border-color: var(--giallo); background: rgba(255, 201, 60, .14); }
.oggetto.chiuso { opacity: .55; } .oggetto.chiuso .figura { filter: grayscale(.7) drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }
.oggetto b { font-size: 12px; line-height: 1.15; } .oggetto small { font-size: 10px; opacity: .8; min-height: 12px; }
.oggetto .figura { width: 84px; height: 84px; margin: -6px 0 -4px; } .emoji { font-style: normal; font-size: 34px; line-height: 76px; height: 76px; display: block; }
/* modalità e mappe */
.griglia-modi { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.carta-modo { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 2px solid transparent; text-align: left; }
.carta-modo:hover { background: rgba(255, 255, 255, .12); } .carta-modo.scelta { border-color: var(--giallo); background: rgba(255, 201, 60, .12); }
.carta-modo i { font-style: normal; font-size: 34px; } .carta-modo b { font-size: 18px; } .carta-modo small { font-size: 11px; color: var(--giallo); font-weight: 800; } .carta-modo span { font-size: 12px; opacity: .8; font-weight: 500; }
.carta-modo u { position: absolute; top: 12px; right: 12px; text-decoration: none; background: var(--rosso); border-radius: 8px; padding: 1px 7px; font-size: 11px; font-weight: 900; }
.griglia-mappe { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.carta-mappa { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 2px solid transparent; text-align: left; }
.carta-mappa:hover { background: rgba(255, 255, 255, .12); } .carta-mappa.scelta { border-color: var(--giallo); background: rgba(255, 201, 60, .12); }
.carta-mappa canvas { width: 100%; aspect-ratio: 1; border-radius: 12px; } .carta-mappa b { font-size: 16px; } .carta-mappa span { font-size: 12px; opacity: .8; font-weight: 500; }
/* classifica e conquiste */
.tabella { display: flex; flex-direction: column; gap: 3px; }
.tabella .riga { display: grid; grid-template-columns: 44px 1fr 70px 70px 70px 50px; gap: 6px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); font-size: 14px; }
.tabella .riga span:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; } .tabella .riga span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabella .testa { background: none; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .6; } .tabella .io { background: rgba(255, 201, 60, .2); }
.griglia-conquiste { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.conquista { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.conquista > i { font-style: normal; font-size: 28px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .07); filter: grayscale(1); opacity: .6; flex: none; }
.conquista.fatta { background: linear-gradient(135deg, rgba(255, 201, 60, .2), rgba(255, 255, 255, .04)); } .conquista.fatta > i { filter: none; opacity: 1; background: rgba(255, 201, 60, .25); }
.conquista span { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; } .conquista small { font-size: 11px; opacity: .75; font-weight: 500; }
.conquista .barra { display: block; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; } .conquista .barra i { display: block; height: 100%; background: var(--giallo); }
.conquista u { text-decoration: none; font-size: 12px; font-weight: 900; color: var(--giallo); font-variant-numeric: tabular-nums; }
/* stanze */
#stanze-corpo { display: flex; flex-direction: column; gap: 10px; } #stanze { display: flex; flex-direction: column; gap: 6px; }
.riga-stanza { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); text-align: left; }
.riga-stanza:hover { background: rgba(255, 255, 255, .12); } .riga-stanza i { font-style: normal; font-size: 26px; width: 34px; text-align: center; }
.riga-stanza span { flex: 1; display: flex; flex-direction: column; min-width: 0; } .riga-stanza small { font-size: 12px; opacity: .7; font-weight: 500; }
.riga-stanza u { text-decoration: none; font-variant-numeric: tabular-nums; color: var(--giallo); font-weight: 900; }
.stanze-azioni { display: flex; gap: 8px; } .stanze-azioni #codice { flex: 1; width: auto; text-align: center; font-size: 18px; } .stanze-azioni .grosso { font-size: 17px; padding: 10px 22px; }
/* impostazioni */
.account { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .06); }
.account > i { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 22px; background: #555; box-shadow: 0 0 0 3px rgba(255, 255, 255, .5); }
.account > span { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; } .account small { font-size: 12px; opacity: .8; font-weight: 500; }
.account.si { box-shadow: inset 0 0 0 2px rgba(91, 227, 125, .5); } .account.si small { color: var(--verde); opacity: 1; }
.account a.grosso { text-decoration: none; font-size: 16px; padding: 11px 18px; }
.interruttore { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); text-align: left; margin-bottom: 6px; }
.interruttore:hover { background: rgba(255, 255, 255, .08); } .interruttore span { flex: 1; display: flex; flex-direction: column; } .interruttore small { font-size: 12px; opacity: .7; font-weight: 500; }
.interruttore > i { width: 48px; height: 28px; border-radius: 14px; background: rgba(255, 255, 255, .2); position: relative; flex: none; transition: background .15s; }
.interruttore > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.interruttore.on > i { background: var(--verde); } .interruttore.on > i::after { transform: translateX(20px); }
.cursore { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); margin-bottom: 6px; flex-wrap: wrap; }
.cursore > span { flex: 1; min-width: 150px; } .cursore input[type=range] { flex: 1; min-width: 140px; accent-color: var(--giallo); } .cursore > b { width: 48px; text-align: right; color: var(--giallo); font-variant-numeric: tabular-nums; }
.segmenti { display: flex; gap: 4px; flex-wrap: wrap; } .segmenti button { padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .08); font-size: 13px; } .segmenti button.scelta { background: var(--giallo); color: #2a1c00; }
#errore.ok { background: #1f7a43; }

/* ---- schermi poco alti: box più compatti ---- */
@media (max-height: 760px) and (min-width: 821px) {
  .l-sinistra { width: 270px; } #lobby #pass-striscia { width: 270px; } #chat-lobby { left: calc(var(--m) + 284px); height: 150px; }
  #novita-carte > .promo { min-height: 96px; } .promo span { display: none; } .tile-armadio { min-height: 90px; } .tile-armadio .figura { width: 76px; height: 76px; }
  .box-modo.singolo { min-height: 116px; } .box-modo.stanza { min-height: 90px; }
  .pre-sinistra { width: 260px; } .box-stat .numeri span:nth-child(n+4) { display: none; } #chat-pre { height: 160px; } .pre-basso-sx .tile-armadio { height: 160px; } .pre-basso-sx .tile-armadio .figura { width: 90px; height: 90px; }
  .pre-membri { bottom: calc(var(--mb) + 290px); } #pre-avvia { padding: 12px; font-size: 21px; }
}
@media (max-height: 560px) and (min-width: 821px) {
  #novita, .box-classifica ol, .pass-prossimi { display: none !important; } .box-stat { display: none; } #chat-lobby, #chat-pre { height: 120px; } .pre-basso-sx .tile-armadio { height: 120px; }
  .box-scelta .icona, #pre-carta { width: 44px; height: 44px; font-size: 26px; } .pre-membri { bottom: calc(var(--mb) + 230px); }
}
/* ---- telefono in verticale: tutto in colonna, si scorre (il personaggio si vede in alto) ---- */
@media (max-width: 820px) {
  #lobby, #pre { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; touch-action: pan-y; pointer-events: auto; padding: var(--mt) var(--mr) var(--mb) var(--m); }
  #lobby > *, #pre > * { position: static; width: auto !important; height: auto; }
  .l-profilo { order: 1; } .l-valute { order: 2; justify-content: flex-end; } .l-destra { order: 3; margin-top: 30vh; } .l-sinistra { order: 4; } #lobby #pass-striscia { order: 5; } #chat-lobby { order: 6; height: 220px !important; }
  .chi { width: auto; flex: 1; }
  .pre-alto { order: 1; flex-wrap: wrap; } .pre-basso-dx { order: 2; margin-top: 28vh; } .pre-membri { order: 3; } .pre-sinistra { order: 4; } .pre-basso-sx { order: 5; flex-direction: column; align-items: stretch; }
  #chat-pre { width: auto; height: 220px; } .pre-basso-sx .tile-armadio { width: auto; height: 120px; } #pre-membri { max-height: 260px; }
  #lobby::before, #pre::before { position: fixed; background: linear-gradient(180deg, transparent 20%, rgba(6, 12, 24, .9) 45%); }
  #finestra.f-armadio { place-items: end stretch; background: linear-gradient(0deg, rgba(4, 8, 16, .8), transparent 60%); } #finestra.f-armadio .f-corpo { width: auto; height: 60vh; }
  .tabella .riga { grid-template-columns: 34px 1fr 54px 54px; } .tabella .riga span:nth-child(5), .tabella .riga span:nth-child(6) { display: none; }
}
/* telefono in orizzontale: la chat non si schiaccia, la squadra diventa una fila di tondi sotto la barra in alto */
#chat-lobby { width: clamp(220px, calc(100vw - 760px), 400px); }
@media (max-height: 560px) and (min-width: 821px) {
  .pre-membri { top: calc(var(--mt) + 54px); bottom: auto; width: auto; max-width: 50vw; flex-direction: row; align-items: center; }
  #pre-membri { flex-direction: row; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; }
  #pre-membri .membro { width: auto; clip-path: none; border-radius: 12px; padding: 4px; border-right-width: 3px; } #pre-membri .membro span { display: none; } #pre-membri .membro i { margin: 0; width: 34px; height: 34px; }
  .pre-membri > small { display: none; }
}
/* la chat della lobby: più piccola, compatta */
#chat-lobby { width: clamp(200px, calc(100vw - 780px), 300px); height: 130px; padding: 6px 8px; border-radius: 14px; }
#chat-lobby .msgs { margin: 3px 0; font-size: 12px; } #chat-lobby .scrivi input { padding: 5px 8px; font-size: 13px; } #chat-lobby .scrivi button { width: 32px; }
@media (max-height: 560px) and (min-width: 821px) { #chat-lobby { height: 104px; } }
@media (max-width: 820px) { #chat-lobby { height: 150px !important; } }
/* il profilo largo quanto i box sotto (armadio e novità), la casa alla sua destra */
.l-profilo .chi { width: 300px; }
.icona-home { display: grid; place-items: center; color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .12); }
.icona-home svg { width: 24px; height: 24px; display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.icona-home:hover { color: var(--giallo); }
@media (max-height: 760px) and (min-width: 821px) { .l-profilo .chi { width: 270px; } }
@media (max-width: 820px) { .l-profilo .chi { width: auto; flex: 1; } }

/* la chat della lobby: un box piccolo, titolo attaccato alla riga per scrivere; si apre toccandolo */
#chat-lobby.mini-chat { width: 250px; height: auto !important; padding: 6px 8px; gap: 4px; cursor: pointer; }
.mini-chat header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mini-chat header small { font-size: 10px; letter-spacing: .1em; font-weight: 900; text-transform: uppercase; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-chat header u { text-decoration: none; font-size: 10px; font-weight: 900; color: var(--giallo); flex: none; }
#chat-lobby.mini-chat .msgs { margin: 0; flex: none; max-height: 34px; overflow: hidden; font-size: 11.5px; line-height: 1.45; }
#chat-lobby.mini-chat .msgs:empty { display: none; }
.mini-chat .msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#chat-lobby.mini-chat .scrivi input { padding: 4px 8px; font-size: 12px; } #chat-lobby.mini-chat .scrivi button { width: 28px; font-size: 13px; }
.msg em.bandiera { font-style: normal; font-size: 9px; font-weight: 900; background: rgba(255, 255, 255, .16); border-radius: 4px; padding: 0 3px; margin-right: 4px; vertical-align: 1px; }
/* la prepartita: chat e personaggio più piccoli */
#chat-pre { width: min(300px, 26vw); height: 150px; padding: 6px 8px; }
#chat-pre nav { flex-wrap: nowrap; overflow: hidden; } #chat-pre nav button { font-size: 11px; padding: 2px 8px; white-space: nowrap; }
#chat-pre nav .apri-chat { margin-left: auto; background: none; font-size: 14px; padding: 0 4px; }
#chat-pre .msgs { font-size: 12px; margin: 4px 0; } #chat-pre .scrivi input { padding: 5px 8px; font-size: 12px; } #chat-pre .scrivi button { width: 30px; }
.pre-basso-sx .tile-armadio { width: 118px; height: 150px; padding: 8px 10px; }
.pre-basso-sx .tile-armadio .figura { width: 84px; height: 84px; top: 2px; }
.pre-basso-sx .tile-armadio small { font-size: 9px; } .pre-basso-sx .tile-armadio b { font-size: 14px; } .pre-basso-sx .tile-armadio span i { font-size: 11px; margin-top: 1px; }
@media (max-height: 560px) and (min-width: 821px) { #chat-pre, .pre-basso-sx .tile-armadio { height: 116px; } .pre-basso-sx .tile-armadio .figura { width: 60px; height: 60px; } }
/* la finestra della chat */
.chat-finestra { display: grid; grid-template-columns: 230px 1fr; gap: 16px; }
.chat-finestra aside { display: flex; flex-direction: column; gap: 6px; } .chat-finestra aside p { font-size: 12px; margin: 6px 0 0; }
.canali { display: flex; flex-direction: column; gap: 4px; } .canali button { text-align: left; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 14px; }
.canali button:hover { background: rgba(255, 255, 255, .12); } .canali button.scelta { background: var(--giallo); color: #2a1c00; }
.scelta-luogo { display: flex; flex-direction: column; gap: 3px; font-size: 12px; } .scelta-luogo span { opacity: .75; }
.scelta-luogo select { padding: 8px; border-radius: 10px; background: #0d1626; color: #fff; border: 2px solid rgba(255, 255, 255, .15); font: inherit; font-weight: 600; }
.finestra-chat { height: min(60vh, 560px); background: rgba(0, 0, 0, .28); box-shadow: none; } .finestra-chat .msgs { font-size: 14px; }
@media (max-width: 820px) { .chat-finestra { grid-template-columns: 1fr; } .finestra-chat { height: 45vh; } #chat-pre { width: auto; } }
/* scegli la modalità: due file, si scorre in orizzontale, carte più piccole */
.griglia-modi { grid-template-columns: none; grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: 200px; gap: 8px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; padding: 2px 2px 12px; scroll-snap-type: x proximity; }
.carta-modo { padding: 10px 11px; border-radius: 14px; gap: 2px; scroll-snap-align: start; }
.carta-modo i { font-size: 24px; } .carta-modo b { font-size: 14px; } .carta-modo small { font-size: 10px; }
.carta-modo span { font-size: 11px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.carta-modo u { top: 9px; right: 9px; font-size: 10px; }
#finestra.f-modi .f-corpo { width: min(900px, 96vw); }
/* scegli la mappa: le copertine in due file, si scorre in orizzontale */
.griglia-mappe { grid-template-columns: none; grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: 260px; gap: 10px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; padding: 2px 2px 12px; scroll-snap-type: x proximity; }
.carta-mappa { position: relative; padding: 0; gap: 0; overflow: hidden; border-radius: 14px; scroll-snap-align: start; border: 3px solid transparent; background: #0d1626; }
.carta-mappa img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .25s; }
.carta-mappa:hover img { transform: scale(1.06); }
.carta-mappa .nome { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 22px 12px 9px; background: linear-gradient(0deg, rgba(5, 10, 20, .92), rgba(5, 10, 20, .6) 60%, transparent); }
.carta-mappa .nome b { font-size: 17px; text-transform: uppercase; letter-spacing: .04em; text-shadow: 0 2px 4px #000; } .carta-mappa .nome small { font-size: 11px; opacity: .85; font-weight: 600; }
.carta-mappa.scelta { border-color: var(--giallo); box-shadow: 0 0 18px rgba(255, 201, 60, .45); }
.carta-mappa u { position: absolute; top: 8px; right: 8px; text-decoration: none; background: var(--giallo); color: #2a1c00; font-size: 10px; font-weight: 900; border-radius: 7px; padding: 2px 7px; }
#finestra.f-mappe .f-corpo { width: min(900px, 96vw); }
#pre-carta { object-fit: cover; width: 96px; height: 60px; border-radius: 10px; }
/* AVVIA PARTITA: grande, il bottone principale della prepartita */
#pre-avvia { font-size: 32px; padding: 24px 16px; border-radius: 20px; letter-spacing: .06em; box-shadow: 0 8px 0 #b5770c, 0 16px 34px rgba(0, 0, 0, .45); }
@media (max-height: 760px) and (min-width: 821px) { #pre-avvia { font-size: 27px; padding: 18px 14px; } .pre-membri { bottom: calc(var(--mb) + 310px); } }
@media (max-height: 560px) and (min-width: 821px) { #pre-avvia { font-size: 22px; padding: 12px; } }
/* prepartita: chat compatta (canali, ultimi messaggi, riga per scrivere) e il personaggio alto uguale, in orizzontale */
.pre-basso-sx { align-items: stretch; }
#chat-pre { height: auto !important; gap: 4px; cursor: pointer; padding: 6px 8px; }
#chat-pre .msgs { flex: none; margin: 0; max-height: 34px; overflow: hidden; font-size: 11.5px; line-height: 1.45; } #chat-pre .msgs:empty { display: none; }
#chat-pre .msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pre-basso-sx .tile-armadio { height: auto !important; width: 190px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 6px; padding: 4px 10px 4px 2px; }
.pre-basso-sx .tile-armadio .figura { position: static; transform: none; width: 54px !important; height: 54px !important; margin: -6px -2px; flex: none; }
.pre-basso-sx .tile-armadio span i { margin-top: 0; }
@media (max-width: 820px) { .pre-basso-sx .tile-armadio { width: auto; } }
/* freccia indietro */
.icona-indietro { display: grid; place-items: center; color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .12); }
.icona-indietro svg { width: 24px; height: 24px; display: block; margin-left: -2px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); } .icona-indietro:hover { color: var(--giallo); }
/* amici */
#apri-amici { position: relative; } #n-amici:not(:empty) { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--verde); color: #08210f; font-size: 11px; font-weight: 900; display: grid; place-items: center; padding: 0 4px; }
#n-amici.rosso { background: var(--rosso); color: #fff; }
#pre-amici { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .12); }
.amici-testa { display: flex; align-items: center; justify-content: space-between; } .amici-testa small { font-size: 10px; letter-spacing: .16em; font-weight: 900; opacity: .8; }
#pre-amici p { margin: 2px 0; font-size: 12px; text-shadow: 0 1px 3px #000; }
.amico { display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 10px; background: rgba(10, 18, 32, .78); }
.amico span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .amico span b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .amico span small { font-size: 10.5px; opacity: .75; }
.amico.online span small, .amico.stanza span small { color: var(--verde); opacity: 1; } .amico.partita span small { color: #ffb627; opacity: 1; }
.tondo-amico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 14px; flex: none; }
.amico .mini:disabled { opacity: .45; cursor: default; }
.cerca-amici input { width: 100%; padding: 10px 12px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .15); background: rgba(0, 0, 0, .3); color: #fff; font: inherit; user-select: text; -webkit-user-select: text; }
.cerca-amici input:focus { outline: none; border-color: var(--giallo); }
.lista-amici { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; } .lista-amici .amico { background: rgba(255, 255, 255, .05); padding: 8px 10px; }
.lista-amici .tondo-amico { width: 36px; height: 36px; } .lista-amici p { margin: 2px 0; font-size: 13px; }
/* l'invito di un amico */
#invito { position: fixed; z-index: 7; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  border-radius: 18px; background: linear-gradient(135deg, #3b2a7a, #14233a); box-shadow: 0 12px 40px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(255, 201, 60, .6); width: min(460px, 94vw); animation: entra .2s ease-out; }
#invito-av { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 20px; flex: none; }
#invito span { flex: 1; min-width: 0; display: flex; flex-direction: column; } #invito small { font-size: 12px; opacity: .8; } #invito .grosso { font-size: 17px; padding: 10px 18px; } #invito .tondo { width: 38px; height: 38px; font-size: 16px; }
/* bot sì / no nella stanza */
#pre-bot { margin: 0; padding: 7px 10px; background: rgba(10, 18, 32, .85); border-radius: 14px; } #pre-bot b { font-size: 13px; } #pre-bot small { font-size: 11px; }
#pre-bot:not([data-capo="1"]) { cursor: default; } #pre-bot:not([data-capo="1"]) > i { opacity: .5; }
.pre-membri { bottom: calc(var(--mb) + 400px); }
@media (max-height: 760px) and (min-width: 821px) { .pre-membri { bottom: calc(var(--mb) + 370px); } }
/* i bottoni della vista accanto alla minimappa: ognuno con il suo nome a sinistra, la prima persona con l'occhio */
#viste button { position: relative; }
#viste button::after { content: attr(data-et); position: absolute; right: calc(100% + 6px); top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 10px; font-weight: 800; line-height: 1;
  background: rgba(10, 18, 32, .78); color: #fff; padding: 4px 7px; border-radius: 7px; pointer-events: none; letter-spacing: .02em; }
#vista { border-color: var(--giallo) !important; } #vista svg { width: 24px; height: 24px; display: block; }
#vista::after { background: var(--giallo) !important; color: #2a1c00 !important; }
@media (max-width: 820px), (max-height: 480px) { #viste button::after { font-size: 9px; padding: 3px 5px; } }
/* l'intro in prima persona */
#intro { position: fixed; inset: 0; z-index: 9; background: #000; display: grid; place-items: center; transition: opacity .45s; }
#intro.via { opacity: 0; }
#intro video { width: 100%; height: 100%; object-fit: cover; }
#intro-salta { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); padding: 9px 18px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-weight: 800; font-size: 15px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
#intro-salta:hover { background: rgba(0, 0, 0, .75); }
#intro-elimina { position: absolute; top: 58%; left: 50%; transform: translateX(-50%); font-size: clamp(18px, 2.4vw, 30px); font-weight: 900; color: #ff4d5a; letter-spacing: .12em; text-shadow: 0 2px 0 #000, 0 0 16px rgba(0, 0, 0, .6); animation: entra .25s ease-out; }
#intro-elimina b { color: #fff; letter-spacing: .04em; }
#intro-logo { position: absolute; top: 22%; left: 0; right: 0; margin: 0; text-align: center; text-shadow: 0 6px 0 rgba(0, 0, 0, .45), 0 0 30px rgba(0, 0, 0, .5); animation: entra .5s ease-out; }
/* prepartita: la chat larga la metà, i canali solo col simbolo */
#chat-pre { width: 185px !important; } #chat-pre nav { gap: 3px; } #chat-pre nav button { padding: 2px 7px; }
@media (max-width: 820px) { #chat-pre { width: auto !important; } }
/* il globo della chat, a sinistra della finestra */
#finestra.f-chat .f-corpo { width: min(1000px, 96vw); }
.chat-finestra { grid-template-columns: 340px 1fr; }
.globo-chat { width: 100%; height: 280px; border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 50% 50%, #142347, #0a1226 70%); cursor: grab; display: grid; place-items: center; }
.globo-chat:active { cursor: grabbing; } .globo-chat p { font-size: 12px; }
.globo-tip { background: rgba(10, 18, 32, .92); color: #fff; padding: 4px 9px; border-radius: 8px; font: 700 12px system-ui, sans-serif; box-shadow: inset 0 0 0 1px rgba(255, 201, 60, .5); }
@media (max-width: 820px) { .chat-finestra { grid-template-columns: 1fr; } .globo-chat { height: 230px; } }
.globo-tip small { opacity: .7; font-weight: 600; }

/* =================================================================================================================
   Correzioni di Yannis (29.10, fatte il 02.11.2026): #1–#27 di correzioni-lavoro/BattleTown.md
   ================================================================================================================= */
/* #19 #27: il box del profilo con "Accedi" non c'è più: né sulla home (resta la scritta e GIOCA) né sopra lobby e prepartita */
#conto { display: none !important; }

/* #1 telefono in verticale: profilo largo tutto lo schermo; sotto, sulla stessa riga e alla stessa altezza, casa, monete,
   stelle, amici e impostazioni; GIOCA e CREA STANZA più piccoli; #2 la chat non tocca più il fondo */
@media (max-width: 820px) {
  #lobby { flex-flow: row wrap; align-content: flex-start; padding-bottom: calc(var(--mb) + 34px); }
  #lobby > * { flex: 0 0 100%; min-width: 0; }
  #lobby .l-profilo { display: contents; }
  #lobby .l-profilo .chi { order: 1; flex: 0 0 100%; width: 100%; }
  #lobby #l-home { order: 2; flex: none; width: 42px; height: 42px; }
  #lobby .l-valute { order: 2; flex: 1 1 0; justify-content: flex-start; gap: 6px; }
  #lobby .l-valute .pillola { height: 42px; padding: 0 12px; box-sizing: border-box; font-size: 15px; }
  #lobby .l-valute .tondo { width: 42px; height: 42px; font-size: 18px; }
  #lobby #apri-amici { margin-left: auto; }
  #lobby .l-destra { gap: 10px; }
  #lobby .box-modo { padding: 11px 16px; border-radius: 18px; }
  #lobby .box-modo.singolo { min-height: 86px; } #lobby .box-modo.stanza { min-height: 70px; }
  #lobby .box-modo small { font-size: 10px; } #lobby .box-modo b { font-size: 25px; } #lobby .box-modo.stanza b { font-size: 20px; } #lobby .box-modo span { font-size: 11.5px; }
}
/* #1 si passa da una modalità all'altra con un tocco, sotto GIOCA */
#modi-veloci { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; scrollbar-width: none; padding: 1px; }
#modi-veloci::-webkit-scrollbar { display: none; }
#modi-veloci button { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; background: rgba(10, 18, 32, .85); backdrop-filter: blur(6px);
  font-size: 12px; font-weight: 800; white-space: nowrap; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .09); }
#modi-veloci button i { font-style: normal; font-size: 14px; } #modi-veloci button:hover { box-shadow: inset 0 0 0 2px rgba(255, 201, 60, .6); }
#modi-veloci button.scelta { background: var(--giallo); color: #2a1c00; box-shadow: none; }

/* #3 "Entra in una stanza" fa parte del box viola di CREA STANZA (anche in orizzontale e su PC) */
#crea-gruppo { border-radius: 22px 22px 0 0; box-shadow: none; }
#apri-stanze { margin-top: -12px; border: 3px solid #7b5cff; border-top: 0; border-radius: 0 0 22px 22px; padding: 10px 16px 11px; background: linear-gradient(180deg, #2a1d63, #171034);
  box-shadow: 0 7px 0 #3b2596, 0 14px 30px rgba(0, 0, 0, .4); }
#apri-stanze:hover { box-shadow: 0 7px 0 #3b2596, 0 14px 30px rgba(0, 0, 0, .4), inset 0 0 0 2px rgba(255, 201, 60, .5); }
@media (max-width: 820px) { #lobby #crea-gruppo { border-radius: 18px 18px 0 0; } #lobby #apri-stanze { margin-top: -10px; border-radius: 0 0 18px 18px; } }

/* #4 AVVIA PARTITA rifatto: tondo con il play, titolo e sotto modalità e mappa */
#pre-avvia.avvia { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 18px 12px 12px; border-radius: 20px; text-align: left;
  background: linear-gradient(120deg, #ffe680 0%, #ffc02e 48%, #ff8f1f 100%); color: #2a1c00; letter-spacing: 0; font-size: inherit;
  box-shadow: 0 6px 0 #b5620c, 0 14px 30px rgba(0, 0, 0, .42), inset 0 2px 0 rgba(255, 255, 255, .6); transition: transform .08s, box-shadow .08s, filter .12s; }
#pre-avvia.avvia::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); animation: lampo 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes lampo { 0%, 55% { left: -60%; } 100% { left: 130%; } }
#pre-avvia.avvia:hover { filter: brightness(1.05); } #pre-avvia.avvia:active { transform: translateY(4px); box-shadow: 0 2px 0 #b5620c, 0 8px 18px rgba(0, 0, 0, .4); }
.avvia-play { width: 52px; height: 52px; border-radius: 50%; background: #2a1c00; color: #ffc93c; display: grid; place-items: center; flex: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, .4); }
.avvia-play svg { width: 26px; height: 26px; margin-left: 3px; display: block; }
#pre-avvia.avvia > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#pre-avvia.avvia b { font-size: 24px; font-weight: 900; letter-spacing: .05em; line-height: 1.05; white-space: nowrap; }
#pre-avvia.avvia small { font-size: 12.5px; font-weight: 700; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
#pre-avvia.avvia.pronto { background: linear-gradient(120deg, #9ff0b3, #5be37d 50%, #2fb85a); box-shadow: 0 6px 0 #1f7a3c, 0 14px 30px rgba(0, 0, 0, .42), inset 0 2px 0 rgba(255, 255, 255, .5); }
@media (max-height: 560px) and (min-width: 821px) { #pre-avvia.avvia { padding: 8px 14px 8px 8px; } .avvia-play { width: 40px; height: 40px; } #pre-avvia.avvia b { font-size: 19px; } }

/* #5 #10 Modalità e Mappa: lo stesso riquadro per il disegno, testi allineati, "Cambia" su tutti e due, piccolo e sottile */
.box-scelta { gap: 12px; padding: 8px 14px 8px 8px; }
.box-scelta .icona, #pre-carta { width: 64px; height: 64px; border-radius: 12px; flex: none; box-sizing: border-box; }
.box-scelta .icona { font-size: 36px; } #pre-carta { object-fit: cover; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08); }
.box-scelta u { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .9; flex: none; }
.box-scelta u:empty { display: none; }

/* #6 il + dell'invito centrato */
.membro.vuoto i.piu { display: grid; place-items: center; font-size: 0; color: #fff; }
.membro.vuoto i.piu svg { width: 18px; height: 18px; display: block; }

/* #9 #23 le chat di lobby e prepartita: niente icone né freccia; la riga per scrivere apre la chat */
.scrivi .finto-input { flex: 1; width: auto; min-width: 0; text-align: left; padding: 6px 10px; border-radius: 10px; background: rgba(0, 0, 0, .35); color: rgba(255, 255, 255, .7);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14); font-size: 12px; font-weight: 600; cursor: text; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat:hover .finto-input { box-shadow: inset 0 0 0 2px rgba(255, 201, 60, .7); }
#chat-pre { cursor: pointer; }

/* #12 il codice della stanza: box piccolo, CODICE centrato sopra il codice */
.codice-box { gap: 8px; padding: 4px 6px 4px 12px; border-radius: 12px; }
.codice-testo { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.codice-box .codice-testo small { font-size: 9px; letter-spacing: .22em; margin-right: -.22em; }
.codice-box .codice-testo b, #gruppo-codice { font-size: 18px !important; letter-spacing: .16em; margin-right: -.16em; }
.codice-box .mini { font-size: 11px; padding: 5px 9px; }

/* #11 gli elenchi che scorrono si fermano dove li lasci (niente calamita, niente scorrimento animato) */
#griglia, .griglia-modi, .griglia-mappe { scroll-snap-type: none !important; }
#griglia .gioco, .carta-modo, .carta-mappa { scroll-snap-align: none !important; }
#pass-binari, #f-contenuto, #lobby, #pre { scroll-behavior: auto !important; overscroll-behavior: contain; }

/* #20 #21 #23 #24 #25 #7 interfacce a sé stanti: a tutta pagina, con la freccia per tornare indietro */
#finestra.pagina { padding: 0; place-items: stretch; background: #0b1424; backdrop-filter: none; }
#finestra.pagina .f-corpo, #finestra.pagina.f-armadio .f-corpo { width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; box-shadow: none; animation: none;
  background: radial-gradient(ellipse at 15% -10%, rgba(255, 159, 28, .16), transparent 45%), linear-gradient(170deg, #16233d, #0b1424 60%); }
#finestra.pagina .f-corpo > header { padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left)); gap: 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
#finestra.pagina #f-chiudi { order: -1; }
#finestra.pagina #f-chiudi svg { width: 24px; height: 24px; }
#finestra.pagina #f-contenuto { flex: 1; overflow-x: hidden; padding: 12px max(16px, calc((100% - 860px) / 2)) max(28px, env(safe-area-inset-bottom)); }
@media (max-width: 820px) { #finestra.pagina.f-armadio .f-corpo { width: 100%; height: 100%; } #finestra.f-armadio.pagina { place-items: stretch; background: #0b1424; } }
/* il personaggio: in cima alla pagina si vede com'è adesso */
#armadio-anteprima { display: flex; align-items: center; gap: 14px; padding: 6px 16px 6px 6px; margin-bottom: 12px; border-radius: 18px; background: linear-gradient(135deg, rgba(255, 159, 28, .5), rgba(10, 18, 32, .7) 70%); }
#armadio-anteprima .figura { width: 110px; height: 110px; flex: none; }
#armadio-anteprima span { display: flex; flex-direction: column; } #armadio-anteprima small { font-size: 10px; letter-spacing: .16em; font-weight: 900; opacity: .8; }
#armadio-anteprima b { font-size: 24px; } #armadio-anteprima i { font-style: normal; font-size: 12px; opacity: .8; }
/* #21 la pagina di un'offerta */
.offerta-testa { padding: 18px; border-radius: 18px; background: linear-gradient(135deg, var(--tinta, #7b5cff), rgba(10, 18, 32, .75) 85%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08); }
.offerta-testa .etichetta { display: inline-block; font-size: 11px; font-weight: 900; letter-spacing: .12em; background: rgba(0, 0, 0, .35); border-radius: 8px; padding: 2px 8px; }
#f-contenuto .offerta-testa h3 { margin: 8px 0 4px; font-size: 26px; letter-spacing: 0; text-transform: none; opacity: 1; }
.offerta-testa p { margin: 0; font-size: 14px; opacity: .9; }
.pezzi { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.pezzo { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, .06); text-align: center; }
.pezzo .figura { width: 96px; height: 96px; } .pezzo b { font-size: 14px; } .pezzo small { font-size: 11px; opacity: .7; }
.offerta-paga { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.offerta-paga .saldo { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.offerta-paga .grosso { font-size: 18px; padding: 12px 20px; display: inline-flex; align-items: center; gap: 6px; }
/* #7 #25 inviti e amici: il tuo nome e ID, la riga per nome o ID, i tasti per mandare il link */
.mio-id { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.mio-id span { font-size: 12px; opacity: .7; } .mio-id b { font-size: 17px; } .mio-id em { font-style: normal; font-size: 13px; color: var(--giallo); font-weight: 800; }
.riga-invito { display: flex; gap: 8px; } .riga-invito input { flex: 1; min-width: 0; } .riga-invito .grosso { font-size: 16px; padding: 8px 18px; box-shadow: 0 4px 0 #4b33b5; }
.condividi { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tasto-cond { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; background: rgba(255, 255, 255, .07); color: #fff; font-size: 12px; font-weight: 800; text-decoration: none; }
.tasto-cond:hover { background: rgba(255, 201, 60, .2); } .tasto-cond .ic svg { width: 26px; height: 26px; display: block; }
/* #8 la chat: si scorre solo in verticale */
.chat-finestra { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); } .chat-finestra > * { min-width: 0; }
.scelta-luogo select { width: 100%; min-width: 0; max-width: 100%; }
@media (max-width: 820px) { .chat-finestra { grid-template-columns: minmax(0, 1fr); } }

/* #22 battle pass sul telefono: il titolo intero su una riga sotto "BATTLE PASS", i box sotto allineati e centrati */
@media (max-width: 820px) {
  .pass-alto { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 10px 12px; }
  .pass-stagione h2 { font-size: clamp(15px, 5vw, 26px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pass-livello, .pass-oro-box { grid-column: 1 / -1; width: 100%; max-width: 460px; justify-self: center; box-sizing: border-box; }
  .pass-livello > div { flex: 1; min-width: 0; } .barra-pass { width: 100%; }
  .pass-oro-box { justify-content: space-between; min-width: 0; }
  #compra-oro { font-size: 15px; padding: 10px 14px; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
}

/* #13 HUD: la bussola come nelle mappe Youppy, i nomi delle icone solo passandoci sopra col cursore */
#bussola { background: none !important; border: 0 !important; padding: 0; }
#bussola.attivo { box-shadow: 0 0 0 3px var(--giallo); }
#ago { width: 46px; height: 46px; display: block; }
#ago text { font: 700 15px system-ui, sans-serif; text-anchor: middle; dominant-baseline: middle; }
#viste button::after { opacity: 0; transition: opacity .12s; }
#viste button:hover::after { opacity: 1; }
/* il visore, a destra accanto alle barre di vita e scudo */
#salute-riga { display: flex; align-items: center; gap: 8px; }
#notte { width: 40px; height: 40px; border-radius: 50%; background: var(--carta); border: 2px solid rgba(255, 255, 255, .3); display: grid; place-items: center; color: #fff; flex: none; padding: 0; }
#notte svg { width: 24px; height: 24px; display: block; } #notte.attivo { border-color: var(--verde); color: var(--verde); box-shadow: 0 0 10px rgba(91, 227, 125, .5); }
/* #14 vivi, eliminati e zona: larghi come la minimappa, allineati, subito sotto */
#destra { --mm: clamp(96px, 20vh, 168px); gap: 4px; }
#conta, #zona { width: var(--mm); box-sizing: border-box; }
#conta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; } #conta span { text-align: center; padding: 3px 2px; white-space: nowrap; font-size: 11px; } #conta b { font-size: 13px; }
#zona { text-align: center; font-size: 11px; line-height: 1.25; padding: 3px 4px; }
@media (orientation: portrait) { #destra { --mm: 104px; } }
@media (max-height: 420px) { #destra { --mm: 92px; } }

/* #16 prima persona: sopra le munizioni, larghe tutto lo schermo, vita e scudo; sotto a sinistra i due box delle armi */
#colpi { display: none; }
#hud.prima #in-basso { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "salute salute" "armi colpi"; align-items: end; gap: 10px 14px; }
#hud.prima #salute-riga { grid-area: salute; }
#hud.prima #salute { flex: 1; width: auto; flex-direction: row; gap: 10px; }
#hud.prima #salute .barra { flex: 1; height: 24px; }
#hud.prima .barra.vita span, #hud.prima .barra.scudo span { display: block; font-size: 15px; font-weight: 900; line-height: 24px; text-align: left; padding-left: 10px; transform: skewX(14deg); }
#hud.prima #armi { grid-area: armi; flex-direction: row; align-items: flex-end; justify-self: start; gap: 8px; }
#hud.prima .arma { width: min(150px, 30vw); height: 50px; }
#hud.prima #colpi { grid-area: colpi; display: flex; flex-direction: column; align-items: flex-end; text-shadow: 0 2px 0 rgba(0, 0, 0, .6), 0 0 8px rgba(0, 0, 0, .5); }
#colpi b { font-size: 13px; color: var(--giallo); letter-spacing: .08em; text-transform: uppercase; } #colpi span { font-size: 52px; font-weight: 900; line-height: .95; font-variant-numeric: tabular-nums; }
#colpi small { font-size: 20px; opacity: .8; margin-left: 2px; }
@media (max-width: 820px) { #hud.prima .arma { width: 34vw; } #colpi span { font-size: 42px; } }
/* il secondo puntatore: segue il mouse; il mirino resta al centro */
#puntatore { position: fixed; left: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(0, 0, 0, .4); pointer-events: none; z-index: 4; opacity: .6; }
#puntatore::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #fff; }
#puntatore.tira { opacity: 1; border-color: var(--giallo); } #puntatore.tira::after { background: var(--giallo); }
body.prima-mouse #scena { cursor: none; }

/* #17 avvia subito, sotto la mappa al centro */
#subito { font-size: 18px; padding: 10px 24px; margin: 2px auto 0; }
/* #18 #21 la conferma dentro il gioco (niente finestre del browser) */
#conferma { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(4, 8, 16, .62); backdrop-filter: blur(3px); padding: 16px; }
.c-corpo { width: min(360px, 92vw); padding: 22px 18px 18px; border-radius: 20px; background: linear-gradient(160deg, #1b2945, #0d1626); box-shadow: 0 20px 50px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(255, 255, 255, .08); text-align: center; }
.c-corpo p { margin: 0 0 18px; font-size: 18px; font-weight: 800; }
.c-tasti { display: flex; gap: 10px; } .c-tasti button { flex: 1; font-size: 16px; padding: 12px 10px; }

/* #26 l'animazione della casa: sul telefono in verticale si vede intera, larga quanto lo schermo e al centro */
@media (orientation: portrait) {
  #intro video { object-fit: contain; }
  #intro-logo { top: calc(50% + 30vw); font-size: clamp(42px, 13vw, 64px); }
  #intro-elimina { top: calc(50% + 12vw); font-size: 18px; white-space: nowrap; }
}

/* #12 sul telefono il codice sta in una riga sua, piccolo e al centro: il nome della stanza resta leggibile */
@media (max-width: 820px) {
  .pre-alto .pre-titolo { flex: 1 1 120px; min-width: 120px; } .pre-alto .pre-titolo small, .pre-alto .pre-titolo b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .pre-alto #pre-codice-box { order: 9; margin: 0 auto; }
}
.novita-grande { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 12px; margin: 14px 0; border-radius: 18px; background: rgba(255, 255, 255, .06); }
.novita-grande i { font-style: normal; font-size: 72px; line-height: 1; } .novita-grande b { font-size: 15px; opacity: .85; }
@media (max-height: 560px) and (min-width: 821px) { .box-scelta { padding: 5px 12px 5px 5px; } .box-scelta .icona, #pre-carta { width: 46px; height: 46px; } .box-scelta .icona { font-size: 26px; } .box-scelta b { font-size: 16px; } }
@media (max-width: 820px) { #hud.prima .arma { width: 27vw; padding: 3px 6px; } #hud.prima .arma b { font-size: 10.5px; } #colpi span { font-size: 34px; } #colpi b { font-size: 10.5px; } #colpi small { font-size: 15px; } }
/* #22 battle pass in orizzontale (telefono girato, PC basso): il titolo intero su una riga, i box sulla stessa riga, niente tagliato */
@media (min-width: 821px) and (max-height: 560px) {
  .pass-alto { gap: 12px; } .pass-stagione { flex: 1 1 auto; min-width: 0; }
  .pass-stagione h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(18px, 2.6vw, 28px); }
  .pass-livello { padding: 6px 10px 6px 6px; } .pass-livello > b { width: 44px; height: 44px; font-size: 22px; } .barra-pass { width: 130px; }
  #compra-oro { font-size: 14px; padding: 8px 12px; white-space: nowrap; }
}
@media (min-width: 821px) and (max-height: 480px) {
  #pass { gap: 6px; } .pass-stagione h2 { font-size: 18px; } .pass-stagione span, #pass-xp, #pass-testo { display: none; }
  .barra-pass { width: 90px; margin-top: 0; }
  .colonna, .pass-etichette { grid-template-rows: 118px 34px 118px; } .premio .figura { width: 50px; height: 50px; margin: -4px 0; } .premio.pronto .figura { margin-bottom: 2px; }
}
/* #22 il titolo della stagione sempre su una riga */
.pass-stagione { min-width: 0; } .pass-stagione h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(18px, 2.6vw, 34px); }
/* #17 con "Avvia subito" la carta del lancio è un po' più piccola: Annulla resta dentro lo schermo */
@media (min-width: 821px) and (min-height: 481px) { #carta { width: min(60vh, 92vw); height: min(60vh, 92vw); } }
/* in orizzontale basso la fila della squadra stava sopra "Amici online": gli amici si invitano dal tasto + (pagina Invita) */
@media (max-height: 560px) and (min-width: 821px) { #pre-amici { display: none; } }
@media (min-width: 821px) and (max-height: 480px) { .pass-stagione h2 { font-size: 18px; } }

/* ---- revisione Opus 03.11 ---- */
/* 1 la casa in alto alla stessa altezza delle icone a destra (lobby su PC e in orizzontale) */
@media (min-width: 821px) { .l-profilo { align-items: flex-start; } #l-home { margin-top: 0; } }
/* 2 telefono in orizzontale: Novità e fila delle modalità restano, tutto più compatto */
@media (max-height: 560px) and (min-width: 821px) {
  #lobby #novita { display: flex !important; padding: 6px; gap: 4px; }
  #novita header small { font-size: 9px; } #novita .mini { font-size: 10px; padding: 2px 8px; }
  #novita-carte > .promo { min-height: 62px !important; padding: 6px 10px; } #novita-carte .promo span, #novita-carte .promo .contenuto, #novita-punti { display: none !important; }
  #novita-carte .promo b { font-size: 14px; } #novita-carte .promo i.grande { font-size: 26px; }
  .l-sinistra { gap: 8px; top: calc(var(--mt) + 68px); } .l-sinistra .tile-armadio { min-height: 0; padding: 2px 10px 2px 2px; } .l-sinistra .tile-armadio .figura { width: 54px; height: 54px; margin: -2px; }
  #lobby .box-modo { padding: 9px 14px; } #lobby .box-modo.singolo { min-height: 84px; } #lobby .box-modo.stanza { min-height: 66px; } #lobby .box-modo span { font-size: 11px; }
  #lobby .box-modo b { font-size: 26px; } #lobby .box-modo.stanza b { font-size: 20px; }
  .l-destra { gap: 8px; } #apri-stanze { margin-top: -8px; padding: 7px 14px 8px; }
  #modi-veloci button { padding: 4px 9px; font-size: 11px; }
}
/* 3 Modalità e Mappa: stessa cornice per il disegno, nessun bordo giallo rimasto dopo la scelta */
.box-scelta .icona, #pre-carta { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .1); background-color: rgba(255, 255, 255, .08); }
.box-scelta:focus, .box-scelta:focus-visible { outline: none; }
.box-scelta:not(:hover) { box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .08) !important; }
/* 5 la home: solo la scritta e GIOCA */
#menu .motto { display: none; }
/* 6 pagina Novità compatta e allineata */
.novita-grande { flex-direction: row; justify-content: center; gap: 14px; padding: 14px 16px; margin: 12px 0; text-align: left; }
.novita-grande i { font-size: 52px; } .novita-grande span { display: flex; flex-direction: column; } .novita-grande b { font-size: 17px; opacity: 1; } .novita-grande small { font-size: 13px; opacity: .8; }
.novita-azione { display: flex; justify-content: center; } .novita-azione .grosso { font-size: 18px; padding: 12px 26px; }

/* #28 figurine a mezzo busto: il nome sta sotto, non sopra il busto */
.oggetto .figura { margin: 4px 0 6px; }
