:root {
  --bg: #0b1410; --panel: #12201a; --panel2: #182b22; --line: #2a4436;
  --text: #eef5f0; --muted: #8fa89a; --accent: #ffd23f; --accent2: #3ee08f;
  --home: #7a5cff; --home-dark: #3c2a99; --away: #c0262d; --away-dark: #6e1015;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%; background: var(--bg); color: var(--text); overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
canvas#field { position: fixed; inset: 0; display: block; }
.hidden { display: none !important; }
.h { font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .02em; }

/* ---------- HUD ---------- */
.sb {
  position: fixed; top: calc(10px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex;
  background: rgba(8,14,11,.9); border: 1px solid #ffffff22; border-radius: 12px; overflow: hidden;
  box-shadow: 0 6px 20px #0008; font-weight: 800; z-index: 5; pointer-events: none;
}
.sb .tm { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.sb .ab { font-size: 13px; letter-spacing: .06em; }
.sb .sc { font-size: 22px; font-weight: 900; min-width: 24px; text-align: center; }
.sb .mid { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2px 12px; font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 64px; }
.sb .mid b { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; }
.poss { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); visibility: hidden; }
.poss.on { visibility: visible; }
.sit {
  position: fixed; top: calc(62px + var(--safe-t)); left: 50%; transform: translateX(-50%); background: var(--accent);
  color: #1a1400; font-weight: 900; font-size: 12px; padding: 3px 10px; border-radius: 999px; letter-spacing: .04em;
  white-space: nowrap; z-index: 5; pointer-events: none;
}
.sit:empty { display: none; }
.pause {
  position: fixed; top: calc(12px + var(--safe-t)); right: 12px; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid #ffffff2a; background: rgba(8,14,11,.85); font-weight: 900; font-size: 13px; z-index: 11;
}
.tip {
  position: fixed; left: 50%; transform: translateX(-50%); top: calc(94px + var(--safe-t)); z-index: 5;
  background: rgba(8,14,11,.92); border: 1px solid #ffffff22; border-left: 4px solid var(--accent);
  padding: 8px 12px; border-radius: 10px; font-size: 13px; width: max-content; max-width: min(92vw, 460px); line-height: 1.35; pointer-events: none;
}
.tip b { color: var(--accent); }
.banner {
  position: fixed; left: 0; right: 0; top: 36%; text-align: center; pointer-events: none; z-index: 7;
  opacity: 0; transform: scale(.9); transition: opacity .25s, transform .25s;
}
.banner.show { opacity: 1; transform: scale(1); }
.banner .big { font-size: min(52px, 11vw); color: var(--accent); text-shadow: 0 4px 0 #0008, 0 0 30px #ffd23f55; }
.banner .small { font-size: min(14px, 3.4vw); font-weight: 800; letter-spacing: .18em; text-transform: uppercase; text-shadow: 0 2px 6px #000; }

/* ---------- kick meter ---------- */
.meter {
  position: fixed; left: 50%; transform: translateX(-50%); top: calc(94px + var(--safe-t)); width: min(320px, 90vw);
  background: rgba(8,14,11,.94); border: 1px solid #ffffff22; border-radius: 14px; padding: 10px 12px; z-index: 6; pointer-events: none;
}
.meter .mtitle { font-size: 13px; font-weight: 900; margin-bottom: 8px; text-align: center; }
.meter .mtitle b { color: var(--accent); }
.meter .ttl { display: flex; justify-content: space-between; font-size: 11px; font-weight: 900; color: var(--muted); letter-spacing: .1em; }
.meter .ttl span:last-child { color: var(--accent2); }
.aim { position: relative; height: 18px; border-radius: 9px; margin: 6px 0 10px;
  background: linear-gradient(90deg,#ff5a5f,#ffb13b 25%,#3ee08f 42%,#3ee08f 58%,#ffb13b 75%,#ff5a5f); }
.needle { position: absolute; top: -4px; width: 4px; height: 26px; margin-left: -2px; background: #fff; border-radius: 2px; box-shadow: 0 0 6px #fff; left: 50%; }
.pow { position: relative; height: 18px; border-radius: 9px; background: #ffffff14; overflow: hidden; margin-top: 6px; }
.pow i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg,#3ee08f,#ffd23f 80%,#ff5a5f); }
.pow .mk { position: absolute; top: 0; bottom: 0; left: 93%; width: 2px; background: #fff8; }

/* ---------- touch ---------- */
#touch { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
#stickBase {
  position: fixed; width: 110px; height: 110px; border-radius: 50%; left: 30px; bottom: calc(40px + var(--safe-b));
  background: radial-gradient(circle,#ffffff14,#ffffff06); border: 2px solid #ffffff30; opacity: .45;
}
#stickBase.active { opacity: 1; }
#stickKnob {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#ffffffcc,#ffffff66); box-shadow: 0 4px 12px #0007;
}
.stick-hint { position: fixed; left: 24px; bottom: calc(160px + var(--safe-b)); font-size: 11px; color: #ffffff88; font-weight: 700; }
.btns { position: fixed; right: 16px; bottom: calc(26px + var(--safe-b)); width: 190px; height: 180px; pointer-events: none; }
.tb {
  position: absolute; border-radius: 50%; display: grid; place-items: center; font-weight: 900; text-align: center;
  border: 2px solid #ffffff55; box-shadow: 0 6px 16px #0008; line-height: 1.05; letter-spacing: .02em; pointer-events: auto;
  touch-action: none; transition: transform .06s, opacity .15s; padding: 4px;
}
.tb.down { transform: scale(.92); }
.tb.off { opacity: .25; pointer-events: none; }
.tb.a { right: 0; bottom: 0; width: 104px; height: 104px; background: radial-gradient(circle at 35% 30%,#ffe57a,#f0b400); color: #2a1e00; font-size: 14px; }
.tb.b { right: 112px; bottom: 6px; width: 72px; height: 72px; background: radial-gradient(circle at 35% 30%,#7af0b4,#1fb46d); color: #00230f; font-size: 11px; }
.tb.s { right: 22px; bottom: 116px; width: 62px; height: 62px; background: radial-gradient(circle at 35% 30%,#8fb3ff,#3a64d8); color: #fff; font-size: 10px; }
.keys { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; font-size: 12px; color: var(--muted); z-index: 4; pointer-events: none; }
.key { white-space: nowrap; background: rgba(8,14,11,.88); border: 1px solid #ffffff22; border-radius: 8px; padding: 5px 9px; }
.key kbd { font-family: inherit; font-weight: 900; color: var(--text); background: #ffffff14; border-radius: 4px; padding: 1px 5px; margin-right: 5px; }

/* ---------- screens ---------- */
.screen { position: fixed; inset: 0; z-index: 10; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.menu { min-height: 100%; background: radial-gradient(120% 60% at 50% 0%, #1e4a30ee 0%, #0b1410f2 60%); }
.menu .wrap { padding: calc(22px + var(--safe-t)) 16px calc(24px + var(--safe-b)); max-width: 520px; margin: 0 auto; }
.logo { text-align: center; margin: 6px 0 14px; }
.logo .mark { display: block; margin: 0 auto 10px; width: 96px; height: 96px; filter: drop-shadow(0 8px 18px #0008); }
.logo .t1, .logo .t2 { font-size: 40px; line-height: .9; }
.logo .t2 { color: var(--accent); }
.logo .sub { color: var(--muted); font-size: 11px; letter-spacing: .3em; margin-top: 6px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.lbl { font-size: 11px; font-weight: 900; color: var(--muted); letter-spacing: .14em; margin-bottom: 8px; text-transform: uppercase; }
.mt { margin-top: 12px; } .mt0 { margin-top: 0; }
.teams { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; flex: 1; }
.team { border-radius: 10px; padding: 6px 0 5px; text-align: center; font-size: 10px; font-weight: 900; border: 2px solid transparent; background: var(--panel2); }
.team .dot { width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 4px; border: 3px solid; }
.team.sel { border-color: var(--accent); background: #2a2a10; }
.team.dis { opacity: .3; pointer-events: none; }
.vs { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.vs-l { font-size: 14px; }
.player { display: flex; gap: 12px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; margin-bottom: 6px; }
.inp { flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font-weight: 800; font-size: 15px; color: var(--text); user-select: text; -webkit-user-select: text; }
.inp.num { flex: 0 0 64px; text-align: center; }
.hint { font-size: 11px; color: var(--muted); }
.jersey { width: 64px; height: 70px; border-radius: 12px 12px 8px 8px; display: grid; place-items: center; font-size: 28px; font-weight: 900; border: 3px solid; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--panel2); border: 1px solid var(--line); padding: 7px 11px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.chip.sel { background: var(--accent); color: #1a1400; border-color: var(--accent); }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; }
.set { background: var(--panel2); border: 1px solid transparent; border-radius: 10px; padding: 8px 9px; display: flex; justify-content: space-between; gap: 6px; text-align: left; }
.set b { color: var(--accent); white-space: nowrap; }
.go { display: block; width: 100%; padding: 14px; border-radius: 14px; background: linear-gradient(180deg,#ffe066,#f0b400); color: #241900; font-size: 20px; border: 0; box-shadow: 0 8px 20px #f0b40044; text-align: center; margin-top: 4px; }
.ghost { display: block; width: 100%; padding: 11px; border-radius: 12px; background: transparent; border: 1px solid var(--line); color: var(--text); font-weight: 800; margin-top: 8px; }

/* ---------- play call ---------- */
.pc { min-height: 100%; background: rgba(6,11,8,.84); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); padding-bottom: calc(20px + var(--safe-b)); }
.pc .head { padding: calc(14px + var(--safe-t)) 64px 8px 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; max-width: 900px; margin: 0 auto; }
.pc .head .t { font-size: 24px; line-height: 1; }
.pc .head .s { font-size: 12px; color: var(--muted); font-weight: 700; text-align: right; }
.pc .head .s b { color: var(--accent); }
.tabs { display: flex; gap: 6px; padding: 0 16px 10px; max-width: 900px; margin: 0 auto; }
.tab { flex: 1; padding: 9px 0; border-radius: 10px; background: var(--panel); font-size: 13px; font-weight: 900; border: 1px solid var(--line); }
.tab.sel { background: var(--accent); color: #1a1400; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; padding: 0 16px; max-width: 900px; margin: 0 auto; }
.play { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-align: left; padding: 0; }
.play:hover { border-color: var(--accent); }
.play.hl { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.play canvas { width: 100%; height: 92px; display: block; }
.play .nm { padding: 7px 9px 2px; font-weight: 900; font-size: 14px; }
.play .ds { padding: 0 9px 6px; font-size: 11px; color: var(--muted); line-height: 1.3; }
.play .you { padding: 0 9px 9px; font-size: 10.5px; font-weight: 900; color: var(--accent); }
.tag { display: inline-block; font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 6px; margin-left: 5px; vertical-align: middle; }
.tag.run { background: #3ee08f33; color: #3ee08f; } .tag.pass { background: #58a6ff33; color: #8cc4ff; } .tag.st { background: #ffd23f33; color: #ffd23f; } .tag.fake { background: #ff7a7a33; color: #ff9a9a; }

/* ---------- modals ---------- */
#pause, #howto, #over { background: rgba(4,8,6,.78); display: grid; place-items: center; padding: 16px; z-index: 12; }
#pause.hidden, #howto.hidden, #over.hidden { display: none; }
.modal { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.modal.wide { width: min(560px, 100%); max-height: 100%; overflow-y: auto; }
.modal > .h { font-size: 26px; margin-bottom: 12px; }
.modal p, .modal li { font-size: 14px; line-height: 1.45; color: #d6e3da; margin-bottom: 8px; }
.modal ul { padding-left: 18px; }
.modal h4 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.final { display: flex; justify-content: space-around; align-items: center; margin: 6px 0 14px; }
.final .t { text-align: center; } .final .t .n { font-size: 44px; font-weight: 900; } .final .t .a { font-size: 12px; font-weight: 900; letter-spacing: .1em; color: var(--muted); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.stats div { background: var(--panel2); border-radius: 10px; padding: 8px; font-size: 12px; color: var(--muted); }
.stats b { display: block; font-size: 18px; color: var(--text); }

@media (min-width: 900px) {
  .logo .t1, .logo .t2 { font-size: 52px; }
}

/* Studio credit and link back to the games page, the same on every Game Golem Studios title screen */
.ggs-foot { text-align: center; font-size: 11px; margin-top: 12px; }
.ggs-foot a { color: var(--muted); text-underline-offset: 2px; }

/* ---------- multiplayer ---------- */
.mp-row { display: flex; gap: 6px; align-items: center; }
.mp-row .ghost.mp { margin-top: 0; width: auto; flex: 1; padding: 10px 8px; }
.inp.code { flex: 0 0 84px; text-align: center; text-transform: uppercase; letter-spacing: .2em; font-size: 16px; }
.hint.err { color: #ff8a8a; }
#lobby { background: rgba(4,8,6,.84); display: grid; place-items: center; padding: 16px; }
#lobby.hidden { display: none; }
.room { text-align: center; background: var(--panel2); border-radius: 12px; padding: 10px; }
.room .code { font-size: 48px; letter-spacing: .25em; color: var(--accent); line-height: 1.1; }
.room .hint { word-break: break-all; }
.lobby-list { display: flex; flex-direction: column; gap: 6px; }
.lp { display: flex; align-items: center; gap: 8px; background: var(--panel2); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.lp .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid; flex: none; }
.lp .nm { font-weight: 900; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp .pos { color: var(--muted); font-weight: 700; }
.lp .tag { margin-left: 0; }
.lp .link { font-size: 10px; color: var(--muted); }
/* online play: the Online / Local tabs and the studio's server list */
.mptabs { display: flex; gap: 6px; margin-bottom: 10px; }
.go.qp { font-size: 17px; padding: 11px; }
.go.qp.wait { background: var(--panel2); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.srvl { display: flex; flex-direction: column; gap: 5px; margin: 8px 0 6px; }
.srow { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; text-align: left; width: 100%; color: var(--text); }
.srow:hover { border-color: var(--accent); }
.srow.off { opacity: .5; }
.srow div { flex: 1; min-width: 0; }
.srow b { display: block; font-size: 13px; }
.srow small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow span { font-weight: 900; font-size: 12px; color: var(--accent2); white-space: nowrap; }
.srow.off span { color: var(--muted); }

/* career record and cloud saves */
.career { margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cloudline { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 10px; }
.cloudline span { flex: 1; line-height: 1.35; }
.cloudline b { color: var(--text); }
.ghost.mini { flex: 0 0 auto; width: auto; margin: 0; padding: 8px 12px; font-size: 13px; text-decoration: none; display: inline-block; cursor: pointer; }
