
:root{font-family:ui-rounded,'Arial Rounded MT Bold',Arial,sans-serif;color:#fff;background:#438d49;font-synthesis:none}*{box-sizing:border-box}html,body{touch-action:manipulation;margin:0;width:100%;height:100%;overscroll-behavior:none}main{touch-action:manipulation;height:100dvh;min-height:380px;position:relative;overflow:hidden}#pitch{position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none}header{position:absolute;top:0;left:0;right:0;padding:max(12px,env(safe-area-inset-top)) 18px 12px;background:linear-gradient(#153c35d9,#153c3500);display:flex;align-items:center;flex-wrap:wrap;gap:10px;pointer-events:none}.brand{font-size:23px;font-weight:900;flex:1;text-shadow:0 2px 2px #203e41}.brand small{font-size:13px;background:#fff;color:#703caf;padding:4px 7px;border-radius:8px;vertical-align:middle}button{font-family:inherit;font-weight:900;border:0;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none}button:focus-visible{outline:4px solid #ffeb87;outline-offset:3px}header button{pointer-events:auto;width:42px;height:42px;background:#fffef0;color:#4b2b73;border-radius:12px;font-size:26px}.scores{display:flex;justify-content:center;gap:10px;width:100%;font-size:14px}.scores span{background:#183d35c9;padding:8px 13px;border:1px solid #ffffff4d;border-radius:13px}.scores b{font-size:20px;font-variant-numeric:tabular-nums}.progress{display:flex;gap:5px;margin:auto}.progress span{display:grid;place-items:center;background:#143d35a6;border:1px solid #ffffff55;width:22px;height:22px;border-radius:50%;font-size:13px}.progress .active{background:white;color:#6436a5}.progress .win{background:#ffe187;color:#734b00}.labels{position:absolute;inset:0;pointer-events:none}.labels span{position:absolute;transform:translate(-50%,-100%);background:#fff9f0;color:#62389a;padding:3px 7px;border-radius:7px;font-size:11px;font-weight:900;box-shadow:0 2px 3px #183d3540;white-space:nowrap}.labels #tagger{color:#b2440d}.bottom{position:absolute;bottom:0;left:0;right:0;padding:12px 16px max(16px,env(safe-area-inset-bottom));background:linear-gradient(transparent,#153c3566);pointer-events:none}#cue{text-align:center;font-size:14px;font-weight:bold;text-shadow:0 1px 4px #102c22;margin:0 0 14px}.controls{display:flex;align-items:center;justify-content:space-between;gap:14px;max-width:950px;margin:auto;pointer-events:auto}.controls button{width:clamp(80px,22vw,120px);height:82px;border-radius:23px;background:#fffdf1;color:#6842aa;font-size:31px;border-bottom:6px solid #c9b4e4;box-shadow:0 5px 15px #163d3430}.controls #pass{background:#8151c8;border-color:#51278e;color:#fff;width:clamp(94px,26vw,140px)}.controls small{display:block;font-size:14px;margin-top:3px}.controls button:active,.controls button.held{transform:translateY(3px);border-bottom-width:3px}.controls button:disabled{opacity:.45}.overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#17392c55;padding:140px 18px 130px}.overlay[hidden]{display:none}.card{color:#3c2757;background:#fffcf0;max-width:360px;width:100%;text-align:center;padding:22px;border-radius:24px;box-shadow:0 8px 0 #24363344;max-height:100%;overflow:auto}.reward{font-size:44px}#eyebrow{font-size:12px;font-weight:bold;color:#80599a}h1{font-size:31px;line-height:1.05;margin:10px 0}p{font-size:17px;line-height:1.4}.howto{display:flex;justify-content:space-around;background:#f0e9f7;border-radius:15px;padding:10px}.howto span{font-size:28px}.howto b{display:block;font-size:14px}.howto[hidden]{display:none}.card button{width:100%;font-size:21px;background:#7a46c7;color:white;border-radius:14px;padding:16px;margin-top:16px}.card #sub{font-size:12px;color:#796c88;margin:12px 0 0}.card.success .reward{animation:cheer .6s ease-out}@keyframes cheer{from{transform:scale(.5) rotate(-15deg)}to{transform:scale(1)}}@media(max-height:650px){.overlay{padding-top:105px;padding-bottom:105px}.card{padding:14px}.reward{font-size:28px}h1{font-size:25px}p{font-size:15px;margin:8px 0}.howto{padding:5px}.card button{padding:12px;margin-top:10px}.controls button{height:67px}.brand{font-size:19px}header{gap:5px}.scores span{padding:5px 10px}#cue{margin-bottom:8px}}@media(orientation:landscape) and (max-height:600px){.overlay{padding:15px 130px}.card{max-width:400px}.howto{display:none}header{max-width:320px}.scores{justify-content:flex-start}.progress{margin:0}.bottom{padding:10px 25px}#cue{display:none}.card #sub{display:none}}@media(prefers-reduced-motion:reduce){*{animation:none!important}}
/* Rugby Arcade colours and shared branding. */
header{background:linear-gradient(#080c24ed,#080c2400)}.brand{display:flex;align-items:center;gap:10px;font-size:22px;letter-spacing:.3px}.brand img{width:44px;height:44px;border-radius:50%;flex-shrink:0}.brand em{font-style:normal;color:#ffbd28}.brand small{display:block;background:none;color:#ffdf98;font-size:11px;letter-spacing:2px;padding:3px 0 0}.scores span{background:#080c24d6;border-color:#dba12766}.progress .active{background:#ffc43b;color:#15102b}.progress .win{background:#ffcf58;color:#3b2300}.controls button{background:#fff9ec;color:#582192;border-color:#d8b769}.controls #pass{background:#67249b;border-color:#35104f}.card{background:#fffaf0;border-top:5px solid #e5a621}.card button{background:#642395;border-bottom:4px solid #39114f}.card #eyebrow{color:#603086;letter-spacing:.8px}.welcome-badge{width:84px;height:84px;border-radius:50%;display:block;margin:0 auto 10px}.howto{background:#f0e5f7}header button{color:#552389}.labels #you,.labels #friend{background:#100f21;color:#ffd061;border:1px solid #dfa92c}.bottom{background:linear-gradient(transparent,#080c2480)}@media(max-width:370px){.brand{font-size:18px;gap:7px}.brand img{width:36px;height:36px}}@media(max-height:650px){.welcome-badge{width:46px;height:46px;margin-bottom:5px}.brand img{width:36px;height:36px}}
.card .secondary{background:#fffaf0;color:#59258a;border:2px solid #78439d;padding:10px;font-size:17px;margin-top:10px}header #exit-demo{width:auto;font-size:13px;padding:0 10px;background:#ffcf58;color:#271437}.controls button.demo-key:disabled{opacity:1;background:#ffce45;color:#28153a;border-color:#d59712;outline:5px solid white;outline-offset:3px;transform:translateY(-3px);box-shadow:0 0 22px #ffdc66}.controls #pass.demo-key:disabled{background:#ffce45;color:#28153a}.card button[hidden],header button[hidden]{display:none}
#instructions{border:3px solid #e3ad35;border-radius:22px;background:#fffaf0;color:#352047;padding:20px;width:min(92vw,410px);max-height:88dvh;overflow:auto;box-shadow:0 12px 50px #0006}#instructions::backdrop{background:#080c24b0}.help-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.help-heading h2{font-size:25px;margin:0}.help-heading button{width:40px;height:40px;background:#eee2f5;color:#542783;border-radius:12px;font-size:27px;flex-shrink:0}.help-steps{padding-left:25px;margin:15px 0}.help-steps li{padding-left:3px;margin:15px 0}.help-steps b,.help-steps span{display:block}.help-steps b{font-size:18px;margin-bottom:4px}.help-steps span{font-size:16px;line-height:1.4}.help-note{background:#f0e5f7;padding:12px;border-radius:12px;font-size:15px}#resume-help{width:100%;padding:14px;border-radius:14px;background:#642395;color:#fff;font-size:20px}@media(max-width:430px){header{gap:6px;padding-left:12px;padding-right:12px}header button{width:36px;height:38px;font-size:24px}.brand{font-size:18px;gap:6px}.brand img{width:35px;height:35px}.brand small{font-size:10px;letter-spacing:1px}}


/* Shared game branding and navigation. */
.brand .brand-home{display:flex;align-items:center;gap:10px;color:inherit;text-decoration:none;pointer-events:auto;min-height:44px}.brand img,.welcome-badge{border-radius:0}.brand em{color:#ffcf43}.brand .brand-home:focus-visible{outline:3px solid #ffcf43;outline-offset:4px;border-radius:6px}.brand small{letter-spacing:1px}.brand{font-size:20px}@media(max-width:430px){.brand{font-size:16px}.brand .brand-home{gap:6px}.brand small{font-size:10px}}
@media(max-width:430px){header:has(#exit-demo:not([hidden])) .brand{font-size:13px}header:has(#exit-demo:not([hidden])) .brand img{width:27px;height:30px}header:has(#exit-demo:not([hidden])) .brand small{font-size:8px;letter-spacing:.5px}header:has(#exit-demo:not([hidden])) .brand-home{gap:4px}header:has(#exit-demo:not([hidden])) .brand-home>div{white-space:nowrap}header:has(#exit-demo:not([hidden])) button{width:30px;font-size:20px}header #exit-demo{font-size:10px!important;padding:0 6px}}

/* Shared, touch-sized game navigation. Pause stays on the pitch. */
header #game-menu-toggle,header #pause{width:44px;height:44px;flex-shrink:0}
header{z-index:4}
#game-menu{position:fixed;inset:max(12px,env(safe-area-inset-top)) 12px auto auto;margin:0;width:min(320px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:18px;border:3px solid #e3ad35;border-radius:20px;background:#fffaf0;color:#352047;box-shadow:0 12px 50px #0006}
#game-menu::backdrop{background:#080c2499}
#game-menu nav{display:grid;gap:8px;margin:16px 0}
#game-menu nav a,#game-menu nav button,#back-to-game{display:block;text-align:left;width:100%;min-height:46px;padding:12px 14px;border-radius:12px;background:#eee2f5;color:#542783;text-decoration:none;font:700 16px Arial,sans-serif;touch-action:manipulation}
#game-menu #back-to-game{background:#642395;color:#fff;text-align:center}
#game-menu button[hidden],.summary-home[hidden]{display:none!important}
.card .summary-home{display:block;background:#fffaf0;color:#59258a;border:2px solid #78439d;border-radius:14px;padding:12px;text-decoration:none;font-weight:900;font-size:17px;text-align:center;margin-top:10px;min-height:46px}
.card-actions{flex-wrap:wrap}.card-actions .summary-home{flex:1;min-width:110px;margin:0}
.card-actions:has(.summary-home:not([hidden])) #watch-demo{flex-basis:100%}

#game-menu .game-menu-legal{display:flex;flex-wrap:wrap;gap:4px;border-top:1px solid #d9c8e3;padding-top:8px;margin-top:4px}
#game-menu .game-menu-legal a{flex:1;width:auto;padding:12px 6px;text-align:center;font-size:13px;background:transparent;text-decoration:underline}

#game-menu .game-menu-legal button{flex-basis:100%;width:100%;padding:12px 6px;text-align:center;font-size:13px;background:transparent;text-decoration:underline}
