*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;background:#000;color:#fff;overflow:hidden}
body{font-family:"Jersey 10",Impact,"Arial Black",sans-serif;touch-action:none;-webkit-user-select:none;user-select:none;letter-spacing:.02em}
button,input{font:inherit}
.screen{display:none;width:100%;height:100%;min-height:100dvh;background:#000;color:#fff}
.screen.active{display:flex}
.menu{margin:auto;width:min(88vw,520px);display:flex;flex-direction:column;align-items:stretch;gap:16px;text-align:center}
.home-menu{width:min(94vw,900px);align-items:center;gap:0;padding-top:max(10px,env(safe-area-inset-top))}
.pong-wordmark{font-family:"Fredoka","Arial Rounded MT Bold","Arial Black",sans-serif;font-weight:700;color:#fff;line-height:.78;letter-spacing:-.075em;white-space:nowrap;text-align:center}
.home-wordmark{font-size:clamp(160px,31vw,340px);transform:scaleX(1.06);margin:0 auto clamp(58px,10vh,108px)}
.secondary-wordmark{font-size:clamp(72px,14vw,122px);transform:scaleX(1.04);margin:0 auto 30px}
.controller-brand{position:absolute;top:max(14px,env(safe-area-inset-top));left:50%;transform:translateX(-50%) scaleX(1.04);font-size:clamp(48px,10vw,82px);z-index:3}
.home-buttons{display:flex;flex-direction:column;gap:24px;width:min(86vw,500px)}
.marquee-button{position:relative;padding:15px}
.marquee-button button{position:relative;z-index:2;width:100%;padding:18px 22px;font-size:clamp(24px,3.7vw,34px);letter-spacing:.045em}
.marquee-edge{position:absolute;display:block;pointer-events:none;z-index:1;background-repeat:repeat}
.marquee-top,.marquee-bottom{left:8px;right:8px;height:10px;background-image:radial-gradient(circle,#fff 0 4px,transparent 4.35px);background-size:12px 10px}
.marquee-left,.marquee-right{top:8px;bottom:8px;width:10px;background-image:radial-gradient(circle,#fff 0 4px,transparent 4.35px);background-size:10px 12px}
.marquee-top{top:0;animation:marqueeRight .72s linear infinite}
.marquee-right{right:0;animation:marqueeDown .72s linear infinite}
.marquee-bottom{bottom:0;animation:marqueeLeft .72s linear infinite}
.marquee-left{left:0;animation:marqueeUp .72s linear infinite}
@keyframes marqueeRight{to{background-position:12px 0}}
@keyframes marqueeDown{to{background-position:0 12px}}
@keyframes marqueeLeft{to{background-position:-12px 0}}
@keyframes marqueeUp{to{background-position:0 -12px}}
.join-menu{width:min(88vw,520px)}
.winner{font-size:clamp(34px,7vw,60px);line-height:1.15;margin-bottom:10px}
.choice-title{font-size:clamp(26px,6vw,46px);line-height:1.15;margin-bottom:12px}
button{border:3px solid #fff;background:#000;color:#fff;padding:18px 14px;font-weight:400;font-size:clamp(20px,3.6vw,30px);line-height:1.08;letter-spacing:.05em}
button:active{background:#fff;color:#000}
button:disabled{border-style:dashed;opacity:.4}
.home-buttons{position:relative;z-index:2;display:flex;flex-direction:column;gap:18px;width:min(84vw,480px)}
#createBtn,#soloBtn{position:relative;z-index:2;width:100%;padding:18px 22px;font-size:clamp(24px,3.7vw,34px);letter-spacing:.045em}
.button-cluster{position:relative;display:inline-flex;justify-content:center;align-items:center;padding:24px 42px 26px;margin:0 auto}
.start-button-cluster{margin-top:6px;padding:20px 30px 22px}
.button-lights{position:absolute;inset:0;pointer-events:none}
.button-lights span{position:absolute;width:8px;height:8px;border-radius:50%;background:#fff;opacity:.16;animation:chase 2s steps(1,end) infinite}
.button-lights-large span:nth-child(1){top:3px;left:4%;animation-delay:0.00s}
.button-lights-large span:nth-child(2){top:3px;left:12%;animation-delay:0.05s}
.button-lights-large span:nth-child(3){top:3px;left:20%;animation-delay:0.10s}
.button-lights-large span:nth-child(4){top:3px;left:28%;animation-delay:0.15s}
.button-lights-large span:nth-child(5){top:3px;left:36%;animation-delay:0.20s}
.button-lights-large span:nth-child(6){top:3px;left:44%;animation-delay:0.25s}
.button-lights-large span:nth-child(7){top:3px;left:52%;animation-delay:0.30s}
.button-lights-large span:nth-child(8){top:3px;left:60%;animation-delay:0.35s}
.button-lights-large span:nth-child(9){top:3px;left:68%;animation-delay:0.40s}
.button-lights-large span:nth-child(10){top:3px;left:76%;animation-delay:0.45s}
.button-lights-large span:nth-child(11){top:3px;left:84%;animation-delay:0.50s}
.button-lights-large span:nth-child(12){top:3px;left:92%;animation-delay:0.55s}
.button-lights-large span:nth-child(13){top:12%;right:3px;animation-delay:0.60s}
.button-lights-large span:nth-child(14){top:23%;right:3px;animation-delay:0.65s}
.button-lights-large span:nth-child(15){top:34%;right:3px;animation-delay:0.70s}
.button-lights-large span:nth-child(16){top:45%;right:3px;animation-delay:0.75s}
.button-lights-large span:nth-child(17){top:56%;right:3px;animation-delay:0.80s}
.button-lights-large span:nth-child(18){top:67%;right:3px;animation-delay:0.85s}
.button-lights-large span:nth-child(19){top:78%;right:3px;animation-delay:0.90s}
.button-lights-large span:nth-child(20){top:89%;right:3px;animation-delay:0.95s}
.button-lights-large span:nth-child(21){bottom:3px;left:92%;animation-delay:1.00s}
.button-lights-large span:nth-child(22){bottom:3px;left:84%;animation-delay:1.05s}
.button-lights-large span:nth-child(23){bottom:3px;left:76%;animation-delay:1.10s}
.button-lights-large span:nth-child(24){bottom:3px;left:68%;animation-delay:1.15s}
.button-lights-large span:nth-child(25){bottom:3px;left:60%;animation-delay:1.20s}
.button-lights-large span:nth-child(26){bottom:3px;left:52%;animation-delay:1.25s}
.button-lights-large span:nth-child(27){bottom:3px;left:44%;animation-delay:1.30s}
.button-lights-large span:nth-child(28){bottom:3px;left:36%;animation-delay:1.35s}
.button-lights-large span:nth-child(29){bottom:3px;left:28%;animation-delay:1.40s}
.button-lights-large span:nth-child(30){bottom:3px;left:20%;animation-delay:1.45s}
.button-lights-large span:nth-child(31){bottom:3px;left:12%;animation-delay:1.50s}
.button-lights-large span:nth-child(32){bottom:3px;left:4%;animation-delay:1.55s}
.button-lights-large span:nth-child(33){top:89%;left:3px;animation-delay:1.60s}
.button-lights-large span:nth-child(34){top:78%;left:3px;animation-delay:1.65s}
.button-lights-large span:nth-child(35){top:67%;left:3px;animation-delay:1.70s}
.button-lights-large span:nth-child(36){top:56%;left:3px;animation-delay:1.75s}
.button-lights-large span:nth-child(37){top:45%;left:3px;animation-delay:1.80s}
.button-lights-large span:nth-child(38){top:34%;left:3px;animation-delay:1.85s}
.button-lights-large span:nth-child(39){top:23%;left:3px;animation-delay:1.90s}
.button-lights-large span:nth-child(40){top:12%;left:3px;animation-delay:1.95s}
@keyframes chase{0%,100%{opacity:.12;transform:scale(1)}12%{opacity:1;transform:scale(1.55)}24%{opacity:.45;transform:scale(1.15)}}
.tiny,#displayLobbyStatus{font-size:clamp(16px,2.5vw,22px);line-height:1.35;letter-spacing:.06em}
.room-code{font-size:clamp(42px,10vw,76px);letter-spacing:.08em;line-height:1.05}
.seat-status{font-size:clamp(22px,4vw,32px);line-height:1.45;letter-spacing:.04em}
.game-screen,.controller-screen{position:relative;align-items:stretch;justify-content:stretch}
#gameCanvas{display:block;width:100%;height:100%;background:#000}
.qr{display:flex;align-items:center;justify-content:center;min-height:220px;margin-bottom:4px}
.qr canvas{width:min(260px,68vw);height:min(260px,68vw);image-rendering:pixelated;background:#fff;border:10px solid #fff}
.controller-label{position:absolute;top:max(78px,calc(env(safe-area-inset-top) + 66px));left:50%;transform:translateX(-50%);font-size:clamp(18px,2.5vw,24px);line-height:1.2;white-space:nowrap;text-align:center}
.dial-surface{position:absolute;inset:112px 0 58px;display:flex;align-items:center;justify-content:center;touch-action:none}
.controller-dial{position:relative;width:min(76vw,76vmin);max-width:520px;aspect-ratio:1;border:6px solid #fff;border-radius:50%;box-sizing:border-box}
.dial-rotor{position:absolute;inset:12%;border:6px solid #fff;border-radius:50%;transform:rotate(0deg);transform-origin:50% 50%;will-change:transform}
.dial-mark{position:absolute;left:50%;top:4%;width:8px;height:24%;background:#fff;transform:translateX(-50%)}
.end-game-btn{position:absolute;right:max(16px,env(safe-area-inset-right));bottom:max(58px,calc(env(safe-area-inset-bottom) + 46px));z-index:5;width:auto;min-width:120px;padding:10px 12px;border-width:2px;font-size:clamp(17px,2.5vw,22px);opacity:.75}
.end-game-btn.armed{background:#fff;color:#000;opacity:1}
.touch-hint{position:absolute;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);font-size:clamp(15px,2.2vw,20px);line-height:1.2;opacity:.7;white-space:nowrap;text-align:center}
.message{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#000;color:#fff;border:2px solid #fff;padding:12px 14px;display:none;text-align:center;max-width:90vw;z-index:20;font-size:clamp(16px,2.2vw,20px);line-height:1.2}
#endControls{display:flex;flex-direction:column;gap:14px}
.hidden{display:none!important}
@media (max-width: 640px){
  .home-wordmark{font-size:clamp(112px,30vw,150px);margin-bottom:clamp(54px,8vh,76px)}
  .secondary-wordmark{font-size:clamp(64px,18vw,90px);margin-bottom:24px}
  .controller-brand{font-size:clamp(46px,15vw,68px)}
  .home-buttons{width:min(88vw,430px);gap:20px}
  .marquee-button{padding:14px}
  .marquee-button button{font-size:clamp(19px,5vw,26px);padding:16px 16px}
}

/* Knob Grabbers v1.0 branding */
.logo-img{display:block;width:100%;height:auto;max-height:28vh;object-fit:contain}
.home-wordmark{width:min(92vw,820px)}.secondary-wordmark{width:min(74vw,470px)}.controller-brand{width:min(55vw,310px)}
