/* Coach4All · app.css — aspeto da app */
:root{
  --bg:#EDF0F4; --surface:#FFFFFF; --surface2:#F5F7FA; --ink:#14203A; --muted:#5A6781; --line:#D4DBE5;
  --accent:#1F5FD1; --accent-ink:#FFFFFF; --accent-soft:#DCE6FA; --navy:#1B3A66; --good:#1D7F53; --bad:#B8322A; --warn:#B07A10;
  --floor:#E3B27C; --floor2:#D6A26C; --paint:#4F86C9; --cline:#FFFFFF;
  --head:"Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body:"Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
  box-sizing:border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0E1524; --surface:#172136; --surface2:#1D2943; --ink:#E7ECF5; --muted:#9CA8BF; --line:#2B3854;
    --accent:#6C9BF2; --accent-ink:#0A1430; --accent-soft:#1A2A4A; --navy:#8FB4E8; --good:#4CC28B; --bad:#F07067; --warn:#E3B34A;
    --floor:#8C6A43; --floor2:#7F5F3B; --paint:#2D5687; --cline:#F1E9DE;
    color-scheme: dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0E1524; --surface:#172136; --surface2:#1D2943; --ink:#E7ECF5; --muted:#9CA8BF; --line:#2B3854;
  --accent:#6C9BF2; --accent-ink:#0A1430; --accent-soft:#1A2A4A; --navy:#8FB4E8; --good:#4CC28B; --bad:#F07067; --warn:#E3B34A;
  --floor:#8C6A43; --floor2:#7F5F3B; --paint:#2D5687; --cline:#F1E9DE;
  color-scheme: dark;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-padding-top: env(safe-area-inset-top, 0px); height:100%}
