@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;800;900&display=swap');
:root{font-family:Nunito,Arial,sans-serif;color:#173d49;background:#d9f4ee;--teal:#079c9f;--navy:#183d50;--gold:#ffd65e}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:linear-gradient(130deg,#c8f4f1,#eefdf8)}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:focus-visible,select:focus-visible,input:focus-visible{outline:4px solid #ffd45c;outline-offset:2px}.view[hidden],[hidden]{display:none!important}
.brandbar{height:66px;background:#fffefc;display:flex;align-items:center;justify-content:space-between;padding:8px 3%;gap:12px;box-shadow:0 3px 0 #8ad7cc;position:relative;z-index:5}.brand{display:flex;align-items:center;text-decoration:none;gap:8px;color:#12394b}.brandball{font-size:34px}.brand strong{display:block;font-size:18px;font-weight:1000;line-height:1}.brand small{display:block;font-size:10px;letter-spacing:.14em;color:#09999a;font-weight:900}.preview{font-size:12px;font-weight:900;border-radius:25px;background:#d6f6f1;padding:7px 13px;color:#18747d}.utility{background:#f6ffff;border:2px solid #a9d5d4;border-radius:12px;color:#1c6a78;padding:8px 13px;font-weight:900}.brandbar .utility{font-size:24px;padding:0 12px}
main{max-width:1550px;margin:auto}.setup-grid{display:grid;grid-template-columns:minmax(290px,0.9fr) minmax(510px,1.1fr);gap:25px;padding:25px}.welcome-panel{position:relative;overflow:hidden;min-height:600px;border-radius:29px;background:linear-gradient(155deg,#03b9b5 0%,#087f93 67%,#09596e);color:#fff;padding:30px;box-shadow:0 9px 0 #0a788a45}.welcome-panel:before{content:'';position:absolute;border:4px solid #fff2;border-radius:50%;width:440px;height:440px;right:-210px;top:-225px}.round-seal{border:1px solid #fffb;background:#fff3;border-radius:50px;display:inline-flex;align-items:center;gap:9px;padding:7px 12px;font-size:24px}.round-seal span{font-size:12px;font-weight:1000;letter-spacing:.08em}.welcome-panel h1{font-size:clamp(54px,5vw,85px);line-height:.97;letter-spacing:-.06em;margin:35px 0 20px;text-shadow:0 5px 0 #00495288}.welcome-panel h1 em{font-style:normal;color:#ffe67b}.welcome-panel>p{font-size:19px;line-height:1.45;font-weight:800;max-width:460px}.tiny-stadium{display:flex;justify-content:space-around;align-items:end;padding:15px;border-radius:120px 120px 17px 17px;height:150px;background:repeating-linear-gradient(90deg,#59d28e 0 65px,#41b97a 66px 125px);border-top:7px solid #e3ffed;font-size:72px}.tiny-stadium .flag{font-size:40px}.rules{position:relative;background:#ffffff29;border:1px solid #ffffff5c;padding:15px 18px;border-radius:15px;margin-top:24px}.rules strong{color:#ffe179;font-size:18px}.rules p{margin:5px 0 0;font-size:14px;font-weight:800;line-height:1.5}
.card{background:white;border:3px solid #b9e2df;border-radius:27px;box-shadow:0 8px 0 #8dcac840,0 14px 25px #17677d22}.settings{padding:clamp(17px,2.5vw,30px)}.settings h2{margin:2px 0 19px;font-size:clamp(23px,2.3vw,31px);letter-spacing:-.025em}.football-icon{float:right}.field-row{display:flex;gap:14px;align-items:flex-start}.field-row>div{flex:1;min-width:0}.field-row .theme-control{flex:1.9}label,.section-label>span{font-size:14px;font-weight:900;color:#2a6f76;display:block;margin-bottom:7px}select{width:100%;background:#f1fffe;border:2px solid #a4d9d7;border-radius:12px;padding:11px 9px;color:#1f4956;font-weight:900;min-height:48px}#wordCount{font-size:12px;color:#639394;font-weight:800;display:block;margin-top:4px}.toggle-group{display:flex;gap:5px;flex-wrap:wrap}.toggle-group button{padding:9px 12px;font-weight:900;border:2px solid #b6d7d5;background:#eaf6f5;color:#225766;border-radius:11px;min-height:42px}.toggle-group.small button{min-height:37px;padding:6px 9px}.toggle-group button.selected{border-color:#dda823;background:#ffde71;color:#614702;box-shadow:0 2px 0 #bf9122}.section-label{margin:17px 0 9px;display:flex;align-items:center;justify-content:space-between;gap:8px}.section-label>span{margin:0}
.players{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.player-entry{display:flex;align-items:center;gap:10px;min-width:0;border:2px solid var(--team-color,#8dd);border-radius:16px;padding:9px;background:#f7fffe}.player-entry input{width:100%;min-width:0;border:0;border-bottom:2px dashed #acd1d0;background:transparent;color:#163f49;font-size:17px;font-weight:900}.input-wrap{min-width:0;flex:1}.input-wrap label{font-size:11px;margin:0 0 3px}.portrait{display:block;aspect-ratio:1;width:60px;border-radius:50%;border:3px solid white;background-color:#ffefdc;background-image:url('./explorer-portraits.png');background-size:400% auto;background-position:var(--px,0%) var(--py,0%);background-repeat:no-repeat;box-shadow:0 2px 5px #053c5259}.avatar-choice{border:0;background:transparent;padding:0;position:relative;flex-shrink:0}.avatar-choice:after{content:'✎';position:absolute;right:-3px;bottom:-4px;background:#ffdc62;border-radius:50%;border:2px solid white;width:21px;height:21px}.setup-tip{font-size:12px;color:#448084;font-weight:800;margin:12px 0}.primary{background:linear-gradient(#1cdda1,#05a779);color:white;border:0;border-bottom:5px solid #08785b;border-radius:17px;font-size:clamp(20px,2vw,28px);font-weight:1000;padding:15px;width:100%;text-shadow:0 2px 0 #00735e}.primary:active{transform:translateY(3px);border-bottom-width:2px}.error{font-weight:900;color:#bc4e3a;font-size:13px;min-height:13px}
#match{padding:12px 16px 20px}.match-head{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:9px}.match-head>div{border:2px solid #bad7d8;background:white;border-radius:15px;min-height:63px;box-shadow:0 3px 0 #aac1c4}.match-time{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 15px;min-width:115px;font-size:20px}.match-progress{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:8px 15px;min-width:143px}.match-progress small{font-size:11px;color:#567b88}.word-prompt{flex:1;max-width:760px;display:flex;align-items:center;justify-content:center;gap:15px;padding:6px 12px;font-size:clamp(22px,3vw,43px);font-weight:1000;min-width:0}.word-prompt span{text-align:center;overflow-wrap:anywhere}.word-prompt button{border:0;border-radius:14px;background:#def3fc;font-size:25px;padding:5px}.end-button{background:#e86b60;color:white;border:2px solid white;border-radius:50%;font-size:24px;width:42px;height:42px}
.stadium{position:relative;height:clamp(470px,52vw,670px);overflow:hidden;border:8px solid #eafff0;border-radius:27px;background:repeating-linear-gradient(0deg,#239b59 0 69px,#1b864b 70px 139px);box-shadow:0 7px 0 #49a572,0 13px 26px #0b4a4533}.stadium:before{content:'';position:absolute;inset:0;border-inline:4px solid #c6ffdc60;pointer-events:none}.crowd{height:120px;position:absolute;top:0;left:0;right:0;background:repeating-radial-gradient(circle at 10px 19px,#f4c39d 0 5px,#252a44 6px 12px,transparent 13px 21px),repeating-linear-gradient(90deg,#2d739c 0 21px,#2f4259 22px 43px);box-shadow:inset 0 -20px 0 #143b4d}.scoreboard{position:absolute;z-index:5;top:107px;left:1%;right:1%;display:flex;align-items:flex-start;justify-content:space-between;pointer-events:none;gap:6px}.score-card{display:flex;flex-direction:column;align-items:center;background:#fffdf7;border:3px solid var(--team-color);border-radius:15px;min-width:78px;max-width:125px;padding:6px 8px;box-shadow:0 4px 0 #0003;opacity:.86;flex:1}.score-card.active{box-shadow:0 0 0 3px #ffe46b,0 6px 10px #0003;opacity:1;transform:scale(1.035)}.score-card .portrait{width:45px;border-width:2px}.score-card b{font-size:13px;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.score-card strong{border-radius:8px;background:#244a65;color:white;font-size:13px;padding:2px 11px}
.goal-area{position:absolute;left:19%;right:19%;top:11%;height:58%;pointer-events:none;z-index:2}.goal-frame{position:relative;width:100%;height:100%;border:10px solid white;border-radius:11px;box-shadow:0 0 0 4px #46677b,0 7px 7px #0005;background:#0d535b9e;overflow:hidden;pointer-events:auto}.net{position:absolute;inset:0;background:repeating-linear-gradient(60deg,#e1ffff99 0 2px,transparent 2px 29px),repeating-linear-gradient(120deg,#e1ffff99 0 2px,transparent 2px 29px);pointer-events:none}.choices{position:absolute;top:8%;left:4%;right:4%;height:56%;z-index:3;display:flex;align-items:flex-start;justify-content:space-between;gap:1.5%}.choice{position:relative;width:32.5%;height:96%;display:flex;align-items:center;justify-content:center;background:#fffefa;border:4px solid #ffd274;border-radius:17px;box-shadow:0 5px 0 #c99833,0 8px 12px #0005;padding:8px;overflow:hidden}.choice:active{transform:translateY(4px)}.choice img{width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}.sprite-image{display:block;width:min(100%,225px);height:auto;max-height:100%;aspect-ratio:1;background-size:400% 400%;background-repeat:no-repeat;background-color:white;border-radius:9px;pointer-events:none}.choice .number{position:absolute;top:1px;left:2px;background:#28526a;color:white;display:grid;place-items:center;border-radius:50%;width:25px;height:25px;font-size:14px;font-weight:900}.choice.correct{background:#d9ffdf;border-color:#29c479}.choice.wrong{background:#ffe7e0;border-color:#ff8379}.keeper{position:absolute;z-index:4;left:50%;bottom:0;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;pointer-events:none;filter:drop-shadow(0 6px 3px #0006);transition:left .45s}.keeper-head{font-size:32px;background:#ffe0bd;border-radius:50%}.keeper-body{font-size:26px;background:linear-gradient(#ff993d,#ef672a);padding:3px 12px;color:white;border-radius:12px;font-weight:900}.keeper-body b{font-size:16px}.keeper-feet{font-size:20px}
.midline{position:absolute;bottom:16%;height:1.5%;background:#e1ffe599;left:0;right:0;transform:rotate(-3deg)}.ball-zone{position:absolute;left:50%;bottom:14%;transform:translateX(-50%);z-index:3}.ball-zone span{font-size:75px;display:inline-block;filter:drop-shadow(0 9px 5px #0005);transition:transform .45s cubic-bezier(.3,-.1,.3,1)}.ball-zone span.kicked{transform:translate(var(--ball-x,0px),var(--ball-y,-210px)) scale(.28) rotate(620deg);filter:drop-shadow(0 5px 3px #0002)}
.turnbar{position:absolute;z-index:4;bottom:4%;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:9px;min-width:min(370px,90%);padding:6px 12px;border:4px solid #fff;background:#163d52;color:white;border-radius:50px;justify-content:center;box-shadow:0 5px 10px #062e385b}.turnbar b{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.turnbar .portrait{width:40px;flex-shrink:0}.shot-timer{margin-left:auto;flex-shrink:0;border:4px solid #90e9ea;border-radius:50%;background:#03535c;color:white;width:57px;height:57px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1}.shot-timer #shotClock{font-size:22px;font-weight:1000}.shot-timer small{font-size:10px}.shot-timer.urgent{background:#f37232;border-color:#ffe268}
.feedback{position:absolute;z-index:7;left:50%;top:45%;transform:translate(-50%,-50%) rotate(-2deg);padding:10px 27px;border:5px solid white;border-radius:20px;background:#ffc947;box-shadow:0 7px 0 #b57f2b,0 11px 20px #003c4b80;font-size:clamp(28px,4.5vw,65px);font-weight:1000;white-space:nowrap;color:#10384a;text-shadow:0 2px #fff}.feedback.goal{background:#aaffbc}.feedback.miss{background:#ffd3af}.under-game{display:flex;align-items:center;justify-content:space-between;font-size:14px;color:#2d7578;font-weight:900;padding:13px 3px}
dialog{border:3px solid #73c7ca;border-radius:27px;max-width:min(640px,94vw);width:100%;padding:22px;background:white;box-shadow:0 15px 75px #002b3b88}dialog::backdrop{background:#062c3a9a}.avatar-dialog-top{display:flex;align-items:center;justify-content:space-between}.avatar-dialog-top h2{margin:0}.avatar-dialog-top button{border:0;background:#def3f1;border-radius:13px;padding:10px}.avatar-palette{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin-top:15px}.avatar-tile{border:3px solid #c4e5e5;background:#f9ffff;border-radius:16px;padding:10px}.avatar-tile .portrait{width:100%;max-width:110px;margin:auto}.avatar-tile.selected{border-color:#f3c74f;background:#fffae6}.avatar-tile span:last-child{display:block;font-weight:900;font-size:11px;color:#22606c}.results{max-width:750px;margin:clamp(25px,6vw,85px) auto;padding:30px;text-align:center}.trophy{font-size:90px}.eyebrow{letter-spacing:.17em;color:#168e9b;font-weight:900}.results h2{font-size:35px}.rankings{display:grid;gap:10px;margin:25px 0}.rank-row{display:flex;align-items:center;gap:15px;background:#eaf8f5;border:2px solid var(--team-color);padding:10px;border-radius:13px;font-size:20px;font-weight:900}.rank-row .portrait{width:50px}.rank-row .rank-score{margin-left:auto}.result-actions{display:flex;gap:12px}.result-actions button{flex:1}.secondary{border:2px solid #afd3d1;background:#ecf9f8;border-radius:15px;color:#246b75;font-weight:900;padding:12px}
@media(max-width:960px){.setup-grid{grid-template-columns:1fr}.welcome-panel{min-height:0}.tiny-stadium{display:none}.welcome-panel h1{font-size:54px;margin:15px 0}.welcome-panel>p{max-width:none}.rules{margin-top:10px}.stadium{height:65vh;min-height:450px}.scoreboard{top:95px}.goal-area{left:19%;right:19%}.score-card{min-width:66px}}
@media(max-width:600px){.preview{display:none}.setup-grid{padding:12px;gap:12px}.welcome-panel{padding:19px}.welcome-panel h1{font-size:45px;margin:12px 0}.welcome-panel>p{font-size:14px}.round-seal{font-size:17px}.round-seal span{font-size:10px}.rules{display:none}.settings{padding:14px}.field-row{flex-wrap:wrap}.field-row>div{flex:auto}.field-row .theme-control{flex-basis:100%}.players{grid-template-columns:1fr}.player-entry .portrait{width:48px}.section-label{flex-wrap:wrap}.match-head{gap:4px}.match-head>div{min-height:52px}.match-time{min-width:0;padding:4px 6px;font-size:14px}.match-time strong{font-size:16px}.match-progress{min-width:85px;padding:4px;font-size:11px}.match-progress strong{font-size:12px}.word-prompt{font-size:18px;padding:4px}.word-prompt button{font-size:17px;padding:4px}.end-button{width:33px;height:33px;font-size:16px}#match{padding:8px 5px}.stadium{height:62vh;min-height:405px;border-width:4px}.crowd{height:75px}.goal-area{left:10%;right:10%;top:14%;height:52%}.goal-frame{border-width:6px}.scoreboard{top:73px;left:1%;right:1%;gap:3px}.score-card{max-width:78px;min-width:0;padding:3px;flex:0 1 23%}.score-card .portrait{width:30px}.score-card b{font-size:10px}.score-card strong{font-size:10px}.choices{top:6%;gap:2%}.choice{border-width:2px;border-radius:8px;padding:4px}.choice .number{width:18px;height:18px;font-size:10px}.keeper-head{font-size:21px}.keeper-body{font-size:19px;padding:2px}.keeper-feet{font-size:12px}.ball-zone span{font-size:55px}.turnbar{min-width:80%;bottom:4%;border-width:2px}.turnbar b{font-size:12px}.shot-timer{width:46px;height:46px}.avatar-palette{gap:5px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

.audio-controls,.match-audio{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin:12px 0}.audio-chip{border:2px solid #9dcbd0;border-radius:16px;background:#f4fbfc;color:#416b76;padding:7px 12px;font-weight:900;font-size:12px}.audio-chip.on{border-color:#3cafad;background:#daffef;color:#176c5b}.audio-controls:before{content:'Sound';font-weight:900;align-self:center;color:#2c787e;font-size:13px}.match-audio{margin:5px 10px}.match-audio button{font-size:11px;padding:5px 7px}
@media(max-width:600px){.match-audio{gap:3px;order:2;flex-basis:100%;justify-content:flex-start}.match-audio button{font-size:10px;padding:4px 5px}.under-game{flex-wrap:wrap;gap:7px}}
