/* ================= Singer scoring (karaoke modes) on the projector =================
   Scorecards and Rank The Night. The header is the karaoke marquee and the concert lights come from stagefx.js;
   the code to rate sits on the right the whole time. Between songs: tonight's lineup. A singer up: a spotlight
   portrait and five judge cards that flip to the real scores. At the end: the standings. */
.sg-card { width: 12vh; height: 16vh; perspective: 800px; }
.sg-cin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.3, .5, 1); }
.sg-card.up .sg-cin { transform: rotateY(180deg); }
.sg-cf, .sg-cb { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 1.6vh; backface-visibility: hidden; -webkit-backface-visibility: hidden; font-weight: 900; }
.sg-cf { font-size: 6vh; color: rgba(255, 255, 255, .5); background: repeating-linear-gradient(45deg, #2a2360 0 1vh, #201a4c 1vh 2vh); box-shadow: inset 0 0 0 .4vh var(--gold), 0 1vh 3vh rgba(0, 0, 0, .5); }
.sg-cb { transform: rotateY(180deg); font-size: 8vh; color: #150c2c; background: linear-gradient(180deg, #fffdf6, #efe6d2); box-shadow: inset 0 0 0 .4vh var(--gold), 0 1vh 3vh rgba(0, 0, 0, .5); }
.sg-card.hot .sg-cb { color: #fff; background: linear-gradient(180deg, #ff9f3b, var(--pumpkin)); box-shadow: 0 0 4vh var(--pumpkin), inset 0 0 0 .4vh #fff; }
.sg-cards { display: flex; gap: 1.2vw; }
.sg-avg { display: grid; justify-items: center; opacity: 0; transform: scale(.6); transition: opacity .4s, transform .6s cubic-bezier(.2, 1.6, .4, 1); }
.sg-avg.on { opacity: 1; transform: none; }
.sg-avg small { font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 2.2vh; color: #e8e0ff; text-transform: uppercase; letter-spacing: .08em; }
.sg-avg b { font-weight: 900; font-size: 14vh; line-height: 1; color: var(--gold); text-shadow: 0 1vh 0 rgba(0, 0, 0, .5), 0 0 6vh color-mix(in srgb, var(--gold) 70%, transparent); }
@media (prefers-reduced-motion: reduce) { .sg *, .sgp * { animation: none !important; } }
.sx { position: relative; z-index: 2; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 40vh; gap: 3vw; align-items: center; font-family: var(--display); }
.sx i, .sx b, .sx em { font-style: normal; }
.sx-side { display: grid; gap: 2vh; align-content: center; justify-items: center; }
.sx-qr .ka-qr-label { font-size: 3.6vh; }
.sx-main { display: grid; gap: 2.2vh; align-content: center; min-width: 0; min-height: 0; }
.sx-head { display: flex; align-items: center; gap: 1.6vw; }
.sx-title, .sx-big { font-weight: 900; line-height: 1; color: #fff8ee;
    text-shadow: 0 0 .5vh #fff, 0 0 1.6vh var(--pumpkin), 0 0 3.6vh var(--pumpkin), 0 0 7vh color-mix(in srgb, var(--pumpkin) 65%, var(--violet)); }
.sx-title { font-size: 7vh; }
.sx-big { font-size: 10vh; }
.sx-chip { padding: .8vh 1.6vw; border-radius: 99px; font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 2.4vh; color: #1a1000; background: linear-gradient(180deg, #fff6c8, var(--gold)); }
.sx-sub { font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 2.8vh; color: #e8e0ff; }
.sx-empty { justify-items: center; text-align: center; }
.sx-more { font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 2.4vh; color: var(--gold); }
/* the lineup */
.sx-lineup { display: grid; gap: 1.2vh; }
.sx-lineup.is-two { grid-template-columns: 1fr 1fr; gap: 1.2vh 1.6vw; }
.sx-tile { display: grid; grid-template-columns: 5.6vh minmax(0, 1fr) auto; align-items: center; gap: 1.2vw; padding: 1.1vh 1.4vw; border-radius: 1.6vh;
    background: rgba(12, 8, 28, .84); box-shadow: inset 0 0 0 .25vh rgba(255, 255, 255, .08), 0 1vh 3vh rgba(0, 0, 0, .35); animation: sx-in .5s cubic-bezier(.2, 1.3, .4, 1) calc(var(--k) * .06s) both; }
.sx-n { display: grid; place-items: center; width: 5.6vh; height: 5.6vh; border-radius: 50%; font-weight: 900; font-size: 2.8vh; color: #1a1000; background: radial-gradient(circle at 35% 30%, #fff3b0, var(--gold)); }
.sx-who { display: grid; min-width: 0; }
.sx-who b { font-weight: 900; font-size: 3.4vh; line-height: 1.1; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-who small { font-family: var(--body, Inter), sans-serif; font-weight: 700; font-size: 2.2vh; color: var(--gold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-tile em { font-weight: 900; font-size: 3.4vh; color: var(--gold); }
@keyframes sx-in { from { opacity: 0; transform: translateY(2vh) scale(.97); } }
/* a singer on stage */
.sx-stage { grid-template-columns: auto minmax(0, 1fr); gap: 3vw; align-items: center; }
.sx-singer { display: grid; justify-items: center; gap: 1.2vh; }
.sx-photo { width: 38vh; height: 38vh; border-radius: 50%; overflow: hidden; background: #1a1230;
    box-shadow: 0 0 0 .7vh var(--gold), 0 0 9vh color-mix(in srgb, var(--gold) 55%, transparent), 0 3vh 8vh rgba(0, 0, 0, .6); animation: sx-spot 2.4s ease-in-out infinite alternate; }
.sx-photo img { width: 100%; height: 100%; object-fit: cover; } .sx-photo .sigil { display: grid; place-items: center; height: 100%; font-size: 15vh; }
@keyframes sx-spot { to { box-shadow: 0 0 0 .7vh var(--gold), 0 0 14vh color-mix(in srgb, var(--gold) 85%, transparent), 0 3vh 8vh rgba(0, 0, 0, .6); } }
.sx-name { max-width: 42vw; font-weight: 900; font-size: 7.5vh; line-height: 1; text-align: center; color: #fff8ee; overflow-wrap: anywhere;
    text-shadow: 0 0 .5vh #fff, 0 0 1.6vh var(--pumpkin), 0 0 3.6vh var(--pumpkin), 0 0 7vh color-mix(in srgb, var(--pumpkin) 65%, var(--violet)); }
.sx-song { font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 3.4vh; color: var(--gold); text-align: center; }
.sx-right { display: grid; justify-items: center; gap: 2.6vh; }
.sx-phase { padding: 1.1vh 2.8vw; border-radius: 99px; font-weight: 900; font-size: 4vh; color: #1a1000; background: linear-gradient(180deg, #fff6c8, var(--gold)); box-shadow: 0 0 4vh color-mix(in srgb, var(--gold) 55%, transparent); }
.sx-stage.is-scoring .sx-phase { animation: sx-pulse 1.1s ease-in-out infinite; }
@keyframes sx-pulse { 50% { transform: scale(1.06); box-shadow: 0 0 7vh color-mix(in srgb, var(--gold) 85%, transparent); } }
.sx-count { display: flex; align-items: center; gap: .8vw; min-height: 3.4vh; font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 3vh; color: #e8e0ff; }
.sx-count i { width: 1.6vh; height: 1.6vh; border-radius: 50%; background: #2fd683; box-shadow: 0 0 1.6vh #2fd683; animation: soft-pulse 1.1s ease-in-out infinite; }
/* the standings */
.sx-board { display: grid; gap: 1vh; }
.sx-row { display: grid; grid-template-columns: 6vh 8.5vh minmax(0, 1fr) auto; align-items: center; gap: 1.2vw; padding: 1vh 1.6vw; border-radius: 1.6vh;
    background: rgba(12, 8, 28, .84); box-shadow: inset 0 0 0 .25vh rgba(255, 255, 255, .08); animation: sx-in .55s cubic-bezier(.2, 1.3, .4, 1) calc(var(--k) * .12s) both; }
.sx-row.top { background: color-mix(in srgb, var(--gold) 20%, rgba(12, 8, 28, .9)); box-shadow: inset 0 0 0 .35vh var(--gold), 0 0 5vh color-mix(in srgb, var(--gold) 40%, transparent); }
.sx-row i { font-size: 4vh; text-align: center; }
.sx-ph { width: 8.5vh; height: 8.5vh; border-radius: 50%; overflow: hidden; background: #1a1230; } .sx-ph img { width: 100%; height: 100%; object-fit: cover; } .sx-ph .sigil { display: grid; place-items: center; height: 100%; font-size: 3.6vh; }
.sx-row em { font-weight: 900; font-size: 4.4vh; color: var(--gold); white-space: nowrap; } .sx-row em small, .sx-mini-row em small { font-size: .5em; color: #e8e0ff; }
/* the top three under the code */
.sx-mini { display: grid; gap: .8vh; width: 100%; }
.sx-mini:empty { display: none; }
.sx-mini-h { font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 2vh; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); text-align: center; }
.sx-mini-row { display: grid; grid-template-columns: 4vh minmax(0, 1fr) auto; align-items: center; gap: .8vw; padding: .8vh 1vw; border-radius: 1.2vh; background: rgba(12, 8, 28, .84); }
.sx-mini-row i { font-size: 2.6vh; } .sx-mini-row b { font-size: 2.4vh; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sx-mini-row em { font-size: 2.6vh; color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .sx *, .sgp * { animation: none !important; } }

/* ================= phone ================= */
.sgp { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.sgp > * { min-width: 0; }
.sgp-head { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 900; font-size: 1.3rem; line-height: 1.1; }
.sgp-head .ic { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; font-size: 1.3rem; background: linear-gradient(135deg, var(--violet), #0d0a2a); }
.sgp-head small { display: block; font-family: var(--body, Inter), sans-serif; font-weight: 700; font-size: .8rem; color: var(--muted, #a7a2b0); }
.sgp-singer { display: grid; justify-items: center; gap: .2rem; padding: 1rem; border-radius: 16px; text-align: center; background: var(--panel, #1c1c21); box-shadow: inset 0 0 0 2px var(--gold); }
.sgp-singer small { font-weight: 800; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); } .sgp-singer b { font-family: var(--display); font-weight: 900; font-size: 1.6rem; } .sgp-singer span { color: var(--muted, #a7a2b0); font-weight: 700; }
.sgp-turn { padding: .75rem .9rem; border-radius: 12px; font-weight: 900; text-align: center; background: var(--panel2, #24242b); }
.sgp-turn.go { color: #140a00; background: linear-gradient(180deg, #fff6c8, var(--gold)); } .sgp-turn.got { color: #fff; background: color-mix(in srgb, var(--ecto) 35%, #0b0b10); box-shadow: inset 0 0 0 2px var(--ecto); }
.sgp-scores { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.sgp-scores button { min-height: 60px; border: 0; border-radius: 14px; font: inherit; font-family: var(--display); font-weight: 900; font-size: 1.5rem; color: #fff; background: var(--panel2, #24242b); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .1); cursor: pointer; }
.sgp-scores button:nth-child(n+9) { background: color-mix(in srgb, var(--pumpkin) 25%, var(--panel2, #24242b)); }
.sgp-scores button.on { color: #140a00; background: linear-gradient(180deg, #fff6c8, var(--gold)); box-shadow: 0 0 0 3px #fff; }
.sgp-board { display: grid; gap: .4rem; }
.sgp-board div { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: .5rem .7rem; border-radius: 10px; font-weight: 800; background: rgba(0, 0, 0, .3); }
.sgp-board em { font-style: normal; font-family: var(--display); color: var(--gold); }
.sgp-slots { display: grid; gap: .45rem; }
.sgp-slot { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: .5rem; min-height: 50px; padding: .4rem .7rem; border-radius: 12px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 2px var(--line, #333); }
.sgp-slot.has { background: color-mix(in srgb, var(--gold) 18%, #0b0b10); box-shadow: inset 0 0 0 2px var(--gold); }
.sgp-slot i { font-style: normal; font-size: 1.3rem; } .sgp-slot b { font-family: var(--display); } .sgp-slot span { color: var(--muted, #a7a2b0); font-size: .9rem; }
.sgp-x { border: 0; border-radius: 50%; width: 34px; height: 34px; font: inherit; font-weight: 900; color: #fff; background: rgba(255, 255, 255, .12); cursor: pointer; }
.sgp-list { display: grid; gap: .45rem; }
.sgp-list button { display: grid; text-align: left; min-height: 52px; padding: .5rem .9rem; border: 0; border-radius: 12px; font: inherit; color: #fff; background: var(--panel2, #24242b); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08); cursor: pointer; }
.sgp-list button b { font-family: var(--display); font-weight: 900; } .sgp-list button small { color: var(--muted, #a7a2b0); font-weight: 700; }
.sgp-list button.on { opacity: .5; box-shadow: inset 0 0 0 2px var(--gold); } .sgp-list button:disabled:not(.on) { opacity: .4; }
.pp-singers { display: grid; place-items: center; }
.sg-mini { display: flex; gap: .6rem; } .sg-mini i { display: grid; place-items: center; width: 3.2rem; height: 4.2rem; border-radius: 10px; font-style: normal; font-family: var(--display); font-weight: 900; font-size: 1.6rem; color: #150c2c; background: linear-gradient(180deg, #fffdf6, #efe6d2); box-shadow: 0 0 0 3px var(--gold); animation: pp-flipin 4s ease-in-out infinite; }
.sg-mini i:nth-child(2) { animation-delay: .4s; } .sg-mini i:nth-child(3) { animation-delay: .8s; }
@keyframes pp-flipin { 0%, 100% { transform: rotateY(90deg); } 20%, 80% { transform: none; } }