body{margin:0; background:var(--bg); color:var(--ink); font-family:var(--body); font-size:16px; line-height:1.45; min-height:100%; -webkit-font-smoothing:antialiased}
body::before{content:""; position:fixed; inset:0 0 auto; height:env(safe-area-inset-top, 0px); z-index:30; background:var(--navy-bar, #14203A)}
h1,h2,h3{font-family:var(--head); font-weight:700; letter-spacing:.01em; margin:0; line-height:1.1}
h2{font-size:1.6rem} h3{font-size:1.2rem}
p{margin:.3rem 0}
button,input,select,textarea{font:inherit; color:inherit}
button{cursor:pointer}
:focus-visible{outline:3px solid var(--accent); outline-offset:2px}
.muted{color:var(--muted)} .small{font-size:.86rem}
.num{font-family:var(--head); font-variant-numeric:tabular-nums}

/* Header */
.top{position:sticky; top:env(safe-area-inset-top, 0px); z-index:20; background:#14203A; color:#F3F5F9; padding:.6rem .9rem .7rem}
.top-row{display:flex; align-items:center; gap:.6rem; max-width:1100px; margin:0 auto}
.brand{font-family:var(--head); font-weight:700; font-size:1.35rem; display:flex; align-items:center; gap:.45rem; white-space:nowrap}
.brand svg{flex:none}
.lang-slot{margin-left:auto; display:flex; gap:.4rem; align-items:center}
.lang.mode button{display:inline-flex; align-items:center; justify-content:center; padding:.22rem .45rem}
.lang.mode svg{display:block; width:.86rem; height:.86rem}
body.coordmode nav.tabs, body.coordmode #ruleStrip, body.coordmode #escPick, body.coordmode #teamPick{display:none !important}
.dash-tabs{max-width:100%; overflow-x:auto}
.dash-grid{display:grid; grid-template-columns:1fr 1fr; gap:0 1rem; align-items:start}
@media (max-width:820px){ .dash-grid{grid-template-columns:1fr} }
.coach-pick{display:flex; gap:.5rem; overflow-x:auto; padding:.1rem .1rem .6rem; -webkit-overflow-scrolling:touch}
.coach-chip{display:flex; align-items:center; gap:.55rem; flex:none; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:.5rem .8rem .5rem .55rem; text-align:left; cursor:pointer; color:var(--ink)}
.coach-chip.on{border-color:#1F5FD1; box-shadow:0 0 0 2px #1F5FD133; background:#FFF6EF}
.coach-chip .av{width:2rem; height:2rem; border-radius:50%; background:#14203A; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; flex:none}
.coach-chip.on .av{background:#1F5FD1}
.coach-chip .cc-t{display:flex; flex-direction:column; line-height:1.2}
.coach-chip .cc-t > span:first-child{font-weight:700; white-space:nowrap}
.coach-chip .cc-s{font-size:.75rem; color:var(--muted); white-space:nowrap}
.team-cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:.6rem; margin-top:.4rem}
.tcard{border:1px solid var(--line); border-radius:10px; padding:.6rem .7rem; background:var(--surface)}
.tpl-list .tpl{margin-bottom:.6rem}
.lang{display:inline-flex; border:1px solid #3A4A6C; border-radius:7px; overflow:hidden; flex:none}
.lang button{border:0; background:transparent; color:#C9D2E3; font-size:.72rem; font-weight:700; letter-spacing:.04em; padding:.22rem .5rem; line-height:1.2}
.lang button.on{background:#F3F5F9; color:#14203A}
.gate-card .lang{position:absolute; top:.8rem; right:.8rem; border-color:var(--line)}
.gate-card .lang button{color:var(--muted)}
.gate-card .lang button.on{background:var(--ink); color:var(--bg)}
.pick{appearance:none; background:#24324F; color:#F3F5F9; border:1px solid #3A4A6C; border-radius:8px; padding:.38rem 1.7rem .38rem .6rem; font-size:.92rem; max-width:44vw;
  background-image:linear-gradient(45deg,transparent 50%,#F3F5F9 50%),linear-gradient(135deg,#F3F5F9 50%,transparent 50%); background-position:calc(100% - 13px) 55%,calc(100% - 8px) 55%; background-size:5px 5px; background-repeat:no-repeat}
.pick.esc{background-color:var(--accent); border-color:var(--accent); color:#fff; font-weight:600}
.rulestrip{max-width:1100px; margin:.5rem auto 0; display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .6rem; font-size:.82rem}
.rulestrip .chips{display:flex; gap:.4rem; overflow-x:auto; scrollbar-width:none; flex:1 1 auto; min-width:0; align-items:center}
.rulestrip .chips::-webkit-scrollbar{display:none}
.rulestrip .ctrls{display:flex; flex-wrap:nowrap; justify-content:flex-end; min-width:0; gap:.4rem; align-items:center; margin-left:auto; flex:0 1 auto; max-width:100%}
.rulestrip .pick{flex:0 1 auto; min-width:4.5rem; width:auto; font-size:.82rem; padding:.2rem 1.6rem .2rem .55rem; max-width:min(220px,40vw); text-overflow:ellipsis}
.rulestrip .pick.esc{flex:none}
.chip{flex:none; border:1px solid #3A4A6C; border-radius:999px; padding:.15rem .6rem; color:#C9D2E3; white-space:nowrap; background:transparent}
button.chip{cursor:pointer}
.sync{font-size:.75rem; color:#9FB0CF; white-space:nowrap; cursor:pointer}
.sync.warn{color:#fff; background:#B8322A; border-color:#B8322A}

/* Layout */
main{max-width:1100px; margin:0 auto; padding:1rem .9rem 6.5rem}
.view{display:none} .view.on{display:block}
.vhead{display:flex; align-items:flex-end; justify-content:space-between; gap:.8rem; margin:.2rem 0 .9rem; flex-wrap:wrap}
.panel{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:1rem; margin-bottom:.9rem}
.panel.flat{background:transparent; border-style:dashed}
.grid2{display:grid; gap:.9rem} @media(min-width:820px){.grid2{grid-template-columns:1fr 1fr}}
.row{display:flex; gap:.5rem; align-items:center; flex-wrap:wrap}
.spacer{flex:1}
label.f{display:flex; flex-direction:column; gap:.2rem; font-size:.85rem; color:var(--muted); min-width:0}
label.f > input, label.f > select, label.f > textarea{color:var(--ink)}
.fields{display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:.6rem}
input[type=text],input[type=number],input[type=date],input[type=time],select,textarea{background:var(--surface2); border:1px solid var(--line); border-radius:8px; padding:.5rem .6rem; width:100%; min-width:0}
textarea{resize:vertical; min-height:3.2rem}
.btn{display:inline-flex; align-items:center; justify-content:center; gap:.4rem; border-radius:9px; border:1px solid var(--line); background:var(--surface); padding:.55rem .9rem; font-weight:600; min-height:42px}
.btn.primary{background:var(--accent); border-color:var(--accent); color:var(--accent-ink)}
.btn.dark{background:var(--ink); border-color:var(--ink); color:var(--bg)}
.btn.ghost{background:transparent}
.btn.sm{min-height:34px; padding:.3rem .65rem; font-size:.88rem}
.btn.danger{color:var(--bad)}
.btn:disabled{opacity:.45; cursor:not-allowed}
.iconbtn{border:1px solid var(--line); background:var(--surface); width:36px; height:36px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; font-size:1rem; flex:none}
.seg{display:inline-flex; border:1px solid var(--line); border-radius:9px; overflow:hidden; background:var(--surface)}
.seg button{border:0; background:transparent; padding:.45rem .75rem; font-weight:600; font-size:.9rem; color:var(--muted)}
.seg button.on{background:var(--ink); color:var(--bg)}
.tag{display:inline-block; font-size:.75rem; padding:.05rem .45rem; border-radius:6px; background:var(--surface2); border:1px solid var(--line); color:var(--muted); white-space:nowrap}
.tag.a-aq{border-color:#C9A227;} .tag.a-tio{border-color:#E07B39} .tag.a-gr{border-color:#2E8B57} .tag.a-rem{border-color:var(--accent)} .tag.a-tid{border-color:var(--navy)} .tag.a-tc{border-color:#7A4BB3} .tag.a-tr{border-color:var(--good)} .tag.a-jr{border-color:#C23E7A} .tag.a-fi{border-color:#6B7280} .tag.a-rc{border-color:#4F9BB5}
.empty{padding:1.2rem; text-align:left; border:1px dashed var(--line); border-radius:12px; color:var(--muted)}
.empty strong{color:var(--ink); display:block; font-family:var(--head); font-size:1.15rem; margin-bottom:.2rem}

/* Session builder */
.phase{margin-top:.8rem}
.phase-h{display:flex; align-items:baseline; gap:.5rem; border-bottom:2px solid var(--ink); padding-bottom:.25rem; margin-bottom:.4rem}
.phase-h h3{font-size:1.15rem}
.item{display:grid; grid-template-columns:1fr auto; gap:.3rem .6rem; padding:.55rem 0; border-bottom:1px solid var(--line)}
.item .nm{font-weight:600}
.item .ctl{display:flex; gap:.3rem; align-items:center}
.mins{width:62px !important; text-align:center; padding:.35rem .3rem !important}
.meter{height:10px; background:var(--surface2); border:1px solid var(--line); border-radius:6px; overflow:hidden; display:flex}
.meter span{display:block; height:100%}
.legend{display:flex; gap:.8rem; flex-wrap:wrap; font-size:.8rem; color:var(--muted); margin-top:.35rem}
.legend i{display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:.3rem; vertical-align:-1px}

/* lists */
.list{display:flex; flex-direction:column}
.li{display:flex; gap:.7rem; align-items:center; padding:.65rem 0; border-bottom:1px solid var(--line)}
.li:last-child{border-bottom:0}
.li .main{flex:1; min-width:0}
.li .t{font-weight:600}
.badge{font-family:var(--head); font-weight:700; background:var(--ink); color:var(--bg); border-radius:8px; min-width:2.2rem; height:2.2rem; display:inline-flex; align-items:center; justify-content:center; font-size:1.1rem; flex:none}
.stat-cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:.6rem; margin-bottom:.9rem}
.sc{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:.7rem .8rem}
.sc .v{font-family:var(--head); font-size:1.9rem; font-weight:700; line-height:1}
.sc .l{font-size:.82rem; color:var(--muted)}
.hbar{display:grid; grid-template-columns:8.5rem 1fr 3rem; gap:.5rem; align-items:center; font-size:.88rem; margin:.3rem 0}
.hbar .track{height:12px; background:var(--surface2); border-radius:6px; overflow:hidden; border:1px solid var(--line)}
.hbar .track span{display:block; height:100%; background:var(--accent)}
.scroll-x{overflow-x:auto; -webkit-overflow-scrolling:touch}
.viewbar{display:flex; flex-wrap:wrap; align-items:center; gap:.5rem .8rem; background:#FCE3D3; color:#6B2A08; border-bottom:2px solid #1F5FD1; padding:.5rem 1rem; font-size:.92rem}
.viewbar strong{color:#14203A}
.viewbar .btn{background:#fff; border-color:#1F5FD1; color:#6B2A08}
.clubwarn{color:var(--warn); font-weight:600}
.club-coach .stats{display:flex; flex-wrap:wrap; gap:.25rem .9rem; margin-top:.2rem}
.club-coach .stats span{white-space:nowrap}
@media (max-width:640px){ .club-coach{flex-wrap:wrap} .club-coach .main{flex-basis:100%} .club-coach > .row{width:100%; justify-content:flex-start !important} }
table.box{border-collapse:collapse; width:100%; font-size:.88rem; min-width:720px}
table.box th, table.box td{border-bottom:1px solid var(--line); padding:.35rem .3rem; text-align:center; white-space:nowrap}
table.box th{font-family:var(--head); font-weight:600; color:var(--muted); font-size:.9rem}
table.box td:first-child, table.box th:first-child{text-align:left; position:sticky; left:0; background:var(--surface)}
table.box input{width:46px; padding:.25rem; text-align:center}
/* Ficha de estatística de andebol (muitas colunas) */
table.box.stat{font-size:.82rem}
table.box.stat input{width:38px; padding:.2rem .1rem}
table.box.stat th{font-size:.8rem; padding:.25rem .15rem}
table.box.stat td{padding:.2rem .12rem}
table.box.stat td.pl{max-width:11rem; overflow:hidden; text-overflow:ellipsis}
table.box.stat thead tr:first-child th[colspan]{border-left:1px solid var(--line)}
.weak{display:flex; gap:.6rem; align-items:center; padding:.45rem 0; border-bottom:1px solid var(--line)}
.weak .lvl{width:10px; height:10px; border-radius:50%; flex:none}

/* bottom nav */
.tabs{position:fixed; left:0; right:0; bottom:0; z-index:25; background:var(--surface); border-top:1px solid var(--line); padding:.3rem .3rem calc(.3rem + env(safe-area-inset-bottom, 0px)); display:flex; justify-content:center}
.tabs-in{display:grid; grid-template-columns:repeat(6,1fr); width:100%; max-width:720px}
.tab{border:0; background:transparent; display:flex; flex-direction:column; align-items:center; gap:.1rem; padding:.35rem .1rem; font-size:.72rem; color:var(--muted); font-weight:600; border-radius:8px}
.tab svg{width:22px; height:22px}
.tab.on{color:var(--accent)}

/* modal */
.modal{position:fixed; inset:0; z-index:50; background:rgba(8,12,22,.55); display:none; align-items:flex-end; justify-content:center}
.modal.on{display:flex}
.sheet{background:var(--surface); width:100%; max-width:640px; max-height:88vh; overflow:auto; border-radius:16px 16px 0 0; padding:1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px))}
@media(min-width:700px){.modal{align-items:center}.sheet{border-radius:16px}}
.sheet-h{display:flex; align-items:center; gap:.5rem; margin-bottom:.7rem; position:sticky; top:-1rem; background:var(--surface); padding:.4rem 0}
.sheet-h h2{font-size:1.35rem; flex:1}
.drill{padding:.6rem 0; border-bottom:1px solid var(--line)}
.drill .dh{display:flex; gap:.5rem; align-items:flex-start}
.drill .dn{font-weight:600; flex:1}
.drill .dd{font-size:.9rem; color:var(--muted); margin:.2rem 0}
.toast{position:fixed; left:50%; bottom:5.6rem; transform:translateX(-50%); background:var(--ink); color:var(--bg); padding:.55rem .9rem; border-radius:9px; font-weight:600; z-index:60; opacity:0; transition:opacity .2s; pointer-events:none; max-width:90vw}
.toast.on{opacity:1}

/* Treino mode */
.runner{position:fixed; inset:0; z-index:70; background:#14203A; color:#F3F5F9; display:none; flex-direction:column; padding:calc(1rem + env(safe-area-inset-top,0px)) 1.1rem calc(1rem + env(safe-area-inset-bottom,0px))}
.runner.on{display:flex}
.runner .clock{font-family:var(--head); font-weight:700; font-size:min(30vw,11rem); line-height:1; letter-spacing:.02em; font-variant-numeric:tabular-nums; margin:.4rem 0}
.runner .clock.end{color:#FF9B5E}
.runner .rbar{height:8px; background:#24324F; border-radius:4px; overflow:hidden}
.runner .rbar span{display:block; height:100%; background:var(--accent)}
.runner .btn{background:#24324F; border-color:#3A4A6C; color:#F3F5F9}
.runner .btn.primary{background:var(--accent); border-color:var(--accent); color:#fff}


/* Telemóvel: estado e utilizador sobem para a linha do logótipo; ficam só «Regras» + seletores */
@media (max-width: 640px){
  .rulestrip .chips .chip:not(#rulesBtn){display:none}
  .rulestrip .chips{flex:0 0 auto}
  .rulestrip{flex-wrap:nowrap}
  .rulestrip .ctrls{flex:1 1 auto; justify-content:flex-end}
  .rulestrip .pick{max-width:none}
  .rulestrip .pick:not(.esc){flex:1 1 auto; min-width:0; max-width:11rem}
  .top-row #syncSlot{display:flex !important; align-items:center; gap:.35rem; margin-left:auto; min-width:0}
  .top-row .lang-slot{margin-left:.45rem}
  .top-row #userChip{padding:.15rem .45rem}
  .top-row #userChip .lbl{display:none}
  .top-row .sync{font-size:0; padding:0; width:1.65rem; height:1.65rem; display:inline-flex; align-items:center; justify-content:center; border-radius:50%}
  .top-row .sync::before{content:""; width:.6rem; height:.6rem; border-radius:50%; background:#4CC28B}
  .top-row .sync[data-m="saving"]::before,.top-row .sync[data-m="connecting"]::before{background:#9FB0CF}
  .top-row .sync[data-m="offline"]::before,.top-row .sync[data-m="local"]::before,.top-row .sync[data-m="kv"]::before{background:#E3B34A}
  .top-row .sync.warn::before{background:#F07067}
  .top-row .sync.warn{background:transparent}
}
/* Entrada */
.gate{position:fixed; inset:0; z-index:120; background:var(--bg); display:none; align-items:center; justify-content:center; padding:calc(1rem + env(safe-area-inset-top,0px)) 1rem calc(1rem + env(safe-area-inset-bottom,0px)); overflow:auto}
.gate.on{display:flex}
.gate-card{width:100%; max-width:400px; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:1.6rem 1.4rem}
.gate-card input{font-size:16px}
/* Demo */
.demo{z-index:80}
.demo .dboard{width:min(100%, calc((100vh - 300px) * 1.07)); min-width:260px; margin:.6rem auto 0; background:var(--floor2); border-radius:12px; padding:.4rem}
.demo .dboard svg{width:100%; height:auto; display:block}
.demo .cap{font-size:1.12rem; min-height:3.3em; margin:.6rem auto .4rem; max-width:62ch; width:100%; color:#E6EBF4}
.demo .dots{display:flex; gap:.35rem; justify-content:center; margin-top:.6rem}
.demo .dots span{width:22px; height:5px; border-radius:3px; background:#2E3D5E}
.demo .dots span.past{background:#3D5A8F} .demo .dots span.on{background:var(--accent)}
.demo .seg{background:#24324F; border-color:#3A4A6C} .demo .seg button{color:#C9D2E3} .demo .seg button.on{background:#F3F5F9; color:#14203A}
.mini-board{width:100%; max-width:220px; border-radius:8px; background:var(--floor2); display:block}
/* Tactics board */
.board-wrap{background:var(--floor2); border-radius:12px; padding:.5rem; touch-action:none}
#board{width:100%; height:auto; display:block; touch-action:none; user-select:none}
.tok{cursor:grab}
.frames{display:flex; gap:.35rem; flex-wrap:wrap; margin-top:.5rem}
.frames button{min-width:36px}
.frames button.on{background:var(--ink); color:var(--bg)}

/* Live game */
.live-players{display:grid; grid-template-columns:repeat(auto-fill,minmax(88px,1fr)); gap:.4rem}
.lp{border:1px solid var(--line); background:var(--surface); border-radius:10px; padding:.45rem .3rem; text-align:center}
.lp .n{font-family:var(--head); font-size:1.5rem; font-weight:700; line-height:1}
.lp .s{font-size:.75rem; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lp.sel{background:var(--accent); border-color:var(--accent); color:#fff}
.lp.sel .s{color:#fff}
.live-actions{display:grid; grid-template-columns:repeat(4,1fr); gap:.4rem; margin-top:.6rem}
.la{border:1px solid var(--line); background:var(--surface2); border-radius:10px; min-height:54px; font-family:var(--head); font-weight:700; font-size:1.05rem; line-height:1.05}
.la.make{background:var(--good); color:#fff; border-color:var(--good)}
.la.miss{background:var(--surface); color:var(--bad); border-color:var(--bad)}
.scoreline{display:flex; align-items:center; justify-content:center; gap:1rem; font-family:var(--head); font-weight:700}
.scoreline .big{font-size:2.6rem; line-height:1}
@media (prefers-reduced-motion: reduce){*{transition:none !important; animation:none !important}}
/* ---- v3.0: jogo ao vivo (relógio, campo, mapa de lançamentos) ---- */
.clockbox{min-width:8.5rem}
.clock-big{font-family:var(--head); font-weight:700; font-size:2.6rem; line-height:1; font-variant-numeric:tabular-nums; letter-spacing:.02em}
.clock-big.end{color:var(--bad)}
.live-meta{display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:.6rem; margin-top:.7rem; padding-top:.6rem; border-top:1px solid var(--line)}
.court-chips{display:flex; flex-wrap:wrap; gap:.35rem}
.cchip{display:inline-flex; align-items:center; gap:.35rem; border:1px solid var(--line); background:var(--surface); border-radius:999px; padding:.3rem .6rem .3rem .3rem; font-size:.82rem; color:var(--ink)}
.cchip .n{display:inline-flex; align-items:center; justify-content:center; min-width:1.7rem; height:1.7rem; border-radius:50%; background:var(--surface2); font-family:var(--head); font-weight:700}
.cchip .t{font-variant-numeric:tabular-nums; color:var(--muted)}
.cchip .pm{font-weight:700; font-variant-numeric:tabular-nums}
.cchip .pm.pos{color:var(--good)} .cchip .pm.neg{color:var(--bad)}
.cchip .f{font-size:.72rem; font-weight:700; color:var(--muted)} .cchip .f.hi{color:var(--bad)}
.cchip.on{border-color:var(--accent); background:color-mix(in srgb, var(--accent) 12%, var(--surface))}
.cchip.on .n{background:var(--accent); color:#fff}
.cchip.out{opacity:.5; text-decoration:line-through}
.lp.oncourt{border-color:var(--accent); box-shadow:inset 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent)}
.lp.oncourt .n::after{content:""; display:inline-block; width:.45rem; height:.45rem; border-radius:50%; background:var(--accent); margin-left:.25rem; vertical-align:middle}
.lp.sel.oncourt .n::after{background:#fff}
.lp.fouled{opacity:.55}
.shotchart{display:flex; flex-wrap:wrap; gap:1rem; align-items:flex-start; margin-top:.5rem}
/* ---- v3.0: calendário ---- */
.cal-head{display:flex; align-items:center; gap:.5rem; flex-wrap:wrap}
.cal-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:3px; margin-top:.6rem}
.cal-dow{font-size:.72rem; color:var(--muted); text-align:center; font-weight:600; padding:.2rem 0}
.cal-day{min-height:4.4rem; border:1px solid var(--line); border-radius:8px; background:var(--surface); padding:.25rem .3rem; text-align:left; display:flex; flex-direction:column; gap:.15rem; color:var(--ink); overflow:hidden}
.cal-day.other{opacity:.45}
.cal-day.today{border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent)}
.cal-day.sel{background:color-mix(in srgb, var(--accent) 10%, var(--surface))}
.cal-day .d{font-size:.78rem; font-weight:700}
.cal-ev{font-size:.68rem; line-height:1.15; border-radius:4px; padding:.08rem .25rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#fff}
.cal-ev.s{background:var(--navy)} .cal-ev.sp{background:transparent; color:var(--navy); border:1px dashed var(--navy)}
.cal-ev.g{background:var(--good)} .cal-ev.gl{background:var(--bad)} .cal-ev.gn{background:#5A6781} .cal-ev.c{background:#1F5FD1}
.cal-more{font-size:.66rem; color:var(--muted)}
@media (max-width:640px){ .cal-day{min-height:3.2rem} .cal-ev{font-size:0; height:.42rem; padding:0; border-radius:3px} .cal-ev.sp{border-width:1px} .cal-more{font-size:.6rem} }
.cal-legend{display:flex; flex-wrap:wrap; gap:.6rem; font-size:.75rem; color:var(--muted); margin-top:.5rem}
.cal-legend i{display:inline-block; width:.7rem; height:.7rem; border-radius:3px; margin-right:.25rem; vertical-align:-1px}
/* ---- v3.0: página partilhada ---- */
.share-wrap{position:fixed; inset:0; z-index:125; background:var(--bg); overflow:auto; padding:calc(.8rem + env(safe-area-inset-top,0px)) 1rem 2rem}
.share-inner{max-width:860px; margin:0 auto}
body.sharemode .runner.demo{z-index:140}
.linkbtn{background:none; border:0; padding:0; color:var(--accent); font:inherit; text-decoration:underline; cursor:pointer}
@media (max-width:640px){ .share-play{grid-template-columns:1fr !important} }

/* v3.0 — bloqueio de treinos e jogos concluídos */
.lockbar{display:flex;align-items:flex-start;gap:.7rem;background:#FFF4EC;border:1px solid #F2C6A8;border-left:4px solid #1F5FD1;border-radius:12px;padding:.7rem .9rem;margin:0 0 .8rem}
.lockbar.open{background:#EEF7F1;border-color:#BFE0CB;border-left-color:var(--good)}
.lockbar .lk-ico{font-size:1.3rem;line-height:1.2}
.lockbar .main{flex:1;min-width:0}
.lockbar .lk-req{margin-top:.35rem;padding:.35rem .5rem;background:#fff;border-radius:8px;border:1px dashed #F2C6A8}
.lockbar .btn{flex-shrink:0}
.is-locked .lk-off{opacity:.45;cursor:not-allowed}
.is-locked input[readonly],.is-locked textarea[readonly]{background:var(--surface2);color:var(--muted)}
@media (max-width:560px){.lockbar{flex-wrap:wrap}.lockbar .btn{width:100%}}

/* Jogo ao vivo de andebol (1.1) */
.la.on{outline:3px solid var(--accent); outline-offset:1px}
.la:disabled{cursor:not-allowed}
.cchip.susp{border-style:dashed; opacity:.75}
.susp{font-size:.85rem} .susp strong{font-variant-numeric:tabular-nums; color:var(--bad)} .susp.opp strong{color:var(--good)}
.gz-grid{max-width:280px; margin-inline:auto; display:grid; grid-template-columns:repeat(3,1fr); gap:3px; aspect-ratio:3/2; border:3px solid #C8323C; border-bottom:0; border-radius:4px 4px 0 0; padding:3px; background:repeating-linear-gradient(45deg, transparent 0 6px, color-mix(in srgb, var(--line) 50%, transparent) 6px 7px)}
.gz-grid .gz{display:flex; flex-direction:column; align-items:center; justify-content:center; border-radius:4px; background:var(--surface); border:1px solid var(--line); font-size:.78rem; line-height:1.1; min-height:2.2rem}
.gz-grid .gz span{color:var(--muted); font-size:.7rem}
.gz-grid.pick .gz{cursor:pointer; min-height:2.6rem}
.gz-grid.pick .gz.on{background:var(--accent); border-color:var(--accent)}
/* Mapas da ficha do jogo: as duas colunas partilham as mesmas linhas (título, números, campo, legenda, baliza) e ficam sempre alinhadas */
.mapgrid{display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); column-gap:1.2rem; row-gap:.35rem; align-items:start; margin-top:.5rem}
.mapcol{display:grid; grid-row:span 5; grid-template-rows:subgrid; row-gap:.35rem; min-width:0; align-items:start}
.mapcol .mt{font-weight:600; line-height:1.25}
.mapcol .ms{line-height:1.3; min-height:1.3em}
.mapcol .mapsvg{width:100%; max-width:340px; aspect-ratio:150/140; border-radius:8px; background:var(--floor2); display:block}
.mapcol .gz-grid{margin-inline:0; width:100%; max-width:280px}
@supports not (grid-template-rows:subgrid){ .mapcol{display:flex; flex-direction:column; gap:.35rem} .mapcol .ms{min-height:2.6em} }
