/* KIKKY BROS — porta in home, scelta dei livelli, HUD e comandi touch */
.p-bros { background: linear-gradient(135deg, #ff9a7a, #ff5a5a 55%, #d92a4a); }
.p-bros .porta-ico { transform: rotate(5deg); }
/* 6 porte: tre righe da due sul telefono, due righe da tre sui computer */
.porte .p-garage { grid-column: auto; }
@media (min-width: 760px) { .porte { grid-template-columns: repeat(3, 1fr); max-width: 860px; } }

/* scelta dei livelli */
.br-anteprima { width: min(100%, 560px); height: 150px; display: block; margin: 2px auto 10px; border: var(--bordo); border-radius: 24px; box-shadow: var(--ombra); background: #9be6ff; }
.br-mondi { width: 100%; max-width: 560px; display: grid; gap: 16px; }
.br-mondo h3 { margin: 0 0 8px; color: var(--panna); font-weight: 700; font-size: 1.05rem; text-shadow: 0 2px 0 var(--prugna); }
.br-mondo h3 b { font-family: "Bungee"; font-weight: 400; font-size: 1.15rem; color: var(--tuorlo); margin-right: 6px; }
.br-griglia { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .br-griglia { grid-template-columns: repeat(4, 1fr); } }
.br-liv { aspect-ratio: auto; min-height: 128px; padding: 10px 6px; gap: 4px; }
.br-liv b { font-size: 1.9rem; }
.br-liv small { position: relative; font-weight: 700; font-size: .9rem; line-height: 1.1; text-align: center; color: var(--prugna); background: rgba(255, 246, 232, .82); border-radius: 10px; padding: 2px 8px; text-wrap: balance; }
.br-liv .stelline svg { font-size: 22px; }
.br-liv .stelline svg.vuota, .br-ms svg.vuota { opacity: .32; filter: grayscale(1); }
.br-aiuto { width: 100%; max-width: 560px; margin: 16px 0 6px; padding: 12px 16px; list-style: none; display: grid; gap: 6px; border-radius: 18px; background: rgba(255, 246, 232, .14); color: var(--panna); font-size: .95rem; line-height: 1.35; }
.br-aiuto b { color: var(--tuorlo); }

/* partita */
#tela-bros { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.br-hud { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: calc(10px + var(--sicuro-alto)) 12px 0; pointer-events: none; }
.br-hud > * { pointer-events: auto; }
.br-hud .pausa { margin-left: auto; width: 50px; height: 50px; font-size: 26px; }
.br-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--panna); border: var(--bordo); border-radius: 999px; padding: 4px 12px 4px 6px; font-family: "Bungee"; font-weight: 400; font-size: 1rem; box-shadow: var(--ombra-piccola); font-variant-numeric: tabular-nums; color: var(--prugna); }
.br-chip > svg { font-size: 24px; }
.br-chip b { font-weight: 400; }
.br-ms { gap: 2px; padding: 4px 8px; }
.br-ms svg { font-size: 22px; transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.br-ms svg:not(.vuota) { transform: scale(1.12); }
.br-punti { padding: 4px 12px; }
#br-tempo.poco { background: #ffd1dc; }
#br-tempo.poco b { color: #c8102e; }
@media (max-width: 480px) { .br-punti { display: none; } .br-hud { gap: 5px; padding-left: 8px; padding-right: 8px; } .br-chip { font-size: .85rem; gap: 3px; padding: 3px 8px 3px 4px; } .br-chip > svg { font-size: 20px; } .br-ms svg { font-size: 17px; } .br-ms { padding: 3px 5px; } .br-hud .pausa { width: 44px; height: 44px; font-size: 22px; } }

.br-comandi { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 0 14px calc(14px + var(--sicuro-basso)); pointer-events: none; }
.br-croce { pointer-events: auto; touch-action: none; display: flex; gap: 8px; -webkit-user-select: none; user-select: none; }
.br-croce span, .br-salta, .br-lancia, .br-entra { border: var(--bordo); box-shadow: var(--ombra-piccola); display: grid; place-items: center; touch-action: none; -webkit-user-select: none; user-select: none; transition: transform .08s, background-color .08s; }
.br-croce span { width: clamp(78px, 22vw, 110px); height: clamp(78px, 22vw, 110px); border-radius: 28px; background: rgba(255, 246, 232, .86); font-size: clamp(46px, 13vw, 66px); }
.br-croce span.giu, .br-salta.giu, .br-lancia.giu, .br-entra.giu { transform: translateY(4px) scale(.94); background: var(--tuorlo); }
.br-azioni { position: relative; display: flex; align-items: flex-end; gap: 10px; }
.br-salta, .br-lancia { pointer-events: auto; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; }
.br-salta { width: clamp(96px, 27vw, 130px); height: clamp(96px, 27vw, 130px); background: #8be04e; font-size: clamp(44px, 12vw, 58px); }
.br-lancia { width: clamp(72px, 20vw, 96px); height: clamp(72px, 20vw, 96px); background: var(--mandarino); font-size: clamp(32px, 9vw, 42px); margin-bottom: 8px; }
.br-salta b, .br-lancia b { font-family: "Bungee"; font-weight: 400; font-size: .92rem; color: var(--panna); -webkit-text-stroke: 1px var(--prugna); paint-order: stroke fill; margin-top: -2px; }
.br-lancia b { font-size: .78rem; }
.br-entra { pointer-events: auto; position: absolute; right: 0; bottom: calc(100% + 10px); border-radius: 999px; padding: 8px 16px 8px 10px; display: inline-flex; gap: 6px; align-items: center; background: var(--tuorlo); font-family: "Bungee"; font-weight: 400; font-size: 1rem; color: var(--prugna); animation: br-entra 1s ease-in-out infinite; }
.br-entra svg { font-size: 28px; }
.br-entra[hidden] { display: none; }
@keyframes br-entra { 50% { transform: translateY(4px); } }
/* telefono in orizzontale: comandi più piccoli e un po' trasparenti per vedere il livello */
@media (orientation: landscape) and (max-height: 520px) {
  .br-croce span { width: 84px; height: 84px; font-size: 50px; opacity: .9; }
  .br-salta { width: 100px; height: 100px; font-size: 46px; opacity: .92; }
  .br-lancia { width: 76px; height: 76px; font-size: 34px; opacity: .92; }
  .br-hud { padding-top: calc(6px + var(--sicuro-alto)); }
  .br-chip { padding-top: 2px; padding-bottom: 2px; }
}
/* computer con mouse: i comandi a schermo servono poco, restano piccoli in basso */
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .br-comandi { opacity: .55; }
  .br-comandi:hover { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .br-entra { animation: none; } }

/* Sfida un amico */
.br-sfide { width: 100%; max-width: 560px; margin-top: 18px; padding: 14px; border-radius: 22px; background: rgba(255, 246, 232, .12); border: 2px dashed rgba(255, 246, 232, .35); color: var(--panna); }
.br-sfide h3 { margin: 0 0 4px; font-family: "Bungee"; font-weight: 400; font-size: 1.15rem; color: var(--tuorlo); }
.br-sfide p { margin: 0 0 10px; line-height: 1.35; }
.br-sfide-bottoni { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.br-sfide-bottoni .grosso { flex: 1 1 100%; }
.br-sfide-bottoni svg, .br-bottone-sfida svg { font-size: 30px; }
.br-mia-sfida { flex: 1 1 140px; min-height: 56px; border: var(--bordo); border-radius: 18px; background: var(--panna); color: var(--prugna); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--ombra-piccola); }
.br-mia-sfida b { font-family: "Bungee"; font-weight: 400; font-size: 1.3rem; letter-spacing: .12em; }
.br-mia-sfida small { font-weight: 700; font-size: .8rem; }
.br-sfida p { margin: 6px 0 12px; line-height: 1.35; }
.br-sfida .grosso { margin-top: 8px; }
.br-nomi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 6px; }
.br-nome { min-height: 52px; border: var(--bordo); border-radius: 16px; background: #fff; color: var(--prugna); font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 8px; padding: 6px 10px; text-align: left; }
.br-nome i, .br-risultati i { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--prugna); flex: none; }
.br-nome.scelto { background: var(--lime); }
.br-codice { display: flex; justify-content: center; gap: 6px; margin: 6px 0; }
.br-codice span { width: 48px; height: 58px; display: grid; place-items: center; border: var(--bordo); border-radius: 14px; background: var(--tuorlo); font-family: "Bungee"; font-size: 1.9rem; color: var(--prugna); box-shadow: var(--ombra-piccola); }
.br-input-codice { width: 100%; min-height: 64px; border: var(--bordo); border-radius: 18px; background: #fff; color: var(--prugna); font-family: "Bungee"; font-size: 2rem; letter-spacing: .3em; text-align: center; text-transform: uppercase; padding: 0 0 0 .3em; }
.br-risultati { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.br-risultati li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: rgba(43, 24, 70, .07); font-weight: 600; }
.br-risultati li.mio { background: #c9f59e; outline: 2.5px solid var(--prugna); }
.br-risultati b { font-family: "Bungee"; font-weight: 400; min-width: 2.2em; }
.br-risultati span { flex: 1; line-height: 1.15; }
.br-risultati small { display: block; font-size: .78rem; opacity: .75; }
.br-risultati em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.br-fine-sfida { margin: 4px 0 6px; }
.br-bottone-sfida { width: 100%; background: var(--laguna); }
.br-verdetto { font-family: "Bungee"; font-size: 1.35rem; margin: 4px 0; color: var(--prugna); }
.br-velo { z-index: 30; }
