*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;overflow:hidden;background:#d9f5c8;font-family:"Rubik","Varela Round",Arial,sans-serif;color:#2c4a1c;user-select:none;-webkit-user-select:none;touch-action:none}
.screen{position:fixed;inset:0;display:none;flex-direction:column;align-items:center}
.screen.active{display:flex}
.iconbtn{width:48px;height:48px;border-radius:50%;border:2px solid #2fa04a;background:#fff;font-size:22px;flex:0 0 auto}
#game{padding:0}
.bar{display:flex;align-items:center;gap:6px;width:100%;max-width:900px;padding:6px;flex:0 0 auto}
@media(max-width:430px){.pill{font-size:16px!important;padding:8px 4px!important}.bar{gap:4px;padding:6px 4px}}
.pill{flex:1;min-width:0;text-align:center;background:#fff;border-radius:999px;padding:8px 8px;font-weight:900;font-size:19px;box-shadow:0 3px 0 #0001;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:ltr}
#wrap{flex:1;width:100%;min-height:0;display:flex;align-items:center;justify-content:center;padding:0 4px 4px}
canvas#cv{display:block;border-radius:14px;box-shadow:0 6px 0 #1d6a2e;touch-action:none;cursor:pointer;max-width:100%;max-height:100%}
/* 3D look (football3d.js): the 2D canvas becomes a transparent input / meter layer above the 3D canvas */
body.f3d #wrap{position:relative}
body.f3d canvas#cv{position:absolute;inset:0;width:100%!important;height:100%!important;max-width:none;max-height:none;opacity:1;box-shadow:none;border-radius:0;z-index:1;background:transparent}
#conf{position:fixed;inset:0;pointer-events:none;z-index:21}
#toast{position:fixed;left:50%;top:18%;transform:translateX(-50%);background:#fff;border:3px solid #2fa04a;border-radius:16px;padding:8px 14px;font-weight:800;font-size:19px;z-index:16;pointer-events:none;display:none;max-width:90vw;text-align:center}
#toast{font-size:14px!important;padding:3px 12px!important;border-width:2px!important;border-radius:999px!important;opacity:.93;white-space:nowrap;max-width:none!important}
#toast.on{display:block;animation:pop2 .25s}@keyframes pop2{from{transform:translateX(-50%) scale(.3)}}
#hint{position:fixed;bottom:6px;left:50%;transform:translateX(-50%);font-size:13px;background:#ffffffd9;border-radius:999px;padding:3px 12px;pointer-events:none;display:none;white-space:nowrap}#hint:empty{display:none!important}
.desk #hint{display:block}
.desk .iconbtn{width:52px;height:52px}
#pad{direction:ltr;display:none;width:100%;max-width:520px;align-items:center;justify-content:space-between;padding:4px 22px calc(var(--sab,8px) + 6px);flex:0 0 auto;touch-action:none}
.padon #pad{display:flex}
#stick{position:relative;width:128px;height:128px;border-radius:50%;background:radial-gradient(#ffffffd0,#ffffff88);border:4px solid #2fa04a;box-shadow:0 5px 0 #1d6a2e55,inset 0 0 16px #2fa04a33;touch-action:none;flex:0 0 auto}
#stick::before{content:"";position:absolute;inset:14px;border-radius:50%;border:3px dashed #2fa04a55}
#stick .arr{position:absolute;font-size:15px;color:#2fa04a;opacity:.7;pointer-events:none}
#thumb{position:absolute;left:50%;top:50%;width:62px;height:62px;margin:-31px 0 0 -31px;border-radius:50%;background:linear-gradient(#ffb35c,#f08a24);border:3px solid #fff;box-shadow:0 4px 0 #b65f10;pointer-events:none;transition:transform .08s}
#thumb.drag{transition:none}
#kickBtn{width:104px;height:104px;border-radius:50%;border:4px solid #fff;background:linear-gradient(#ff8a8a,#e23b3b);color:#fff;font:900 18px Rubik,Arial;box-shadow:0 6px 0 #9a2020;touch-action:none;flex:0 0 auto;line-height:1.1}
#kickBtn:active,#kickBtn.on{transform:translateY(4px);box-shadow:0 2px 0 #9a2020}
#padBtn.on{background:#2fa04a;color:#fff}
.padon canvas#cv{cursor:default}
.penmode #stick{display:none}.penmode #pad{justify-content:center}.penmode #kickBtn{width:128px;height:128px;font-size:20px;background:linear-gradient(#ffd54a,#f2a900);box-shadow:0 6px 0 #a87400;color:#4a3300}
#cupRow{display:none;gap:6px;flex-wrap:wrap;justify-content:center;align-items:center}#cupRow.on{display:flex}
.shirt{width:44px;height:44px;border-radius:50%;border:3px solid #fff;box-shadow:0 2px 0 #0003;font-size:18px;padding:0}.shirt.sel{border-color:#2c4a1c;transform:scale(1.12)}.shirt.lock{opacity:.35;filter:grayscale(1)}
#cupBar{display:flex;gap:4px;justify-content:center;font-size:22px;margin:2px 0}
.an-menu{--an-accent:#2f7d32}
.an-set{display:flex;flex-direction:column;gap:8px}.an-set>b{font-size:15px;color:var(--an-soft);font-weight:600}.an-set .an-chips{justify-content:flex-start}
#over #overS{font-size:44px}#over #overD{font-weight:700}#over .an-body{align-items:center}
#best{white-space:pre-line;text-align:center;font-size:15px;color:var(--an-soft)}
.an-sheet kbd{font:700 12px monospace}
kbd{background:#fff;border:1px solid #2fa04a;border-radius:5px;padding:0 5px;font:700 12px monospace}

/* short landscape phone: the controls float in the two bottom corners, so the pitch gets the full height (it was ~130px wide) */
@media (orientation:landscape) and (max-height:520px) and (pointer:coarse){
 .padon #pad{position:fixed;left:0;right:0;bottom:0;width:100%;max-width:none;padding:0 max(18px,env(safe-area-inset-left)) calc(var(--sab,8px) + 4px);pointer-events:none;z-index:5}
 .padon #pad>*{pointer-events:auto}
 .penmode #pad{justify-content:flex-end}.penmode #kickBtn{width:104px;height:104px;font-size:18px}
}
/* ===== desktop fit (laptop & big monitors) ===== */
html.desk .screen{overflow-y:auto}
