/* Viewport sizing only. The replay engine and its 400 x 600 world stay fixed. */
html{height:100%;overflow:hidden}body{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:0 max(6px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));gap:4px}header.glass{flex:none;width:100%;max-width:1280px;height:52px;min-height:52px;margin:0 auto;padding:7px 12px;position:relative;top:auto;border-radius:0 0 20px 20px;gap:8px}header .brand{font-size:15px;white-space:nowrap}header nav{display:flex;flex:none;min-width:0}#headerCountdown{font-size:10px;padding:7px 8px;flex:none}#headerProfile{height:36px;min-width:105px;max-width:180px;border-radius:22px;gap:7px;padding:7px 11px;background:linear-gradient(145deg,#ffffff20,#ffffff08);border:1px solid #ffffff45;box-shadow:inset 0 1px 1px #ffffff65,0 4px 14px #0003;backdrop-filter:blur(20px);font-size:11px;font-weight:600;letter-spacing:0}#headerName{max-width:130px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#headerProfile:not(.isLoggedIn) #headerName{max-width:none;overflow:visible;text-overflow:clip}#headerProfile .googleMark{width:17px;height:17px;flex:none}#headerProfile .avatar{display:none;font-size:17px}#headerProfile.isLoggedIn .googleMark{display:none}#headerProfile.isLoggedIn .avatar{display:inline-block}main{width:100%;max-width:1280px;margin:0 auto!important;padding:0;flex:1;min-height:0;display:flex;flex-direction:column}.intro,main>.rules,main>.legaltext,main>.foot{display:none!important}.layout{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:12px}.arena{min-height:0;min-width:0;padding:7px;display:flex;flex-direction:column;border-radius:20px}.musicTop{flex:none;height:32px;padding:0 3px 3px}.musicTop button{font-size:10px;padding:6px 12px;min-height:28px}.hud{height:49px;flex:none;padding:4px 7px 9px;gap:8px}.hud small{font-size:8px}.hud b{font-size:20px}.playframe{flex:1;min-height:0!important;height:auto!important;position:relative;overflow:hidden;background:radial-gradient(ellipse,#171029,#090616);border-radius:15px}.playframe canvas{position:absolute;inset:0;width:100%!important;height:100%!important;max-width:none;object-fit:contain;aspect-ratio:auto}.layout>.side{min-height:0;overflow:auto}.layout>.side>section:first-child{display:none}.screen{padding:18px;overflow:auto}.screen .inner{flex-shrink:0}.screen h2{font-size:clamp(23px,3vw,34px)}.introScreen #screenText{white-space:normal}.resultScreen #result{font-size:clamp(32px,6vw,48px)}
@media(max-width:850px){.layout{display:flex;gap:0}.arena{width:100%}.layout>.side{display:none!important}header.glass{height:48px;min-height:48px;padding:5px 10px}header .brand{font-size:14px}#headerProfile{min-width:100px;max-width:145px;height:34px;font-size:11px;padding:6px 9px}#headerName{max-width:90px}#headerCountdown{font-size:9px;padding:6px}.hud b{font-size:18px}.screen .inner{width:min(100%,350px)}}
@media(max-width:370px){header.glass{padding:5px 8px;gap:5px}header .brand{font-size:12px}#headerCountdown{font-size:8px;padding:6px}#headerProfile{min-width:97px;max-width:125px;font-size:10px;gap:6px}#headerName{max-width:72px}.hud small{font-size:7px}.hud b{font-size:17px}}
@media(max-height:700px){.introScreen .goalVisual{height:65px;margin-bottom:10px}.introScreen h2#screenTitle{font-size:25px;margin-bottom:14px}.introScreen #screenText{margin-bottom:18px}.introScreen #start{padding:13px}.screen{padding:14px}.screen:not(.introScreen) h2{font-size:24px}.screen:not(.introScreen) strong#result{font-size:36px}.screen:not(.introScreen) p{margin:8px 0}.screen:not(.introScreen) .action{padding:11px;margin-top:8px}}
@media(max-height:480px){header.glass{height:40px;min-height:40px}.arena{position:relative}.musicTop{position:absolute;right:9px;top:7px;z-index:5}.hud{height:40px;padding-right:110px}.hud b{font-size:15px}.hud small{font-size:7px}.screen{padding:8px}.introScreen .goalVisual{display:none}.introScreen h2#screenTitle{font-size:21px;margin-bottom:8px}.introScreen #screenText{margin-bottom:8px;padding:6px;font-size:9px}.introScreen #start{padding:10px;min-height:36px}.introScreen .startControls{margin-top:8px!important}.screen:not(.introScreen) h2{font-size:18px;margin:5px}.screen:not(.introScreen) strong#result{font-size:28px}.screen:not(.introScreen) p{font-size:11px;margin:4px}.screen:not(.introScreen) .action{padding:8px;margin-top:5px}.screen .refInviteEnd{padding:7px;margin-top:0}}
#headerProfile.isLoggedIn #headerName{white-space:normal;overflow-wrap:anywhere;text-overflow:clip;line-height:1.15;font-size:10px;max-height:25px;overflow:hidden}@media(max-width:370px){#headerProfile.isLoggedIn #headerName{font-size:9px}}

#headerRank{display:grid;place-items:center;flex:none;width:44px;min-width:44px;height:36px;padding:0;border-radius:22px;background:linear-gradient(145deg,#ffffff20,#ffffff08);border:1px solid #ffffff45;box-shadow:inset 0 1px 1px #ffffff65,0 4px 14px #0003;backdrop-filter:blur(20px);font-size:21px;cursor:pointer}#headerRank:hover{background-color:#ffffff18}#headerRank:focus-visible{outline:2px solid #00e5ff;outline-offset:2px}

.arena,.arena *,header button{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.playframe,.playframe canvas{touch-action:none}.arena button,header button{touch-action:manipulation}
