/* KIKKYGAME — KIKKY BAND (strumenti, palco di Kikky, canzoni, ritmo) */

/* porta in home */
.p-band { background: linear-gradient(135deg, #d2c4ff, #a58bff 55%, #7a5cff); }
.p-band .porta-ico { transform: rotate(5deg); }

/* ---------------------------------------------------------------- menu della band */
.bk-menu-palco { width: 100%; max-width: 620px; height: clamp(170px, 29vh, 270px); margin: 0 auto 12px; }
.bk-menu-scelte { width: 100%; max-width: 620px; display: grid; gap: 12px; margin: 0 auto; }
@media (min-width: 900px) { .bk-menu-scelte { grid-template-columns: 1fr 1fr; max-width: 960px; } .bk-menu-palco { max-width: 960px; } }
.bk-att { background: linear-gradient(135deg, var(--c1), var(--c2)); }
.bk-att > svg { font-size: 70px; flex: none; transform: rotate(-5deg); filter: drop-shadow(0 4px 0 rgba(43, 24, 70, .35)); }
.bk-att:nth-child(even) > svg { transform: rotate(4deg); }
.bk-att small { display: block; color: var(--prugna); }

/* ---------------------------------------------------------------- il palco */
.bk-palco { position: relative; width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2%; border-radius: 26px; overflow: hidden; isolation: isolate;
  background: radial-gradient(60% 75% at 50% 18%, rgba(255, 210, 63, .32), transparent 70%), radial-gradient(120% 90% at 50% 120%, #ff4fa3 0%, #8a3fd1 45%, #2b1846 85%);
  border: var(--bordo); box-shadow: var(--ombra); }
.bk-pavimento { position: absolute; left: -10%; right: -10%; bottom: -46%; height: 64%; border-radius: 50%; z-index: -1;
  background: repeating-conic-gradient(from 0deg at 50% 0, rgba(255, 246, 232, .12) 0 6deg, transparent 6deg 12deg), radial-gradient(closest-side, #5a2a8f, #2b1846); border-top: 3px solid rgba(255, 246, 232, .35); }
.bk-fari { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.bk-fari i { position: absolute; top: -20%; width: 34%; height: 140%; transform-origin: 50% 0; background: linear-gradient(180deg, rgba(255, 246, 232, .26), transparent 75%); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); animation: bk-faro 6s ease-in-out infinite alternate; }
.bk-fari i:nth-child(1) { left: 2%; transform: rotate(-24deg); background: linear-gradient(180deg, rgba(25, 195, 217, .32), transparent 75%); }
.bk-fari i:nth-child(2) { left: 33%; animation-duration: 5s; }
.bk-fari i:nth-child(3) { right: 2%; transform: rotate(24deg); background: linear-gradient(180deg, rgba(255, 79, 163, .32), transparent 75%); animation-duration: 7s; }
@keyframes bk-faro { from { rotate: -9deg; } to { rotate: 9deg; } }
.bk-palco.lampo .bk-pavimento { filter: brightness(1.25); }

.bk-kikky { position: relative; height: 96%; display: flex; align-items: flex-end; flex: none; }
.bk-corpo { position: relative; height: 100%; aspect-ratio: 210 / 300; }
.bk-testa { position: absolute; left: 0; right: 0; top: 0; transform-origin: 50% 90%; }
.bk-testa svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 10px rgba(20, 8, 40, .45)); }
.bk-strum { position: absolute; left: 50%; bottom: 1%; width: 76%; translate: -50% 0; transform-origin: 50% 80%; }
.bk-strum svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 6px rgba(20, 8, 40, .45)); }
.bk-mano { position: absolute; bottom: 22%; width: 17%; aspect-ratio: 1; border-radius: 50%; background: #ffd9b8; border: 3px solid var(--prugna); box-shadow: inset -3px -3px 0 rgba(217, 140, 100, .35); }
.bk-mano.s { left: 10%; } .bk-mano.d { right: 10%; }
.bk-palco[data-suona="tromba"] .bk-mano.s, .bk-palco[data-suona="flauto"] .bk-mano.s { left: 26%; bottom: 15%; }
.bk-palco[data-suona="tromba"] .bk-mano.d, .bk-palco[data-suona="flauto"] .bk-mano.d { right: 30%; bottom: 25%; }
.bk-volo { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.bk-notina { position: absolute; left: 50%; bottom: 30%; width: 34px; height: 34px; margin-left: -17px; animation: bk-vola 1s cubic-bezier(.16, 1, .3, 1) forwards; }
.bk-notina svg { width: 100%; height: 100%; }
@keyframes bk-vola { 0% { opacity: 0; transform: translate(0, 10px) scale(.4); } 15% { opacity: 1; transform: translate(calc(var(--x) * .3), -10px) scale(1.1) rotate(var(--r)); } 100% { opacity: 0; transform: translate(var(--x), -130px) scale(.9) rotate(calc(var(--r) * -1)); } }

/* amici della band */
.bk-fila { display: flex; align-items: flex-end; gap: 2px; height: 70%; padding-bottom: 2%; flex: 1 1 0; min-width: 0; }
.bk-fila.sx { justify-content: flex-end; } .bk-fila.dx { justify-content: flex-start; }
.bk-amico { position: relative; height: 100%; max-width: 50%; flex: 0 1 auto; aspect-ratio: .78; padding: 0; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; transition: filter .2s, opacity .2s; }
.bk-dino { display: block; width: 100%; transform-origin: 50% 100%; }
.bk-dino svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 5px 5px rgba(20, 8, 40, .5)); }
.bk-amico-strum { position: absolute; left: 50%; bottom: 20%; width: 52%; translate: -50% 0; }
.bk-amico-strum svg { width: 100%; height: auto; display: block; }
.bk-amico b { font-family: "Bungee"; font-weight: 400; font-size: clamp(.62rem, 2.4vw, .85rem); color: var(--panna); -webkit-text-stroke: 1.5px var(--prugna); paint-order: stroke fill; line-height: 1; margin-top: 2px; }
.bk-amico:not(.on) { filter: grayscale(.85) brightness(.7); opacity: .65; }
.bk-amico:not(.on)::after { content: ""; position: absolute; top: 4%; right: 4%; width: 26%; aspect-ratio: 1; border-radius: 50%; background: var(--panna) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M8 18h8l11-9v30l-11-9H8z' fill='%23ffd23f' stroke='%232b1846' stroke-width='3.5' stroke-linejoin='round'/%3E%3Cpath d='M33 18l10 12M43 18L33 30' stroke='%232b1846' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center/72% no-repeat; border: 2.5px solid var(--prugna); }

/* ---------------------------------------------------------------- schermata Suona */
.bk-suona { padding: calc(8px + var(--sicuro-alto)) 0 0; overflow: hidden; align-items: stretch; }
.bk-suona > * { width: 100%; }
.bk-barra { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 8px; padding: 0 12px; margin: 0 0 8px; }
.bk-barra h2 { margin: 0; text-align: center; font-family: "Bungee"; font-weight: 400; font-size: clamp(.95rem, 4.2vw, 1.5rem); overflow-wrap: anywhere; color: var(--panna); text-shadow: 0 3px 0 var(--prugna); line-height: 1.05; text-wrap: balance; min-width: 0; }
.bk-azioni { display: flex; gap: 6px; }
.bk-btn { width: 56px; height: 56px; border: var(--bordo); border-radius: 18px; background: var(--panna); box-shadow: var(--ombra-piccola); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px 0 0; gap: 0; transition: transform .15s; }
.bk-btn svg { font-size: 30px; }
.bk-btn span { font-family: "Bungee"; font-size: .62rem; line-height: 1; margin-top: 1px; font-variant-numeric: tabular-nums; }
.bk-btn:active { transform: translateY(3px) scale(.96); }
.bk-btn.on { background: var(--laguna); }
.bk-btn.rec.on { background: #ff8fa6; animation: bk-rec 1s ease-in-out infinite; }
@keyframes bk-rec { 50% { box-shadow: 0 0 0 6px rgba(232, 23, 58, .45), var(--ombra-piccola); } }
.modo-band #bk-rec, .modo-band #bk-mie { display: none; }

.bk-corpo-suona { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.bk-scena { flex: 0 0 auto; height: clamp(150px, 27vh, 250px); padding: 0 12px; }
.modo-band .bk-scena { height: clamp(160px, 28vh, 260px); }
.bk-lato { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.bk-scegli { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 6px 12px 10px; scrollbar-width: none; flex: none; scroll-snap-type: x proximity; }
.bk-scegli::-webkit-scrollbar { display: none; }
.bk-chip { flex: none; width: 72px; padding: 5px 2px 6px; border: var(--bordo); border-radius: 18px; background: var(--panna); box-shadow: var(--ombra-piccola); display: flex; flex-direction: column; align-items: center; gap: 1px; scroll-snap-align: center; transition: transform .2s cubic-bezier(.16, 1, .3, 1), background .2s; }
.bk-chip svg { font-size: 40px; }
.bk-chip span { font-weight: 700; font-size: .78rem; line-height: 1.1; }
.bk-chip.scelto { background: var(--tuorlo); transform: translateY(-3px) rotate(-2deg); box-shadow: var(--ombra); }

.bk-strumento { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 0 10px calc(10px + var(--sicuro-basso)); touch-action: none; -webkit-user-select: none; user-select: none; }
.bk-strumento button { touch-action: none; -webkit-touch-callout: none; padding: 0; color: var(--prugna); }
.bk-strumento kbd { position: absolute; top: 6px; left: 50%; translate: -50% 0; font: 700 .72rem/1 "Fredoka", sans-serif; padding: 2px 5px; border-radius: 6px; background: rgba(43, 24, 70, .14); color: var(--prugna); pointer-events: none; }

/* pianoforte */
.bk-piano { position: relative; flex: 1 1 0; min-height: 0; display: flex; border: var(--bordo); border-radius: 16px 16px 20px 20px; overflow: hidden; background: var(--prugna); box-shadow: var(--ombra-piccola), inset 0 10px 0 #1b0f30; padding-top: 8px; }
.bk-bianco { position: relative; flex: 1 1 0; min-width: 0; border: 0; border-right: 3px solid var(--prugna); border-radius: 0 0 10px 10px; background: linear-gradient(180deg, #fffdf8 0%, #fff6e8 70%, #f2e0c0 100%); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 8px !important; box-shadow: inset 0 -7px 0 rgba(43, 24, 70, .1); transition: transform .06s; }
.bk-bianco:last-child { border-right: 0; }
.bk-cap { width: min(86%, 42px); aspect-ratio: 1; border-radius: 50%; background: var(--c); border: 3px solid var(--prugna); display: grid; place-items: center; font-family: "Bungee"; font-size: clamp(.56rem, 2.5vw, .82rem); line-height: 1; pointer-events: none; }
.bk-bianco.giu { transform: translateY(3px); background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--c) 45%, #fff6e8)); box-shadow: inset 0 0 0 4px var(--c), inset 0 -3px 0 rgba(43, 24, 70, .12); }
.bk-bianco.giu .bk-cap { transform: scale(1.12); box-shadow: 0 0 16px 4px var(--c); }
.bk-nero { position: absolute; top: 8px; height: 56%; z-index: 2; border: 3px solid var(--prugna) !important; border-top: 0 !important; border-radius: 0 0 9px 9px; background: linear-gradient(180deg, #3a1d6e, #1b0f30 80%, #4a2580); box-shadow: 0 5px 0 rgba(0, 0, 0, .35); transition: transform .06s; }
.bk-nero kbd { color: var(--panna); background: rgba(255, 246, 232, .15); top: auto; bottom: 6px; }
.bk-nero.giu { transform: translateY(2px); background: linear-gradient(180deg, #6b33b8, #a066ff); box-shadow: 0 0 14px 2px rgba(160, 102, 255, .8); }
.bk-piano.penta .bk-bianco { border-radius: 0 0 14px 14px; }

/* xilofono */
.bk-xilo { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; gap: 2.2%; padding: 3% 4%; border: var(--bordo); border-radius: 26px; background: linear-gradient(180deg, #ffe0b2, #f4b878); box-shadow: var(--ombra-piccola); }
.bk-binario { position: absolute; left: 2%; right: 2%; height: 12px; border-radius: 6px; background: #8a4a1e; border: 3px solid var(--prugna); }
.bk-binario.a { top: 24%; transform: rotate(1.6deg); } .bk-binario.b { bottom: 24%; transform: rotate(-1.6deg); }
.bk-barra-x { position: relative; flex: 1 1 0; min-width: 0; height: var(--h); border: 3px solid var(--prugna) !important; border-radius: 14px; background: linear-gradient(90deg, rgba(255, 255, 255, .35), transparent 30%, rgba(43, 24, 70, .12)), var(--c); box-shadow: 0 5px 0 rgba(43, 24, 70, .5); display: flex; align-items: center; justify-content: center; transition: transform .07s; }
.bk-barra-x::before, .bk-barra-x::after { content: ""; position: absolute; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #e9e6f2; border: 2px solid var(--prugna); }
.bk-barra-x::before { top: 14%; } .bk-barra-x::after { bottom: 14%; }
.bk-barra-x span { font-family: "Bungee"; font-size: clamp(.55rem, 2.4vw, .85rem); writing-mode: vertical-rl; transform: rotate(180deg); pointer-events: none; }
.bk-barra-x kbd { top: 2px; }
.bk-barra-x.giu { transform: translateY(4px) scaleY(.98); box-shadow: 0 1px 0 rgba(43, 24, 70, .5), 0 0 22px 4px var(--c); filter: brightness(1.12); }

/* batteria */
.bk-batteria { flex: 1 1 auto; min-height: 0; display: grid; gap: 8px; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); grid-template-areas: "piatto charleston" "tomA tomB" "rullante cassa"; }
.bk-pad { position: relative; min-height: 0; border: var(--bordo) !important; border-radius: 24px; background: radial-gradient(120% 90% at 50% 0, #4a2580, #1d0f36); box-shadow: var(--ombra-piccola); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden; }
.bk-pad b { position: relative; z-index: 1; font-family: "Bungee"; font-weight: 400; font-size: clamp(.72rem, 3.2vw, 1rem); color: var(--panna); line-height: 1; pointer-events: none; }
.bk-pad kbd { color: var(--panna); background: rgba(255, 246, 232, .14); }
.bk-pelle { width: 78%; height: 52%; margin-bottom: 8px; border-radius: 50%; border: 3px solid var(--prugna); pointer-events: none; transition: filter .08s, box-shadow .08s; background: radial-gradient(closest-side, #fffdf8, #f2e6d0 80%); box-shadow: 0 0 0 7px var(--rim, #e8173a), 0 0 0 10px var(--prugna), 0 9px 0 6px rgba(0, 0, 0, .35); }
.p-piatto { grid-area: piatto; } .p-charleston { grid-area: charleston; } .p-tomA { grid-area: tomA; --rim: #19c3d9; } .p-tomB { grid-area: tomB; --rim: #8be04e; } .p-rullante { grid-area: rullante; --rim: #e9e6f2; } .p-cassa { grid-area: cassa; --rim: #ff3b5c; }
.p-cassa .bk-pelle { width: 66%; height: 60%; background: radial-gradient(closest-side, #fff6e8 0 38%, #ff4fa3 39% 44%, #fff6e8 45%); }
.p-piatto .bk-pelle, .p-charleston .bk-pelle { height: 44%; background: repeating-radial-gradient(circle, #ffe680 0 3px, #f5c531 3px 6px); box-shadow: 0 0 0 3px var(--prugna), 0 8px 0 2px rgba(0, 0, 0, .35); }
.p-piatto .bk-pelle::after, .p-charleston .bk-pelle::after { content: ""; position: absolute; }
.bk-pad.giu .bk-pelle { filter: brightness(1.18); box-shadow: 0 0 0 7px var(--rim, #ffd23f), 0 0 0 10px var(--prugna), 0 0 30px 14px rgba(255, 210, 63, .55); }
.p-piatto.giu .bk-pelle, .p-charleston.giu .bk-pelle { box-shadow: 0 0 0 3px var(--prugna), 0 0 30px 14px rgba(255, 210, 63, .7); }

/* chitarra */
.bk-accordi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; flex: none; }
.bk-acc { position: relative; height: 54px; border: var(--bordo) !important; border-radius: 16px; background: var(--panna); box-shadow: var(--ombra-piccola); font-family: "Bungee"; font-size: 1.15rem; }
.bk-acc.scelto { background: var(--c); transform: translateY(-2px); box-shadow: var(--ombra); }
.bk-acc kbd { top: 3px; left: 14px; translate: none; }
.bk-chitarra { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 4% 0; border: var(--bordo); border-radius: 26px; overflow: hidden; box-shadow: var(--ombra-piccola);
  background: radial-gradient(70% 90% at 12% 50%, #ffb36b 0 30%, transparent 31%), linear-gradient(90deg, #ff9a4a, #ff7a1a 40%, #e86a10); }
.bk-buca { position: absolute; left: 6%; top: 50%; width: 22%; aspect-ratio: 1; translate: 0 -50%; border-radius: 50%; background: radial-gradient(circle, #1b0f30 0 60%, #ffd23f 61% 68%, #1b0f30 69% 74%, transparent 75%); }
.bk-corda { position: relative; flex: 1 1 0; border: 0; background: none; }
.bk-corda i { position: absolute; left: 0; right: 0; top: 50%; height: var(--sp); translate: 0 -50%; background: linear-gradient(180deg, #fffdf2, #c9b98f); box-shadow: 0 2px 2px rgba(43, 24, 70, .55); pointer-events: none; }
.bk-corda span { position: absolute; right: 10px; top: 50%; translate: 0 -50%; font-family: "Bungee"; font-size: .72rem; background: var(--panna); border: 2.5px solid var(--prugna); border-radius: 999px; padding: 2px 8px; pointer-events: none; }
.bk-corda kbd { left: auto; right: 70px; top: 50%; translate: 0 -50%; }
.bk-corda.giu i { background: #ffd23f; box-shadow: 0 0 12px 3px rgba(255, 210, 63, .9); }
.bk-suggerimento { margin: 0; text-align: center; color: var(--panna); font-weight: 700; font-size: 1rem; text-shadow: 0 2px 0 var(--prugna); }

/* tromba */
.bk-tromba-fig { flex: 0 1 auto; height: clamp(54px, 13vh, 110px); display: flex; justify-content: center; }
.bk-tromba-fig svg { width: auto; height: 100%; filter: drop-shadow(0 6px 4px rgba(20, 8, 40, .45)); transform: rotate(-4deg); }
.bk-pistoni { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 10px; }
.bk-pistone { position: relative; min-height: 0; border: var(--bordo) !important; border-radius: 22px; background: linear-gradient(180deg, #fff0a8, #ffd23f 45%, #e8a810); box-shadow: 0 7px 0 #b07a00, 0 12px 16px -6px rgba(20, 8, 40, .6); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: transform .06s, box-shadow .06s; }
.bk-pistone i { width: min(62%, 58px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--c) 13%); border: 3px solid var(--prugna); pointer-events: none; }
.bk-pistone span { font-family: "Bungee"; font-size: clamp(.8rem, 3.4vw, 1.05rem); pointer-events: none; }
.bk-pistone.giu { transform: translateY(6px); box-shadow: 0 1px 0 #b07a00, 0 0 24px 6px var(--c); }

/* flauto dolce */
.bk-flauto { position: relative; flex: 1 1 auto; min-height: 0; align-self: center; width: min(62%, 260px); display: flex; flex-direction: column; border: var(--bordo); border-radius: 34px 34px 20px 20px; padding: 0 6px; background: linear-gradient(90deg, #c68a4a, #f2c48a 35%, #e8b878 60%, #b8783a); box-shadow: var(--ombra); }
.bk-becco { flex: 0 0 26px; margin: 0 14%; border-bottom: 3px solid var(--prugna); background: linear-gradient(180deg, transparent 50%, #1b0f30 50% 62%, transparent 62%); }
.bk-campana { flex: 0 0 18px; margin: 0 -6px; border-top: 3px solid var(--prugna); border-radius: 0 0 18px 18px; background: linear-gradient(90deg, #a8682a, #e0a868, #a8682a); }
.bk-buco { position: relative; flex: 1 1 0; min-height: 0; border: 0; background: none; display: flex; align-items: center; justify-content: center; }
.bk-buco + .bk-buco { border-top: 2px dashed rgba(43, 24, 70, .18); }
.bk-buco i { height: 72%; max-height: 52px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #1b0f30 0 55%, #3a1d6e 70%); border: 3px solid var(--prugna); box-shadow: inset 0 3px 0 rgba(0, 0, 0, .4), 0 0 0 4px var(--c); pointer-events: none; transition: background .06s; }
.bk-buco span { position: absolute; left: 6px; font-family: "Bungee"; font-size: .64rem; color: var(--prugna); pointer-events: none; }
.bk-buco kbd { left: auto; right: 4px; top: 50%; translate: 0 -50%; }
.bk-buco.giu i { background: radial-gradient(circle at 40% 35%, #fff 0 14%, var(--c) 15%); box-shadow: 0 0 0 4px var(--panna), 0 0 22px 6px var(--c); }

/* maracas e tamburello */
.bk-maracas { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bk-perc { position: relative; min-height: 0; border: var(--bordo) !important; border-radius: 28px; background: radial-gradient(90% 80% at 50% 30%, #fff6e8, #ffe0b2); box-shadow: var(--ombra-piccola); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.bk-perc svg { width: min(70%, 190px); height: auto; max-height: 72%; pointer-events: none; }
.bk-perc b { font-family: "Bungee"; font-weight: 400; font-size: clamp(.85rem, 3.8vw, 1.15rem); pointer-events: none; }
.bk-perc.giu { background: radial-gradient(90% 80% at 50% 30%, #fff, #ffd23f); }
.bk-scuoti { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; border: var(--bordo) !important; border-radius: 999px; background: var(--panna); box-shadow: var(--ombra-piccola); font-weight: 700; font-size: 1.05rem; }
.bk-scuoti svg { font-size: 38px; }
.bk-scuoti.on { background: var(--lime); }
.bk-scuoti.on svg { animation: bk-scuoti .35s ease-in-out infinite alternate; }
@keyframes bk-scuoti { from { rotate: -12deg; } to { rotate: 12deg; } }

/* le mie canzoni (foglio dal basso) */
.bk-foglio { position: fixed; inset: 0; z-index: 15; background: rgba(27, 15, 48, .66); display: flex; align-items: flex-end; justify-content: center; padding: 16px 12px calc(12px + var(--sicuro-basso)); }
.bk-foglio[hidden] { display: none; }
.bk-foglio-dentro { width: min(100%, 520px); max-height: 80vh; overflow-y: auto; background: var(--panna); border: var(--bordo); border-radius: 28px; box-shadow: var(--ombra); padding: 16px; animation: bk-sale .38s cubic-bezier(.16, 1, .3, 1); }
@keyframes bk-sale { from { transform: translateY(40px); opacity: 0; } }
.bk-foglio h3 { margin: 0; font-family: "Bungee"; font-weight: 400; font-size: 1.4rem; text-align: center; }
.bk-nota-foglio { margin: 4px 0 12px; text-align: center; font-size: .95rem; color: #5a4670; }
.bk-mie { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bk-mie li { display: flex; align-items: center; gap: 10px; padding: 8px; border: 3px solid var(--prugna); border-radius: 18px; background: #fff; }
.bk-mie li.vuoto { display: block; text-align: center; padding: 14px; font-weight: 600; }
.bk-play { width: 52px; height: 52px; flex: none; border-radius: 50%; border: var(--bordo); background: var(--lime); display: grid; place-items: center; font-size: 26px; padding: 0; box-shadow: var(--ombra-piccola); }
.bk-play.on { background: var(--tuorlo); }
.bk-mia { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bk-mia b { font-family: "Bungee"; font-weight: 400; font-size: 1rem; }
.bk-mia small { font-weight: 600; color: #5a4670; font-variant-numeric: tabular-nums; }
.bk-mie-strum { display: flex; font-size: 26px; }
.bk-mie-strum svg { margin-left: -6px; }
.bk-togli { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 3px solid var(--prugna); background: var(--panna-2); display: grid; place-items: center; font-size: 20px; padding: 0; }
.bk-foglio .grosso { width: 100%; }

/* ---------------------------------------------------------------- canzoni e ritmi */
.bk-opzioni { width: 100%; max-width: 620px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 8px; }
.bk-seg { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border: var(--bordo); border-radius: 999px; background: var(--panna); box-shadow: var(--ombra-piccola); }
.bk-seg > span { font-weight: 700; font-size: .9rem; margin-right: 2px; }
.bk-seg button { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 4px 12px 4px 8px; border: 3px solid transparent; border-radius: 999px; background: none; font-weight: 700; font-size: .98rem; }
.bk-seg button svg { font-size: 28px; }
.bk-seg button.scelto { background: var(--tuorlo); border-color: var(--prugna); }
.bk-spiega { font-size: 1.02rem; margin-bottom: 12px; }
.bk-brani { width: 100%; max-width: 620px; display: grid; gap: 10px; }
@media (min-width: 900px) { .bk-brani { grid-template-columns: 1fr 1fr; max-width: 960px; } }
.bk-brano { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border: var(--bordo); border-radius: var(--r); background: var(--panna); box-shadow: var(--ombra-piccola); text-align: left; transition: transform .15s; }
.bk-brano:active { transform: translateY(3px) scale(.99); }
.bk-num { width: 46px; height: 46px; flex: none; border-radius: 14px; border: 3px solid var(--prugna); background: var(--laguna); display: grid; place-items: center; font-family: "Bungee"; font-size: 1.3rem; color: var(--panna); -webkit-text-stroke: 1.5px var(--prugna); paint-order: stroke fill; transform: rotate(-4deg); }
.bk-brano:nth-child(3n+2) .bk-num { background: var(--rosa); transform: rotate(3deg); } .bk-brano:nth-child(3n) .bk-num { background: var(--mandarino); }
.bk-brano-testo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bk-brano-testo b { font-family: "Bungee"; font-weight: 400; font-size: 1.05rem; line-height: 1.1; }
.bk-brano-testo small { font-weight: 600; font-size: .92rem; color: #5a4670; }
.bk-pallini { display: flex; gap: 4px; margin-top: 2px; }
.bk-pallini i { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--prugna); }
.bk-brano .stelline { font-size: 20px; flex: none; }
.bk-nota-pd { color: var(--panna-2); font-size: .9rem; margin: 14px 0 0; text-align: center; }
.bk-livelli { max-width: 620px; }
.bk-liv { background: radial-gradient(90% 70% at 50% 20%, rgba(255, 255, 255, .45), transparent 70%), var(--c); padding: 6px 4px; gap: 4px; }
.bk-liv-nome { position: relative; font-weight: 700; font-size: clamp(.72rem, 3vw, .9rem); line-height: 1.1; text-align: center; color: var(--prugna); background: rgba(255, 246, 232, .82); border-radius: 999px; padding: 2px 8px; }

/* ---------------------------------------------------------------- gioco (canzone / ritmo) */
#bk-tela { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.bk-hud { align-items: center; }
.bk-hud #bk-g-titolo { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }
.bk-hud #bk-g-punti { margin-right: auto; }
.bk-hud #bk-g-ascolta[hidden] { display: none; }
#bk-g-giudizio { top: 38%; }
#band-gioco .avviso { top: 40%; }

/* ---------------------------------------------------------------- orizzontale (telefono girato) e PC */
@media (orientation: landscape) and (max-height: 560px) {
  .bk-suona { padding-top: calc(6px + var(--sicuro-alto)); }
  .bk-barra { margin-bottom: 4px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .bk-barra .tondo, .bk-btn { width: 46px; height: 46px; }
  .bk-btn svg { font-size: 24px; }
  .bk-corpo-suona { flex-direction: row; padding-left: max(0px, env(safe-area-inset-left)); padding-right: max(0px, env(safe-area-inset-right)); }
  .bk-scena, .modo-band .bk-scena { height: auto; width: 27%; padding: 0 0 10px 12px; }
  .modo-band .bk-scena { width: 38%; }
  .bk-scegli { padding: 2px 10px 6px; }
  .bk-chip { width: 62px; padding: 3px 2px 4px; } .bk-chip svg { font-size: 30px; } .bk-chip span { font-size: .68rem; }
  .bk-batteria { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; grid-template-areas: "piatto tomA tomB" "charleston rullante cassa"; }
  .bk-pistoni { grid-template-columns: repeat(8, 1fr); }
  .bk-tromba-fig { height: 22%; }
  .bk-flauto { flex-direction: row; width: 100%; height: auto; border-radius: 34px 20px 20px 34px; padding: 6px 0; background: linear-gradient(180deg, #c68a4a, #f2c48a 35%, #e8b878 60%, #b8783a); }
  .bk-becco { flex: 0 0 30px; margin: 14% 0; border-bottom: 0; border-right: 3px solid var(--prugna); background: linear-gradient(90deg, transparent 50%, #1b0f30 50% 62%, transparent 62%); }
  .bk-campana { flex: 0 0 20px; margin: -6px 0; border-top: 0; border-left: 3px solid var(--prugna); border-radius: 0 18px 18px 0; }
  .bk-buco + .bk-buco { border-top: 0; border-left: 2px dashed rgba(43, 24, 70, .18); }
  .bk-buco i { height: auto; width: 62%; max-height: none; max-width: 56px; }
  .bk-buco span { left: 50%; top: 4px; translate: -50% 0; }
  .bk-buco kbd { right: auto; left: 50%; top: auto; bottom: 4px; translate: -50% 0; }
  .bk-menu-palco { height: 46vh; }
}
@media (min-width: 900px) and (min-height: 600px) {
  .bk-suona { padding-top: calc(14px + var(--sicuro-alto)); }
  .bk-barra { max-width: 1280px; margin: 0 auto 10px; }
  .bk-corpo-suona { flex-direction: row; max-width: 1280px; margin: 0 auto; padding: 0 12px; gap: 14px; }
  .bk-scena, .modo-band .bk-scena { height: auto; width: 34%; max-width: 440px; padding: 0 0 18px; }
  .modo-band .bk-scena { width: 42%; max-width: 560px; }
  .bk-scegli { padding: 4px 0 12px; }
  .bk-strumento { padding: 0 0 18px; }
  .bk-batteria { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; grid-template-areas: "piatto tomA tomB" "charleston rullante cassa"; }
  .bk-pistoni { grid-template-columns: repeat(8, 1fr); }
  .bk-flauto { width: min(42%, 300px); }
}
@media (prefers-reduced-motion: reduce) { .bk-fari i, .bk-btn.rec.on, .bk-scuoti.on svg { animation: none; } }

/* ---------------------------------------------------------------- sfida un amico */
.bk-sfida { z-index: 30; }
.bk-sfida-dentro { display: flex; flex-direction: column; gap: 10px; }
.bk-sfida-dentro h2 { margin: 0; font-size: clamp(1.3rem, 6vw, 1.7rem); line-height: 1.1; text-wrap: balance; }
.bk-sfida-dentro p { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.35; text-wrap: pretty; }
.bk-sfida-dentro .grosso { margin: 0; }
.bk-sfida-dentro .grosso svg { font-size: 34px; }
.bk-sf-nomi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bk-sf-nome { min-height: 52px; padding: 4px; border: 3px solid var(--prugna); border-radius: 16px; background: #fff; font-weight: 700; font-size: .98rem; line-height: 1.1; box-shadow: var(--ombra-piccola); }
.bk-sf-nome:nth-child(4n+1) { background: #ffe3a0; } .bk-sf-nome:nth-child(4n+2) { background: #c9f4fa; } .bk-sf-nome:nth-child(4n+3) { background: #ffd1ec; } .bk-sf-nome:nth-child(4n) { background: #d8f5a8; }
.bk-sf-nome:active { transform: translateY(3px); }
.bk-sf-codice { display: flex; justify-content: center; gap: 6px; }
.bk-sf-codice span { width: 50px; height: 62px; display: grid; place-items: center; border: var(--bordo); border-radius: 14px; background: var(--tuorlo); font-family: "Bungee"; font-size: 2rem; box-shadow: var(--ombra-piccola); }
.bk-sf-codice span:nth-child(even) { background: var(--laguna); transform: rotate(3deg); } .bk-sf-codice span:nth-child(odd) { transform: rotate(-2deg); }
.bk-sf-form { display: flex; flex-direction: column; gap: 10px; }
.bk-sf-form input { width: 100%; min-height: 64px; text-align: center; font-family: "Bungee"; font-size: 2rem; letter-spacing: .3em; padding: 0 0 0 .3em; border: var(--bordo); border-radius: 18px; background: #fff; color: var(--prugna); text-transform: uppercase; user-select: text; -webkit-user-select: text; caret-color: var(--rosa); }
.bk-sf-form input::placeholder { color: #c9bcd8; }
.bk-sf-errore { color: #c2185b; }
.bk-sf-io { font-size: .95rem !important; }
.bk-sf-invito { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 3px solid var(--prugna); border-radius: 18px; background: #fff; text-align: left; }
.bk-sf-invito > svg { font-size: 64px; }
.bk-sf-invito b { display: block; font-family: "Bungee"; font-weight: 400; font-size: 1.15rem; line-height: 1.1; }
.bk-sf-invito small { font-weight: 600; color: #5a4670; }
.bk-sf-punti b { font-family: "Bungee"; font-size: 1.6rem; color: var(--mandarino); -webkit-text-stroke: 1.5px var(--prugna); paint-order: stroke fill; }
.bk-sf-attesa { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 0; }
.bk-sf-giro { width: 28px; height: 28px; border-radius: 50%; border: 4px solid var(--panna-2); border-top-color: var(--rosa); animation: bk-giro .8s linear infinite; }
@keyframes bk-giro { to { transform: rotate(1turn); } }
.bk-sf-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.bk-sf-lista li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 8px 10px; border: 3px solid var(--prugna); border-radius: 16px; background: #fff; }
.bk-sf-c { grid-row: span 2; font-family: "Bungee"; font-size: .95rem; padding: 6px 8px; border-radius: 10px; background: var(--tuorlo); border: 2.5px solid var(--prugna); }
.bk-sf-t b { display: block; font-size: 1rem; } .bk-sf-t small { font-weight: 600; color: #5a4670; }
.bk-sf-r { display: flex; flex-wrap: wrap; gap: 4px; }
.bk-sf-r small { font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panna-2); }
.bk-sf-r small.su { background: #ffd1ec; } .bk-sf-r small.giu { background: #d8f5a8; }
.bk-sfida-btn { background: #c4b2ff; }
.bk-sfida-btn svg { font-size: 34px; }
.bk-sf-esito { margin: 8px 0 4px; padding: 10px; border: 3px solid var(--prugna); border-radius: 18px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.bk-sf-esito > b { font-family: "Bungee"; font-weight: 400; font-size: 1.1rem; line-height: 1.15; }
.bk-sf-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bk-sf-vs > span { display: flex; flex-direction: column; align-items: center; padding: 6px; border-radius: 14px; background: var(--panna-2); font-weight: 700; }
.bk-sf-vs > span.su { background: var(--tuorlo); }
.bk-sf-vs i { font-style: normal; font-family: "Bungee"; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.bk-sf-esito small { color: #c2185b; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .bk-sf-giro { animation-duration: 3s; } }
.fine .podio .bk-punti-et { display: block; font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1rem; color: var(--prugna); -webkit-text-stroke: 0; letter-spacing: .08em; text-transform: uppercase; margin-top: -2px; }

/* il palco si adatta alla sua forma: Kikky mai più grande del palco; su palco alto i dinosauri vanno in fila sotto */
.bk-scena, .bk-menu-palco { container-type: size; }
.bk-kikky { height: min(96%, 128cqw); }
.con-amici .bk-kikky { height: min(96%, 60cqw); }
@container (aspect-ratio < 1.1) {
  .bk-palco.con-amici { flex-wrap: wrap; align-content: flex-end; row-gap: 0; }
  .con-amici .bk-kikky { order: -1; flex: 0 0 100%; height: 62%; justify-content: center; }
  .con-amici .bk-fila { height: 30%; flex: 1 1 40%; justify-content: center; padding-bottom: 3%; }
  .con-amici .bk-amico { max-width: 48%; }
}
