:root{color-scheme:dark;font-family:system-ui,sans-serif;background:#190d29;color:#fff}*{box-sizing:border-box}body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at 10% 20%,#87366e88,transparent 40%),radial-gradient(ellipse at 90% 18%,#ac651977,transparent 35%),#190d29}main{width:min(100%,500px);margin:auto;padding:max(8px,env(safe-area-inset-top)) 10px max(8px,env(safe-area-inset-bottom))}header,nav{display:flex;align-items:center;justify-content:space-between;gap:8px}h1{margin:0;color:#ffc344;font-size:clamp(1.7rem,8vw,2.6rem);font-style:italic;text-shadow:0 3px #7b3516,0 0 18px #fd8a3377}button,a{font:inherit;color:inherit;font-weight:700}a{text-decoration:none}button{background:#39204c;border:1px solid #b875df88;border-radius:12px;padding:9px 12px;cursor:pointer}button:disabled{opacity:.5}#lobby{padding:20px;margin-top:12px;background:#321744;border-radius:20px}#lobby button,#restart{display:block;width:100%;margin:12px 0;background:linear-gradient(#ffda72,#f79d20);color:#301708;min-height:48px;border:0}nav{margin:8px 0;font-size:.8rem}.hud{padding:9px 12px;background:#321744;border:1px solid #b875df88;border-radius:12px;font-weight:700}.hud.active{border-color:#ffcc62}.court{position:relative;height:clamp(240px,52dvh,560px);margin:4px 0;border-radius:16px;overflow:hidden;background:radial-gradient(ellipse at 20% 12%,#d7906188,transparent 27%),radial-gradient(ellipse at 90% 20%,#953dc099,transparent 35%),linear-gradient(160deg,#39164f,#5e275d 40%,#180b2b)}canvas{display:block;width:100%;height:100%;touch-action:none;user-select:none;-webkit-user-select:none}#effect{position:absolute;top:35%;left:50%;transform:translateX(-50%);font-size:1.35rem;font-weight:900;color:#ffe79b;text-shadow:0 2px 4px black;pointer-events:none;white-space:nowrap}#status,.hint{text-align:center;margin:6px 0}#status{font-weight:800;color:#ffdc89}.hint,details{font-size:.8rem}details label{display:flex;justify-content:space-between}details input{width:65%}[hidden]{display:none!important}:focus-visible{outline:2px solid white;outline-offset:2px}
#onlineLobby{border-bottom:1px solid #b875df88;padding-bottom:12px;margin-bottom:12px}.join,.matchrow{display:flex;gap:8px;align-items:center}.join input{min-width:0;flex:1;padding:9px;border-radius:8px;border:1px solid #b875df88;background:#190d29;color:white}#onlineMatches button{margin:4px 0;min-height:38px;font-size:.85rem}.matchrow button:first-child{flex:1}.matchrow button:last-child:not(:first-child){width:auto}#onlineInvite{padding:8px;font-size:.85rem}#onlineStatus{font-size:.85rem;color:#ffdc89}
#chat,#stats{font-size:.85rem}#chat{background:#321744;border:1px solid #ad64d466;border-radius:10px;padding:8px}#messages{max-height:155px;overflow:auto;padding:8px 0;display:flex;flex-direction:column;gap:5px}.message{align-self:flex-start;max-width:85%;background:#532a67;border-radius:8px;padding:6px 9px;overflow-wrap:anywhere}.message.mine{align-self:flex-end;background:#76531a}#chatBadge{color:#ffd37b}#rematch{width:100%;margin:6px 0;color:#ffd37b}
/* Arcade finish, responsive without heavy image requests. */
.court{background:radial-gradient(circle at 13% 12%,#ffd39fbb 0 1.5%,transparent 4%),radial-gradient(circle at 34% 5%,#ffb466bb 0 1%,transparent 3%),radial-gradient(circle at 63% 9%,#ffca7b99 0 1.4%,transparent 4%),radial-gradient(circle at 86% 15%,#ffbb6d99 0 1.5%,transparent 4%),radial-gradient(ellipse at 15% 34%,#b050a688,transparent 35%),radial-gradient(ellipse at 88% 28%,#ae54f288,transparent 38%),linear-gradient(160deg,#321340,#6a245d 38%,#1c0d2d);box-shadow:inset 0 0 30px #170a27aa,0 0 16px #a33ce833}.hud{background:linear-gradient(100deg,#512361,#25132e);box-shadow:0 0 10px #b645e733}.hud.active{box-shadow:0 0 10px #ffbc3f44}header h1{letter-spacing:-.04em;text-shadow:0 2px #fff1b2,0 4px #a54d1b,0 0 20px #f3a02788}#onlineLobby button[data-open-friends],#onlineInvite button{font-size:.83rem}#invitations .matchrow{flex-wrap:wrap}#invitations .matchrow button{width:auto;min-height:36px;padding:6px}#game nav{margin:5px 0}@media(max-height:740px){.court{height:clamp(220px,47dvh,430px)}.hud{padding:6px 10px}#status,.hint{margin:4px 0}header h1{font-size:1.7rem}}

#houseRules{border:1px solid #ad64d4;border-radius:12px;padding:10px;margin:12px 0;display:grid;gap:6px}#houseRules legend{font-weight:700;color:#ffdc89}#houseRules label{font-size:.85rem}#houseRules select{width:100%;min-height:42px;background:#25132e;color:#fff;border:1px solid #b875df;border-radius:8px;padding:7px;font-size:16px}#houseRules p{font-size:.78rem;margin:4px 0}#activeRules{color:#ffd37b}

.shot-options{display:flex;gap:6px;justify-content:center;margin:4px 0}.shot-options button{flex:1;padding:6px;font-size:.82rem;min-height:36px}.shot-options button[aria-pressed=true]{background:#ffcf72;color:#311608}#swat{width:100%;min-height:44px;background:#f2ab36;color:#321744;font-weight:800;margin:4px 0}
