@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');
:root{font-family:'DM Sans',system-ui,sans-serif;color:#f8f6ff;background:#0d0b20;font-size:16px}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 50% -20%,#553296 0,transparent 55%),#0d0b20}header{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 max(22px,calc((100vw - 1200px)/2));border-bottom:1px solid #ffffff24;background:#0b0920a8}header a{text-decoration:none;color:#fff;font:800 1.3rem 'Barlow Condensed',sans-serif;letter-spacing:.08em}#status{color:#c9bee8;font-size:.85rem}main{max-width:1200px;margin:auto;padding:34px 22px 80px}h1,h2,h3{font-family:'Barlow Condensed',sans-serif;line-height:1.05;margin:0 0 16px}h1{font-size:clamp(3rem,8vw,6rem);letter-spacing:.025em}h2{font-size:2.2rem}h3{font-size:1.55rem}.eyebrow{text-transform:uppercase;color:#e8b4fc;letter-spacing:.16em;font-weight:700;font-size:.85rem}.intro{max-width:680px;margin:5vh auto;text-align:center}.intro p{font-size:1.15rem;color:#cfc8e0}.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px;margin-top:34px}.card{background:#1d1936;border:1px solid #ffffff20;border-radius:20px;padding:26px;box-shadow:0 18px 50px #0002}.card p,.muted{color:#c5bed8}.card h2{margin-bottom:8px}.stack{display:grid;gap:13px}label{display:grid;gap:7px;color:#dfd7f1;font-weight:600}input,select{width:100%;background:#100d28;color:#fff;border:1px solid #70658e;border-radius:11px;padding:13px 14px;font:inherit}input:focus,select:focus{outline:2px solid #eab4ff}button,.button{border:0;border-radius:11px;padding:13px 18px;color:#160d27;background:#f4c860;font:700 1rem 'DM Sans',sans-serif;cursor:pointer;text-decoration:none;display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:48px}button:hover,.button:hover{filter:brightness(1.12)}button:disabled{opacity:.45;cursor:not-allowed}.secondary{background:#342d52;color:white;border:1px solid #776a98}.danger{background:#a44963;color:white}.row{display:flex;gap:11px;align-items:center;flex-wrap:wrap}.split{display:grid;grid-template-columns:1.35fr .85fr;gap:20px}.code{font:800 4rem 'Barlow Condensed';letter-spacing:.12em;color:#f4c860}.list{display:grid;gap:9px}.item{padding:14px;background:#292341;border-radius:11px;display:flex;align-items:center;gap:13px}.num{color:#f4c860;font:800 1.5rem 'Barlow Condensed';min-width:32px}.item .grow{flex:1}.small{font-size:.85rem;color:#bfb7d6}.banner{padding:16px 20px;border:1px solid #db9df3;background:#492a65;border-radius:13px;margin:14px 0}.error{background:#74304c;border-color:#ef799b}.show{min-height:calc(100vh - 180px);display:grid;place-items:center;position:relative;overflow:hidden;text-align:center;background:radial-gradient(ellipse at bottom,#76296980,transparent 55%),repeating-linear-gradient(120deg,#ffffff08 0 2px,transparent 3px 100px);border:1px solid #67408d;border-radius:24px;padding:35px}.show:before{content:'';position:absolute;inset:-80% -50%;background:conic-gradient(from 20deg,transparent 0 20%,#eeb7ff17 22%,transparent 26% 45%,#ffc46418 48%,transparent 53%);animation:lights 14s linear infinite;pointer-events:none}@keyframes lights{to{transform:rotate(360deg)}}.show>div{position:relative;width:100%}.show .eyebrow{color:#ffd47b}.show h1{font-size:clamp(3.4rem,9vw,8rem);text-shadow:0 10px 40px #000}.show h2{font-size:clamp(2rem,5vw,4rem)}.show .code{font-size:clamp(4rem,12vw,9rem)}.player{aspect-ratio:16/9;width:min(100%,960px);margin:18px auto;background:#000}.player iframe{width:100%;height:100%;border:0}.score{display:grid;gap:8px;max-width:850px;margin:20px auto}.score .item{background:#211a42dd;text-align:left;font-size:1.2rem}.score b:last-child{font:800 1.8rem 'Barlow Condensed';color:#f4c860}.reveal{font:800 clamp(2rem,6vw,5rem) 'Barlow Condensed';color:#ffd273;margin:15px}.winner{color:#ffd273;text-shadow:0 0 35px #ff9d59}.voting{max-width:650px;margin:auto}.vote-row{display:grid;grid-template-columns:100px 1fr;gap:12px;align-items:center}.vote-row strong{font:800 1.6rem 'Barlow Condensed';color:#ffd273}.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px;gap:12px;flex-wrap:wrap}.notice{margin-top:14px;color:#ffd7dc}.host-controls{position:sticky;bottom:12px;background:#17112de8;backdrop-filter:blur(15px);padding:14px;border-radius:14px;border:1px solid #675387;margin-top:20px;z-index:2}@media(max-width:780px){.grid,.split{grid-template-columns:1fr}.show{min-height:70vh;padding:20px}main{padding:24px 15px 80px}header{padding:0 15px}}

.connections strong{overflow-wrap:anywhere;color:#ffd273;font-size:1.15rem}.connections p{margin:8px 0}header a{flex-shrink:1;min-width:0}#status{margin-left:14px;text-align:right}@media(max-width:480px){header a{font-size:1rem}#status{font-size:.75rem;max-width:110px}.vote-row{grid-template-columns:80px 1fr}}

.order-buttons{margin:-4px 0 12px}.order-buttons button{font-size:.85rem;padding:8px 12px;min-height:38px}hr{border:0;border-top:1px solid #ffffff24;margin:20px 0}.intermission{padding:30px;text-align:center}.results-stage{height:calc(100dvh - 150px);min-height:0;overflow:hidden}.results-stage>div{flex-shrink:0}.results-stage .score{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:none;gap:6px}.results-stage .score .item{min-width:0;padding:9px}.results-stage h1{font-size:clamp(2rem,5vw,4rem);margin:0}.results-stage .reveal{font-size:clamp(1.5rem,3vw,2.5rem);margin:10px}.results-stage .score .grow{min-width:0;overflow-wrap:anywhere}@media(max-width:600px){.results-stage .score{grid-template-columns:1fr}.results-stage{height:calc(100dvh - 140px)}}

.results-stage{display:flex;align-items:center;justify-content:center;padding:20px}

#feedback{position:sticky;top:0;z-index:10;padding:16px 22px;color:#fff;background:#55336c;border-bottom:2px solid #f4c860;box-shadow:0 5px 15px #0004}#feedback[hidden]{display:none}

.recovery{justify-content:center;margin:24px 0}.item [data-remove]{font-size:.85rem;min-height:38px;padding:8px 12px}

#mobile-player .player{min-height:200px;min-width:200px}#mobile-player .player iframe{min-height:200px}

/* TV: reserve room for the player before sizing the headings. */
main:has(.playback-stage){max-width:1400px;padding:12px 18px 12px}
.playback-stage{min-height:0;padding:14px 22px;height:calc(100dvh - 104px)}
.playback-stage>div{height:100%;display:flex;flex-direction:column;align-items:center;gap:6px;min-height:0}
.playback-stage .eyebrow{font-size:clamp(.65rem,1.3vw,.9rem);flex-shrink:0}
.playback-heading{width:100%;height:clamp(58px,12dvh,108px);flex-shrink:0;display:flex;flex-direction:column;gap:3px}
.playback-stage .playback-heading h1{font-size:clamp(22px,4vw,52px);height:64%;margin:0;overflow:hidden;overflow-wrap:anywhere;line-height:1.02}
.playback-stage .playback-heading h2{font-size:clamp(16px,2.3vw,30px);height:36%;margin:0;overflow:hidden;overflow-wrap:anywhere;line-height:1.02}
.playback-stage .player{flex-shrink:0;margin:0 auto;max-width:100%}
.playback-stage p{margin:0;font-size:.75rem;flex-shrink:0}
.playback-stage .notice:empty{display:none}
.playback-stage .button,.playback-stage button{min-height:34px;padding:7px 12px;font-size:.8rem}
.playback-stage .recap-controls{justify-content:center;flex-shrink:0}
.playback-stage button[hidden]{display:none}
.playback-stage .intermission{justify-content:center}
@media(max-height:580px){.playback-stage{padding:8px}.playback-stage>div{gap:3px}.playback-heading{height:58px}.playback-stage .eyebrow{letter-spacing:.06em}.playback-stage .small{font-size:.65rem}}

/* Give the TV picture most of the viewport; keep controls outside YouTube. */
body:has(.playback-stage) header{height:42px;padding:0 14px}
body:has(.playback-stage) header a{font-size:1rem}
main:has(.playback-stage){max-width:1800px;padding:6px 10px}
.playback-stage{padding:8px 12px;border-radius:14px}
.playback-stage>div{gap:3px}
.playback-stage .playback-heading{height:clamp(44px,7dvh,76px)}
.playback-stage .playback-heading h1{font-size:clamp(22px,3vw,44px)}
.playback-stage .playback-heading h2{font-size:clamp(14px,1.6vw,24px)}
.playback-stage .player[hidden],.playback-stage [hidden]{display:none!important}
.playback-stage .show-controls{justify-content:center}
#show-interval{flex:1;display:flex;flex-direction:column;justify-content:center;gap:16px;width:100%;min-height:0;padding:14px}
#show-interval h1{font-size:clamp(2rem,6vw,5.5rem);overflow-wrap:anywhere}
#show-interval h2{font-size:clamp(1.5rem,3vw,3rem)}
#show-interval p{font-size:clamp(1rem,2vw,1.6rem)}
.favorites summary{cursor:pointer;font-weight:700;color:#f4c860}
.favorites .list{max-height:55vh;overflow:auto;margin-top:14px}
.favorite[aria-pressed="true"]{color:#f4c860;border-color:#f4c860}

/* FriendsMusicFestival identity, scoped to welcome surfaces. */
.brand-link{display:flex;align-items:center;max-width:380px;height:60px}
.brand-link img{display:block;width:100%;max-height:54px;object-fit:contain;object-position:left center}
body:has(.playback-stage) .brand-link{height:38px;max-width:280px}
body:has(.playback-stage) .brand-link img{max-height:36px}
.intro{max-width:1000px;margin:18px auto}
.brand-title{font-size:clamp(1.9rem,5.2vw,4.6rem);overflow-wrap:anywhere;margin:10px 0}
.intro .brand-slogan,.brand-slogan{color:#f4c860;font-size:clamp(.9rem,2vw,1.2rem);letter-spacing:.02em}
.brand-cover{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:22px;border:1px solid #a482bc66;margin:24px auto;box-shadow:0 16px 70px #0005}
.intro>p:not(.brand-slogan){max-width:740px;margin:18px auto;line-height:1.6}
.brand-steps{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 26px;margin:22px auto;color:#f4c860;font-weight:700}
.about-link{color:#e8b4fc;text-underline-offset:4px}
.intro .grid{text-align:left}
.show-brand{width:min(90%,760px);height:auto;max-height:180px;object-fit:contain;margin:0 auto 20px}
.show .welcome-title{font-size:clamp(2rem,5vw,4.5rem)}
@media(max-width:600px){.brand-link{max-width:230px}.brand-link img{max-height:44px}.brand-cover{border-radius:14px}.brand-steps{font-size:.85rem;gap:10px}.intro{margin:12px auto}}

/* Result announcer controls remain outside the TV content. */
.narrator-controls{justify-content:center;margin:8px auto;gap:10px}.narrator-controls button,.narrator-controls select{font-size:.85rem;padding:8px 12px}.narrator-controls label{display:flex;align-items:center;gap:8px;font-size:.85rem}.narrator-controls select{max-width:250px}

.tv-pair-form{max-width:420px;margin:24px auto;text-align:left}
