:root { --bg:#f6f7f9; --fg:#1b1f24; --dim:#6a737d; --line:#e1e4e8; --acc:#1f6feb; --card:#fff; }
@media (prefers-color-scheme: dark) { :root { --bg:#0f1115; --fg:#e6e8eb; --dim:#8b949e; --line:#2a2f36; --acc:#58a6ff; --card:#171a20; } }
* { box-sizing: border-box; }
body { margin:0; font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background:var(--bg); color:var(--fg); }
header.top { display:flex; align-items:center; gap:24px; padding:10px 20px; border-bottom:1px solid var(--line); background:var(--card); }
header .brand { font-weight:700; font-size:18px; color:var(--fg); text-decoration:none; }
header nav a { margin-right:16px; color:var(--dim); text-decoration:none; }
header nav a:hover { color:var(--acc); }
main { padding:16px 20px 40px; max-width:1400px; margin:0 auto; }
footer { color:var(--dim); font-size:12px; padding:12px 20px; border-top:1px solid var(--line); }
h1 { font-size:22px; margin:8px 0 12px; display:flex; align-items:center; gap:10px; }
h2 { font-size:17px; margin:24px 0 8px; }
a { color:var(--acc); text-decoration:none; } a:hover { text-decoration:underline; }
.meta, .dim { color:var(--dim); }
.filters { display:flex; flex-wrap:wrap; gap:10px 14px; align-items:end; padding:12px; background:var(--card); border:1px solid var(--line); border-radius:8px; margin-bottom:12px; }
.filters label { display:flex; flex-direction:column; font-size:12px; color:var(--dim); gap:3px; }
.filters select, .filters input { font:inherit; padding:4px 6px; border:1px solid var(--line); border-radius:4px; background:var(--bg); color:var(--fg); }
.filters button { font:inherit; padding:6px 14px; border:0; border-radius:4px; background:var(--acc); color:#fff; cursor:pointer; }
table.rank { width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--line); border-radius:8px; }
table.rank th, table.rank td { padding:6px 8px; border-bottom:1px solid var(--line); text-align:left; white-space:nowrap; }
table.rank th { font-size:12px; color:var(--dim); text-transform:uppercase; letter-spacing:.03em; position:sticky; top:0; background:var(--card); }
table.rank td.num, table.rank th.num { text-align:right; font-variant-numeric: tabular-nums; }
table.rank tr.w td:nth-child(6) { color:#1a7f37; } table.rank tr.l td:nth-child(6) { color:#cf222e; } table.rank tr.d td:nth-child(6) { color:#9a6700; }
.cards { display:flex; flex-wrap:wrap; gap:12px; margin:12px 0; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:10px 14px; min-width:150px; }
.card .k { font-size:11px; color:var(--dim); text-transform:uppercase; }
.card .v { font-size:24px; font-weight:700; }
img.logo { height:36px; width:36px; object-fit:contain; }
.pager { display:flex; gap:12px; margin-top:10px; }
code { background:var(--line); padding:1px 5px; border-radius:3px; }

.cols { display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap:16px; align-items:start; }
@media (max-width: 800px) { .cols { grid-template-columns: 1fr; } }
.note { color:var(--dim); font-size:13px; background:var(--card); border:1px solid var(--line); border-radius:8px; padding:8px 12px; }

form.inline { display:inline; }
form.inline input, form.inline button, input.stat { font:inherit; font-size:13px; padding:2px 6px; border:1px solid var(--line); border-radius:6px; background:var(--card); color:var(--fg); }
input.stat { width:3.2em; text-align:right; }
form.inline button { cursor:pointer; }
form.inline button:hover { border-color:var(--acc); color:var(--acc); }

form.poschips { display:flex; flex-wrap:wrap; gap:6px 18px; align-items:center; margin:4px 0 14px; font-size:13px; }
.posgroup { display:inline-flex; flex-wrap:wrap; gap:4px 6px; align-items:center; }
.posgroup label { display:inline-flex; align-items:center; gap:3px; padding:2px 8px; border:1px solid var(--line); border-radius:999px; background:var(--card); cursor:pointer; white-space:nowrap; }
.posgroup label:has(input:checked) { border-color:var(--acc); color:var(--acc); }
.posgroup input { margin:0; }
.posgroup button { font:inherit; font-size:13px; padding:2px 8px; border:1px solid var(--line); border-radius:6px; background:var(--card); color:var(--fg); cursor:pointer; }
.posgroup button:hover { border-color:var(--acc); color:var(--acc); }

.dev { margin: 8px 0 22px; }
.dev h3 { margin: 10px 0 4px; font-size: 15px; }
.devchart { width: 100%; max-width: 760px; height: auto; display: block; background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; }
.devchart .grid { stroke: var(--line); stroke-width: 1; }
.devchart .grid.zero { stroke: var(--dim); }
.devchart .ref { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 4 4; }
.devchart .reflab { fill: var(--dim); font-size: 10px; text-anchor: end; }
.devchart .ylab { fill: var(--dim); font-size: 10px; text-anchor: end; }
.devchart .xlab { fill: var(--fg); font-size: 10px; text-anchor: middle; }
.devchart .xlab.dim { fill: var(--dim); }
.devchart .legend { fill: var(--dim); font-size: 10px; }
.devchart .bar.pos { fill: #3c9a5f; opacity: .45; }
.devchart .bar.neg { fill: #c9553d; opacity: .45; }
.devchart .line { fill: none; stroke: var(--acc); stroke-width: 2.2; }
.devchart .dot { fill: var(--acc); stroke: var(--card); stroke-width: 1.5; }
table.rank.compact { width: auto; min-width: 360px; font-size: 13px; }
ul.notes { margin: 8px 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; max-width: 760px; }
ul.notes li { padding: 6px 10px; border-left: 3px solid var(--line); background: var(--card); border-radius: 0 6px 6px 0; font-size: 13px; }
ul.notes li.strength { border-left-color: #3c9a5f; }
ul.notes li.focus { border-left-color: #c9553d; }

/* ---------- phones and narrow screens ---------- */
.tbl { overflow-x:auto; -webkit-overflow-scrolling:touch; border-radius:8px; max-width:100%; }
main { min-width:0; }
.tbl > table.rank { min-width:100%; }
header.top { flex-wrap:wrap; gap:8px 24px; position:sticky; top:0; z-index:5; }
header nav { display:flex; flex-wrap:wrap; gap:4px 16px; }
header nav a { margin:0; padding:4px 0; }
@media (max-width: 800px) {
  main { padding:10px 10px 32px; }
  header.top { padding:8px 12px; gap:6px 12px; }
  header .brand { font-size:16px; }
  header nav { width:100%; flex-wrap:nowrap; overflow-x:auto; gap:0 14px; scrollbar-width:none; -ms-overflow-style:none; }
  header nav::-webkit-scrollbar { display:none; }
  header nav a { white-space:nowrap; padding:6px 0; font-size:13px; }
  h1 { font-size:19px; flex-wrap:wrap; }
  h2 { font-size:16px; margin-top:18px; }
  table.rank th, table.rank td { padding:6px 6px; }
  table.rank th { position:static; }
  table.rank.compact { min-width:0; width:100%; }
  .filters { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:10px; }
  .filters label { font-size:12px; }
  .filters label { min-width:0; }                                                     /* grid items must be allowed to shrink below a long <option> */
  .filters select, .filters input { width:100%; max-width:100%; min-width:0; min-height:38px; font-size:16px; }   /* 16px stops iOS zooming into fields */
  .hide-sm { display:none !important; }
  code, .meta { overflow-wrap:anywhere; }
  .filters button { grid-column:1 / -1; min-height:40px; font-size:15px; }
  .filters label:has(input[type=text]) { grid-column:1 / -1; }
  .cards { gap:8px; } .card { flex:1 1 40%; min-width:0; padding:8px 10px; } .card .v { font-size:20px; }
  .posgroup label, .posgroup button { padding:6px 10px; font-size:14px; }
  .posgroup input { width:16px; height:16px; }
  form.poschips { gap:8px 14px; }
  form.inline input, form.inline button, input.stat { min-height:34px; font-size:16px; padding:2px 8px; }
  input.stat { width:3.6em; }
  .pager { justify-content:space-between; font-size:15px; } .pager a { padding:8px 12px; border:1px solid var(--line); border-radius:6px; background:var(--card); }
  .devchart { max-width:none; }
  .devchart .legend { display:none; }
  .devchart .ylab, .devchart .xlab, .devchart .reflab { font-size:15px; }   /* the SVG is scaled down ~0.55x on a phone */
  ul.notes li { font-size:14px; }
  footer { font-size:11px; padding:10px 12px; }
}
@media (max-width: 420px) {
  .filters { grid-template-columns:1fr 1fr; }
  body { font-size:13.5px; }
}

h1 form.savebtn { margin-left:auto; }
h1 form.savebtn button { font:inherit; font-size:13px; padding:4px 10px; border:1px solid var(--line); border-radius:999px; background:var(--card); color:var(--fg); cursor:pointer; }
h1 form.savebtn button:hover { border-color:var(--acc); color:var(--acc); }
header nav a.who { color:var(--acc); margin-left:8px; }

/* ---------- player profile page ---------- */
.profile { max-width:1180px; margin:0 auto; }
.profile .hero { background:var(--card); border:1px solid var(--line); border-radius:10px; overflow:hidden; margin:4px 0 14px; }
.profile .cover { height:190px; background:#1e3a5f center/cover no-repeat; position:relative; }
.profile .cover.empty { background: linear-gradient(135deg, #0b3d2e 0%, #1f6feb 55%, #7cc4ff 100%); }
.profile .cover.empty::after { content:""; position:absolute; inset:0; background: radial-gradient(circle at 20% 70%, rgba(255,255,255,.18) 0 14px, transparent 15px), radial-gradient(circle at 78% 30%, rgba(255,255,255,.12) 0 34px, transparent 35px); }
.profile .cover .slot { position:absolute; right:12px; bottom:10px; font-size:12px; color:rgba(255,255,255,.85); background:rgba(0,0,0,.25); padding:3px 9px; border-radius:999px; z-index:1; }
.profile .avatar { width:96px; height:96px; border-radius:50%; margin:-48px 0 0 20px; border:4px solid var(--card); background:var(--bg); overflow:hidden; display:flex; align-items:center; justify-content:center; position:relative; z-index:1; }
.profile .avatar img { width:100%; height:100%; object-fit:cover; }
.profile .avatar .initials { font-size:32px; font-weight:700; color:var(--dim); }
.profile .who { padding:6px 20px 0; }
.profile .who h1 { margin:4px 0 2px; font-size:24px; }
.profile .badge { display:inline-flex; width:18px; height:18px; border-radius:50%; background:var(--acc); color:#fff; font-size:11px; align-items:center; justify-content:center; }
.profile .sub { margin:0 0 8px; color:var(--dim); font-size:13px; }
.profile .tabs { display:flex; gap:22px; border-top:1px solid transparent; }
.profile .tabs a { padding:8px 2px 10px; color:var(--dim); border-bottom:2px solid transparent; text-decoration:none; font-size:14px; }
.profile .tabs a.on { color:var(--acc); border-bottom-color:var(--acc); }
.profile .tabs a:hover { color:var(--acc); }

.pcols { display:grid; grid-template-columns: 300px minmax(0,1fr); gap:14px; align-items:start; }
.pcols > * { min-width:0; }
.pcard { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:0 0 10px; margin-bottom:14px; overflow:hidden; }
.pcard > h2 { font-size:15px; margin:0 0 10px; padding:12px 14px; border-bottom:1px solid var(--line); display:flex; align-items:baseline; gap:8px; }
.pcard > h2 .dim { font-weight:400; font-size:13px; }
.pcard > h2 .see { margin-left:auto; font-size:12px; font-weight:400; }
.pcard > p, .pcard > ul, .pcard > ol, .pcard > details, .pcard > div, .pcard > form, .pcard > svg { margin-left:14px; margin-right:14px; }
.pcard > .tbl { margin:0; border-radius:0; }
.pcard .tbl table.rank { border:0; border-radius:0; }
.pcard .tbl table.rank th { position:static; }
.pcard p.meta { margin-top:8px; }
.small { font-size:12px; }
.pcard .dev { margin:0 14px 18px; }
.pcard .devchart { max-width:none; }

.stats3 { display:grid; grid-template-columns: repeat(3, 1fr); gap:0; }
.stats3 > div { display:flex; flex-direction:column; gap:2px; padding:2px 10px 4px 0; border-right:1px solid var(--line); margin-right:10px; min-width:0; }
.stats3 > div:last-child { border-right:0; margin-right:0; }
.stats3 .k { font-size:10.5px; color:var(--dim); text-transform:uppercase; letter-spacing:.02em; line-height:1.2; min-height:2.4em; }
.stats3 .v { font-size:18px; font-weight:600; color:var(--acc); }

.season { font-size:11px; color:var(--dim); text-transform:uppercase; letter-spacing:.05em; margin:0 0 6px; }
ul.ranklist { list-style:none; padding:0; margin:0 14px 4px; }
ul.ranklist li { display:flex; align-items:baseline; gap:6px; padding:7px 0; border-bottom:1px solid var(--line); }
ul.ranklist li:last-child { border-bottom:0; }
ul.ranklist li.subrow { padding:2px 0 8px 14px; font-size:12px; border-bottom:1px solid var(--line); }
ul.ranklist .rk { margin-left:auto; color:var(--acc); font-weight:600; white-space:nowrap; }
ul.ranklist .rk .dim { font-weight:400; }

.poslist { margin:0 14px 6px; }
details.posedit summary, details.addlink summary { cursor:pointer; color:var(--acc); font-size:13px; margin:2px 0 8px; }
.pcard form.poschips { margin:0; gap:8px 10px; }
.pcard .posgroup { display:flex; flex-wrap:wrap; }

svg.radar { width:100%; max-width:300px; height:auto; display:block; margin:0 auto; }
svg.radar .grid { fill:none; stroke:var(--line); stroke-width:1; }
svg.radar .grid.outer { stroke:var(--dim); }
svg.radar .grid.median { stroke:var(--dim); stroke-dasharray:4 3; }
svg.radar .axis { stroke:var(--line); stroke-width:1; }
svg.radar .lab { fill:var(--fg); font-size:12px; }
svg.radar .val { fill:var(--acc); fill-opacity:.55; stroke:var(--acc); stroke-width:1.5; }
svg.radar .dot { fill:var(--acc); stroke:var(--card); stroke-width:1.5; }
svg.spark { width:100%; height:auto; display:block; }
svg.spark .grid { stroke:var(--line); stroke-width:1; } svg.spark .grid.zero { stroke:var(--dim); }
svg.spark .ref { stroke:var(--dim); stroke-width:1; stroke-dasharray:4 3; }
svg.spark .reflab, svg.spark .ylab { fill:var(--dim); font-size:9px; text-anchor:end; }
svg.spark .xlab { fill:var(--dim); font-size:9px; }
svg.spark .line { fill:none; stroke:var(--acc); stroke-width:2; }
svg.spark .dot { fill:var(--acc); stroke:var(--card); stroke-width:1.5; }

.media { display:grid; grid-template-columns: 84px 1fr; gap:8px; margin-bottom:8px; }
.media .shot { aspect-ratio:1; border-radius:8px; border:1px dashed var(--line); background:var(--bg); display:flex; align-items:center; justify-content:center; overflow:hidden; color:var(--dim); font-size:12px; }
.media .shot.wide { aspect-ratio:auto; }
.media .shot img { width:100%; height:100%; object-fit:cover; }
.media .shot:not(.empty) { border-style:solid; }
ul.links { list-style:none; padding:0; margin:0 14px 6px; }
ul.links li { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--line); }
ul.links li:last-child { border-bottom:0; }
ul.links .ico { display:inline-flex; width:22px; height:22px; border-radius:6px; background:var(--bg); border:1px solid var(--line); align-items:center; justify-content:center; font-size:10px; color:var(--acc); flex:none; }
ul.links.empty .ico { color:var(--dim); }
ul.links form.inline { margin-left:auto; }
ul.links button.x { border:0; background:none; }
form.linkform { display:grid; grid-template-columns: 1fr 1fr; gap:6px; }
form.linkform input[type=url] { grid-column:1 / -1; }
form.linkform select, form.linkform input, form.linkform button { font:inherit; font-size:13px; padding:5px 7px; border:1px solid var(--line); border-radius:6px; background:var(--bg); color:var(--fg); min-width:0; }
form.linkform button { background:var(--acc); color:#fff; border-color:var(--acc); cursor:pointer; }

.analysis { margin:0 14px 10px; }
.analysis .text { white-space:pre-wrap; line-height:1.5; margin-top:4px; }
.analysis .meta form.inline { margin-left:6px; } .analysis button.x { border:0; background:none; }
details.earlier { margin:0 14px 8px; } details.earlier summary { cursor:pointer; color:var(--acc); font-size:13px; }
.aiph { display:flex; gap:12px; align-items:flex-start; margin:0 14px 10px; padding:12px; border:1px dashed var(--line); border-radius:8px; background:var(--bg); font-size:13px; }
.aiph .ico { flex:none; width:34px; height:34px; border-radius:50%; background:var(--card); border:1px solid var(--line); display:flex; align-items:center; justify-content:center; color:var(--acc); font-size:16px; }
.aitools { margin:0 14px; display:flex; flex-wrap:wrap; gap:8px 16px; align-items:flex-start; }
.aitools details.addlink { flex:1 1 260px; } .aitools details.addlink summary { margin:6px 0 8px; }
.btn { font:inherit; font-size:13px; padding:5px 12px; border:1px solid var(--line); border-radius:999px; background:var(--card); color:var(--fg); cursor:pointer; }
.btn:hover { border-color:var(--acc); color:var(--acc); }
form.aiform textarea { grid-column:1 / -1; font:inherit; font-size:13px; padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:var(--bg); color:var(--fg); resize:vertical; }
.devgrid { display:grid; grid-template-columns: minmax(0,1fr); }
.devgrid.with-coach { grid-template-columns: minmax(0,1fr) 300px; gap:18px; margin-right:14px; }
.devmain { min-width:0; }
.coachcol { border-left:1px solid var(--line); padding-left:16px; min-width:0; }
.coachcol h3 { margin:6px 0 10px; font-size:15px; }
form.notef { display:grid; gap:6px; margin-bottom:12px; }
form.notef .row { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
form.notef input, form.notef select, form.notef textarea, form.notef button { font:inherit; font-size:13px; padding:5px 7px; border:1px solid var(--line); border-radius:6px; background:var(--bg); color:var(--fg); min-width:0; }
form.notef textarea { resize:vertical; }
form.notef button { background:var(--acc); color:#fff; border-color:var(--acc); cursor:pointer; justify-self:start; padding:5px 14px; }
ul.cnotes { list-style:none; padding:0; margin:0; }
ul.cnotes li { padding:8px 10px; margin-bottom:8px; border-left:3px solid var(--line); background:var(--bg); border-radius:0 6px 6px 0; font-size:13px; }
ul.cnotes li .text { white-space:pre-wrap; margin-top:3px; }
ul.cnotes li.empty { border-left-color:transparent; background:none; padding-left:0; }
ul.cnotes .chip { text-transform:capitalize; }
ul.cnotes li.f-technical { border-left-color:#1f6feb; } ul.cnotes li.f-tactical { border-left-color:#8250df; }
ul.cnotes li.f-physical { border-left-color:#3c9a5f; } ul.cnotes li.f-mental { border-left-color:#bf8700; }
ul.cnotes button.x { border:0; background:none; }
details.reqaccess { margin:6px 14px 4px; } .reqstate { margin:6px 14px 4px; }
@media (max-width: 900px) {
  .devgrid.with-coach { grid-template-columns: 1fr; margin-right:0; }
  .coachcol { border-left:0; border-top:1px solid var(--line); padding:10px 14px 0; }
}
/* coach's area on the team page */
.coacharea { border:1px solid var(--line); border-left:4px solid var(--acc); border-radius:10px; background:var(--card); padding:4px 16px 14px; margin:16px 0; }
.coacharea > h2 { margin:10px 0 8px; }
.coacharea h3 { font-size:14px; margin:14px 0 6px; }
.coacharea .cards.tight { margin:8px 0; } .coacharea .card { background:var(--bg); }
.coacharea .v.form span { display:inline-block; width:22px; height:22px; line-height:22px; text-align:center; border-radius:4px; font-size:13px; margin-right:3px; color:#fff; }
.coacharea .v.form .w { background:#1a7f37; } .coacharea .v.form .l { background:#cf222e; } .coacharea .v.form .d { background:#9a6700; }
.coacharea ul.notes.flags { max-width:none; margin-bottom:4px; }
.coacharea table.rank.compact.wide { width:100%; }
.coacharea td.pos { color:#1a7f37; font-weight:600; } .coacharea td.neg { color:#cf222e; font-weight:600; }
ul.nextup { list-style:none; padding:0; margin:0; } ul.nextup li { padding:5px 0; border-bottom:1px solid var(--line); font-size:13px; } ul.nextup li:last-child { border-bottom:0; }
.chip { display:inline-block; padding:0 7px; border-radius:999px; border:1px solid var(--line); font-size:11px; text-transform:capitalize; background:var(--bg); }
.chip.clear-favourite, .chip.favourite { border-color:#1a7f37; color:#1a7f37; } .chip.underdog, .chip.clear-underdog { border-color:#cf222e; color:#cf222e; }
.chip.staff { border-color:#9a6700; color:#9a6700; }
.tnotes { margin-top:10px; } .tnotes form.teamnote { max-width:760px; }
.tvideos { margin-top:10px; } .tvideos form.teamvid { max-width:760px; margin-bottom:8px; }
.tvideos form.teamvid .row3 button { justify-self:stretch; }
ul.vlinks { list-style:none; padding:0; margin:0; max-width:760px; }
ul.vlinks li { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; padding:6px 0; border-bottom:1px solid var(--line); font-size:13px; }
ul.vlinks li:last-child { border-bottom:0; } ul.vlinks li.empty { color:var(--dim); }
ul.vlinks .ico { display:inline-flex; width:22px; height:22px; border-radius:6px; background:var(--bg); border:1px solid var(--line); align-items:center; justify-content:center; font-size:10px; color:var(--acc); flex:none; }
ul.vlinks form.inline { margin-left:auto; } ul.vlinks button.x { border:0; background:none; }
form.notef .row3 { display:grid; grid-template-columns:1fr 1fr 1.4fr; gap:6px; }
ul.cnotes li.k-suggestion { border-left-color:#1f6feb; } ul.cnotes li.k-announcement { border-left-color:#bf8700; } ul.cnotes li.k-training { border-left-color:#3c9a5f; }
ul.cnotes li.k-lineup { border-left-color:#8250df; } ul.cnotes li.k-schedule { border-left-color:#6a737d; }
.tnotes ul.cnotes li { max-width:760px; }
@media (max-width: 800px) { form.notef .row3 { grid-template-columns:1fr; } .coacharea { padding:4px 10px 12px; } }
.ownerbar { margin:-4px 0 8px; font-size:13px; color:var(--acc); }
.ownerbar .welcome { background:var(--acc); color:#fff; border-radius:999px; padding:1px 9px; margin-left:6px; font-size:12px; }
.filters.login label:has(input[name=player]), .filters.login label:has(input[name=team]) { min-width:220px; }
.filters.addp .poschips.wide { flex-basis:100%; display:flex; flex-wrap:wrap; gap:6px 18px; align-items:center; font-size:13px; }
ul.teamlist.plain { margin:0; }
ul.teamlist { list-style:none; padding:0; margin:0 14px 4px; }
ul.teamlist li { display:flex; gap:10px; align-items:center; padding:8px 0; border-bottom:1px solid var(--line); }
ul.teamlist li:last-child { border-bottom:0; }
ul.teamlist .logo { width:36px; height:36px; flex:none; object-fit:contain; border-radius:6px; }
ul.teamlist .logo.ph { display:inline-flex; align-items:center; justify-content:center; background:var(--bg); border:1px solid var(--line); color:var(--dim); font-weight:700; }

ol.timeline { list-style:none; padding:0; margin:4px 14px 4px; position:relative; }
ol.timeline::before { content:""; position:absolute; left:70px; top:6px; bottom:6px; border-left:1px solid var(--line); }
ol.timeline li { display:flex; gap:16px; align-items:flex-start; margin:0 0 10px; position:relative; }
ol.timeline li.year { color:var(--dim); font-size:12px; margin:4px 0 8px; padding-left:0; }
ol.timeline li.year::after { content:""; position:absolute; left:65px; top:4px; width:9px; height:9px; border-radius:50%; background:var(--card); border:1px solid var(--dim); }
ol.timeline .when { flex:none; width:54px; text-align:right; font-size:12px; color:var(--dim); padding-top:9px; white-space:nowrap; }
ol.timeline .box { flex:1; min-width:0; border:1px solid var(--line); border-radius:8px; padding:8px 12px; position:relative; }
ol.timeline .box::before { content:""; position:absolute; left:-5px; top:12px; width:9px; height:9px; border-radius:50%; background:var(--acc); border:1px solid var(--card); }
ol.timeline .box ul { margin:4px 0 0; padding-left:0; list-style:none; font-size:13px; }
ol.timeline .box ul li { margin:0; display:block; }

@media (max-width: 900px) {
  .pcols { grid-template-columns: 1fr; }
  .profile .cover { height:120px; }
  .profile .avatar { width:76px; height:76px; margin:-38px 0 0 14px; } .profile .avatar .initials { font-size:26px; }
  .profile .who { padding:4px 14px 0; } .profile .who h1 { font-size:20px; }
  .profile .tabs { gap:16px; overflow-x:auto; }
  .stats3 .v { font-size:16px; }
  ol.timeline::before { left:58px; } ol.timeline .when { width:42px; } ol.timeline li.year::after { left:53px; }
  /* one column on a phone: profile + rankings first, then games and highlights, then the rest */
  .pcols { display:flex; flex-direction:column; gap:0; align-items:stretch; }
  .side, .mainc { display:contents; }
  .mainc .pcard:nth-child(-n+2) { order:1; }
  .side .pcard:nth-child(n+3) { order:2; }
  .mainc .pcard:nth-child(n+3) { order:3; }
}


/* ---- player card (own view): sticker-card layout, trading-card moves, foil for the power tier ---- */
.cardbox .fcard { margin: 4px auto 8px; }
.fcard { --s:1; --rx:0deg; --ry:0deg; --gx:50%; --gy:50%; position:relative; width:calc(300px * var(--s)); font-size:calc(14px * var(--s)); aspect-ratio: 300 / 470;
  border-radius:1.2em; padding:.85em .9em .7em; overflow:hidden; color:#2a2008; isolation:isolate;
  background: linear-gradient(160deg, #e9ebee 0%, #c9ced6 45%, #9aa3ae 100%); border:2px solid rgba(255,255,255,.65);
  box-shadow: 0 10px 30px rgba(0,0,0,.25), inset 0 0 0 1px rgba(0,0,0,.08);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .15s ease, box-shadow .3s ease;
  font-family: "Segoe UI", system-ui, sans-serif; display:flex; flex-direction:column; user-select:none; }
.fcard.big { --s:1.45; }
.fcard.tilting { transition:none; }
.fcard .foil, .fcard .glare { position:absolute; inset:0; pointer-events:none; z-index:0; }
.fcard .glare { background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,.45), rgba(255,255,255,0) 55%); opacity:0; transition:opacity .2s; }
.fcard.tilting .glare { opacity:1; }
.fcard > *:not(.foil):not(.glare):not(.bgphoto):not(.tint) { position:relative; z-index:1; }
/* the picture fills the whole card; the tier colour lies over it at 90%, the portrait window shows it clear */
.fcard .bgphoto { position:absolute; inset:0; z-index:0; background-size:cover; background-position:center top; }
.fcard .tint { position:absolute; inset:0; z-index:0; background:inherit; opacity:.9; }
.fcard .fmid { display:flex; justify-content:center; }
/* the overall, the rank, the crest, the number and the name sit on the picture; they never catch the pointer (adjust mode drags the frame) */
.fcard .portrait .ovr, .fcard .portrait .hp, .fcard .portrait .band { position:absolute; pointer-events:none; }
.fcard .ovr { top:.4em; left:.4em; display:flex; flex-direction:column; align-items:center; line-height:1; padding:.3em .45em .25em; border-radius:.6em; background:rgba(255,255,255,.72); border:1px solid rgba(0,0,0,.12); min-width:2.6em; }
.fcard .ovr b { font-size:2.1em; font-weight:800; letter-spacing:-.03em; }
.fcard .ovr span { font-size:.8em; font-weight:700; letter-spacing:.08em; margin-top:.1em; }
.fcard .band { left:0; right:0; bottom:0; display:flex; align-items:flex-end; gap:.4em; padding:2.2em .5em .35em; background:linear-gradient(to bottom, rgba(0,0,0,0), rgba(10,8,4,.72)); color:#fff; }
.fcard .band .fname { flex:1; min-width:0; margin:0; padding:0; border:0; text-align:center; font-size:1.3em; font-weight:800; letter-spacing:-.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow:0 1px 2px rgba(0,0,0,.6); }
.fcard .band .fname .fn { font-weight:500; font-size:.75em; }
.fcard .stage { font-size:.68em; font-weight:700; letter-spacing:.06em; text-transform:uppercase; padding:.25em .7em; border-radius:999px;
  background:rgba(255,255,255,.55); border:1px solid rgba(0,0,0,.12); white-space:nowrap; }
.fcard .hp { top:.4em; right:.4em; display:flex; flex-direction:column; align-items:center; gap:.15em; font-weight:800; line-height:1; text-align:center; padding:.3em .45em .25em; border-radius:.6em; background:rgba(255,255,255,.72); border:1px solid rgba(0,0,0,.12); min-width:2.6em; }
.fcard .hp .ico { font-size:.95em; }
.fcard .hp b { font-size:1.25em; } .fcard .hp small { font-size:.58em; font-weight:600; opacity:.75; }
.fcard .portrait { position:relative; margin:0; width:15.8em; height:18.7em; border-radius:.9em; overflow:hidden;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.7), rgba(255,255,255,.15) 70%), repeating-linear-gradient(135deg, rgba(0,0,0,.05) 0 2px, transparent 2px 9px);
  display:flex; align-items:center; justify-content:center; border:1px solid rgba(0,0,0,.12); }
.fcard .portrait img:not(.crest) { width:100%; height:100%; object-fit:cover; object-position:top; }
.fcard .portrait .initials { font-size:3.6em; font-weight:800; opacity:.55; letter-spacing:-.04em; }
.fcard .portrait .crest { width:2em; height:2em; object-fit:contain; filter:drop-shadow(0 1px 2px rgba(0,0,0,.5)); flex:none; }
.fcard .portrait .num { font-size:1.35em; font-weight:800; line-height:1; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.6); flex:none; }
.fcard .abil { display:grid; grid-template-columns:repeat(6, 1fr); gap:.2em; text-align:center; margin-top:.4em; }
.fcard .abil .k { display:block; font-size:.68em; font-weight:700; letter-spacing:.05em; opacity:.8; }
.fcard .abil .v { display:block; font-size:1.3em; font-weight:800; line-height:1.05; }
.fcard .moves { margin-top:.45em; display:flex; flex-direction:column; gap:.3em; flex:1; }
.fcard .move { display:grid; grid-template-columns:auto 1fr auto; align-items:center; column-gap:.4em; padding:.3em .5em; border-radius:.5em; background:rgba(255,255,255,.5); border:1px solid rgba(0,0,0,.1); }
.fcard .move .mico { font-size:.95em; }
.fcard .move b { font-size:.9em; }
.fcard .move .pw { font-weight:800; font-size:1.05em; }
.fcard .move p { grid-column:1 / -1; margin:.1em 0 0; font-size:.66em; line-height:1.3; opacity:.85; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fcard .ffoot { display:grid; grid-template-columns:1fr auto 1fr; gap:.5em; margin-top:.45em; font-size:.62em; text-transform:lowercase; letter-spacing:.03em; opacity:.85; border-top:1px solid rgba(0,0,0,.18); padding-top:.3em; }
.fcard .ffoot b { text-transform:none; letter-spacing:0; }
.fcard .ffoot span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .fcard .ffoot span:last-child { text-align:right; }
.fcard .fset { display:flex; justify-content:space-between; align-items:center; gap:.4em; margin-top:.3em; font-size:.6em; opacity:.8; }
.fcard .fset .stars { font-size:1.2em; letter-spacing:.1em; }
.fcard .fset span:first-child { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* tiers */
.fcard.tier-bronze { color:#fff4e6; background: linear-gradient(160deg, #d79a66 0%, #a66a38 45%, #6f4420 100%); }
.fcard.tier-bronze .stage, .fcard.tier-bronze .move, .fcard.tier-bronze .portrait { background-color:rgba(255,255,255,.14); border-color:rgba(255,255,255,.25); }
.fcard.tier-bronze .move { background:rgba(255,255,255,.14); }
.fcard.tier-bronze .ffoot { border-color:rgba(255,255,255,.3); }
.fcard.tier-bronze .ovr, .fcard.tier-bronze .hp { background:rgba(60,30,10,.55); border-color:rgba(255,255,255,.3); color:#fff4e6; }
.fcard.tier-rookie { color:#30343a; background: linear-gradient(160deg, #f1f3f5 0%, #d3d7dc 50%, #b5bbc3 100%); border:2px dashed rgba(0,0,0,.25); }
.fcard.tier-rookie .abil .v, .fcard.tier-rookie .ovr b { opacity:.55; }
.fcard.tier-power { color:#3a2a00; border-color:rgba(255,248,210,.9);
  background: linear-gradient(160deg, #fff6c2 0%, #f7d35a 22%, #e2ab1c 48%, #fbe68f 70%, #d99a0f 100%);
  box-shadow: 0 12px 34px rgba(120,80,0,.35), 0 0 0 1px rgba(255,230,140,.8), 0 0 26px rgba(255,200,60,.55); animation: fcard-float 6s ease-in-out infinite; }
.fcard.tier-power .foil { opacity:.9; mix-blend-mode:overlay;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.75) 42%, rgba(255,120,220,.35) 48%, rgba(120,255,255,.35) 54%, rgba(255,255,255,.7) 60%, transparent 76%);
  background-size:260% 260%; animation: fcard-foil 4.5s linear infinite; }
.fcard.tier-power .glare { background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,.7), rgba(255,255,255,0) 50%), conic-gradient(from 0deg at var(--gx) var(--gy), rgba(255,0,170,.18), rgba(0,255,220,.18), rgba(255,230,0,.18), rgba(255,0,170,.18)); mix-blend-mode:screen; }
.fcard.tier-power .stage, .fcard.tier-power .move { background:rgba(255,252,230,.6); border-color:rgba(160,110,0,.25); }
.fcard.tier-power .portrait { background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.85), rgba(255,240,170,.25) 70%), repeating-linear-gradient(135deg, rgba(160,110,0,.12) 0 2px, transparent 2px 9px); border-color:rgba(160,110,0,.3); }
.fcard.tier-power .ovr b, .fcard.tier-power .hp b { text-shadow: 0 1px 0 rgba(255,255,255,.6), 0 0 12px rgba(255,220,120,.6); }
.fcard.tier-power .ovr, .fcard.tier-power .hp { background:rgba(255,252,230,.8); border-color:rgba(160,110,0,.3); }
.fcard.tier-power .fset .stars { color:#8a5a00; text-shadow:0 0 8px rgba(255,255,255,.9); animation: fcard-twinkle 2.2s ease-in-out infinite; }
@keyframes fcard-foil { 0% { background-position: 120% 120%; } 100% { background-position: -40% -40%; } }
@keyframes fcard-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes fcard-twinkle { 0%, 100% { opacity:.75; } 50% { opacity:1; letter-spacing:.16em; } }
@media (prefers-reduced-motion: reduce) { .fcard, .fcard .foil, .fcard .fset .stars { animation:none !important; } .fcard { transform:none !important; } }
/* the full-size page */
.cardpage { max-width:900px; margin:0 auto; }
.cardstage { display:flex; justify-content:center; padding:34px 16px 38px; border-radius:18px; background: radial-gradient(ellipse at 50% 0%, #2a3140, #0f1115 70%); margin:8px 0 18px; }
.cardstage.power { background: radial-gradient(ellipse at 50% 0%, #4a3a10, #14110a 70%); }
.cardpage .powertag { display:inline-block; font-size:11px; font-weight:800; letter-spacing:.12em; padding:1px 7px; border-radius:999px; color:#3a2a00; background:linear-gradient(90deg,#fff2b0,#e9b528); }
.cardhow ul { padding-left:18px; } .cardhow li { margin:6px 0; }
@media (max-width: 560px) { .fcard.big { --s:1.05; } .cardstage { padding:20px 8px; } }

/* picture upload + card image */
.photof { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:8px 0; }
.photof.compact { justify-content:center; }
.filebtn { display:inline-block; padding:5px 12px; border:1px solid var(--acc); color:var(--acc); border-radius:8px; cursor:pointer; font-size:13px; background:var(--card); }
.filebtn:hover { background:var(--acc); color:#fff; }
.filebtn input { display:none; }
a.btn { display:inline-block; padding:5px 12px; border:1px solid var(--line); border-radius:8px; font-size:13px; background:var(--card); }
a.btn:hover { text-decoration:none; border-color:var(--acc); }
.cardtools { margin:-6px 0 16px; }
.pngprev img { display:block; max-width:360px; width:100%; margin-top:8px; border-radius:16px; box-shadow:0 8px 24px rgba(0,0,0,.25); }
p.err { color:#cf222e; font-weight:600; }

/* picture adjust mode */
.fcard .portrait img.pphoto { will-change:transform; }
.adjust { margin:0 0 18px; border:1px solid var(--line); border-radius:12px; padding:10px 14px; background:var(--card); }
.adjust summary { cursor:pointer; }
.adjwrap { display:grid; grid-template-columns: minmax(0, 572px) minmax(220px, 1fr); gap:16px; align-items:start; margin-top:10px; }
.adjframe { aspect-ratio: 572 / 290; border-radius:16px; overflow:hidden; border:2px solid var(--acc); background:#222; cursor:grab; touch-action:none; position:relative; }
.adjframe:active { cursor:grabbing; }
.adjframe img { width:100%; height:100%; object-fit:cover; display:block; pointer-events:none; }
.adjform label { display:block; margin:6px 0; font-size:13px; }
.adjform input[type=range] { width:100%; display:block; margin-top:2px; }
.adjbtns { margin-top:10px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
@media (max-width: 760px) { .adjwrap { grid-template-columns: 1fr; } }

/* your saved card */
.yourcard { margin:6px 0 18px; padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:var(--card); }
.yourcard h2 { margin:0 0 10px; display:flex; align-items:center; gap:10px; }
.yourcard .savedtag { font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; padding:2px 8px; border-radius:999px; background:#1a7f37; color:#fff; }
.yourcard.justsaved { border-color:#1a7f37; box-shadow:0 0 0 3px rgba(26,127,55,.15); }
.yourcardrow { display:flex; gap:18px; align-items:flex-start; flex-wrap:wrap; }
.yourcard img.cardimg { width:220px; max-width:100%; border-radius:14px; box-shadow:0 8px 24px rgba(0,0,0,.25); display:block; }
.yourcardtxt { flex:1; min-width:220px; }
.yourcardtxt p { margin:0 0 10px; }
a.btn.primary { background:var(--acc); color:#fff; border-color:var(--acc); }

/* fitting the picture inside the card's own window */
.fcard.editing { transform:none !important; animation:none; }
.fcard .portrait.edit { cursor:grab; touch-action:none; outline:2px dashed rgba(255,255,255,.85); outline-offset:-2px; box-shadow:0 0 0 2px var(--acc); }
.fcard .portrait.edit:active { cursor:grabbing; }
.fcard .portrait.edit img.pphoto { pointer-events:none; }
.fcard .portrait .edithint { position:absolute; left:50%; top:45%; transform:translateX(-50%); font-size:.6em; font-weight:600; letter-spacing:.04em; padding:.2em .7em; border-radius:999px; background:rgba(0,0,0,.55); color:#fff; white-space:nowrap; pointer-events:none; }
.cardstage.editing { padding-bottom:22px; }
.keepbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; margin:12px 0 6px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--card); }
.keepbar label.zoom { display:flex; align-items:center; gap:8px; font-size:13px; min-width:220px; flex:1; }
.keepbar label.zoom input { flex:1; }
.keepbar button.primary { background:var(--acc); color:#fff; border-color:var(--acc); }

/* coach assessment */
.statustag { display:inline-block; font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; background:var(--acc); color:#fff; white-space:nowrap; }
.statustag.dnp { background:var(--dim); }
.abil6 { display:grid; grid-template-columns:repeat(6, 1fr); gap:6px; text-align:center; margin:6px 0; }
.abil6 .k { display:block; font-size:11px; font-weight:700; letter-spacing:.05em; color:var(--dim); }
.abil6 .v { display:block; font-size:20px; font-weight:800; line-height:1.1; }
.abil6.inputs input { width:100%; text-align:center; font-weight:700; padding:4px 2px; }
.atext { margin:6px 0; }
.assessf input[type=text], .assessf textarea { width:100%; margin:6px 0; }
svg.radar .ghost { fill:var(--dim); fill-opacity:.12; stroke:var(--dim); stroke-width:1.2; stroke-dasharray:3 3; }

/* virtual match */
.virtual .vsetup { border:1px solid var(--line); border-radius:12px; background:var(--card); padding:12px 14px; margin:10px 0 14px; }
.vpick { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.vpick label { display:block; font-size:13px; }
.vpick input[type=text] { width:100%; display:block; margin-top:4px; padding:6px 8px; }
.vquick { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:10px; }
.vquick .grow { flex:1; }
.vquick label.speed { display:flex; align-items:center; gap:6px; font-size:13px; }
.vquick button.primary { background:var(--acc); color:#fff; border-color:var(--acc); font-weight:700; padding:6px 16px; }
.varena { border:1px solid var(--line); border-radius:12px; background:var(--card); padding:12px; }
.vboard { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; }
.vteam { display:flex; align-items:center; gap:8px; font-size:15px; min-width:0; } .vteam b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vteam.b { justify-content:flex-end; }
.vteam .dot { width:14px; height:14px; border-radius:50%; background:#1f6feb; flex:none; } .vteam.b .dot { background:#d73a49; }
.vscore { display:flex; align-items:center; gap:12px; font-size:30px; font-weight:800; }
.vscore .clock { font-size:14px; font-weight:600; color:var(--dim); font-variant-numeric:tabular-nums; min-width:70px; text-align:center; }
.vstatus { min-height:18px; margin:4px 0 6px; }
#pitch { display:block; width:100%; height:auto; border-radius:8px; background:#2a8234; }
/* the 3D match in a box in place of the 2D pitch; the board below manages it */
.v3d { position:relative; width:100%; aspect-ratio:16/9; max-height:78vh; border-radius:8px; overflow:hidden; background:#0b0f14; }
.v3d iframe { position:absolute; inset:0; width:100%; height:100%; border:0; display:block; }
.vctl3d { display:none; gap:10px; align-items:center; flex-wrap:wrap; margin-top:8px; }
.varena.m3d .vctl3d { display:flex; }
.varena.m3d #pitch, .varena.m3d .vboard, .varena.m3d .vctl, .varena.m3d .vtools, .varena.m3d .vbottom, .varena.m3d .vlineups { display:none !important; }
.vctl { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:8px; }
.vbottom { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:8px; }
.vstats { display:flex; flex-direction:column; gap:4px; font-size:13px; }
ol.vevents { list-style:none; margin:0; padding:0; max-height:220px; overflow:auto; font-size:13px; border-left:2px solid var(--line); }
ol.vevents li { padding:3px 8px; } ol.vevents li.goal { font-weight:700; background:rgba(31,111,235,.08); }
.vlineups { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:14px; }
.vlineups h3 { margin:0 0 6px; font-size:15px; } .vl.a h3 { color:#1f6feb; } .vl.b h3 { color:#d73a49; }
.vlineups table { font-size:12px; }
@media (max-width: 760px) { .vpick, .vbottom, .vlineups { grid-template-columns:1fr; } .vscore { font-size:24px; } }

.vrecent { margin:10px 0 12px; font-size:13px; }
.vrecent h3 { margin:0 0 4px; font-size:14px; }
.vrecent table { border-collapse:collapse; width:100%; }
.vrecent td { padding:3px 6px; border-top:1px solid var(--line); vertical-align:middle; }
.vrecent td.score { font-weight:700; white-space:nowrap; }
.vrecent button { font-size:12px; padding:2px 8px; }

.install { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:8px 16px 0; padding:8px 12px; border:1px solid var(--line); border-radius:10px; background:var(--card); font-size:14px; }
.install button { font-size:13px; }
@media (max-width: 720px) { .vctl { flex-wrap:wrap; } .vboard b { font-size:15px; } }

.vmanage { margin:10px 0; border:1px solid var(--line); border-radius:10px; padding:6px 12px; font-size:13px; }
.vmanage summary { cursor:pointer; font-weight:600; }
.vmanage-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:8px; }
@media (max-width: 720px) { .vmanage-grid { grid-template-columns:1fr; } }
.vmanage .vm h4 { margin:4px 0 6px; font-size:14px; } .vmanage .vm.a h4 { color:#1f6feb; } .vmanage .vm.b h4 { color:#d73a49; }
.vmanage .vm table { border-collapse:collapse; width:100%; } .vmanage .vm td { padding:2px 4px; border-top:1px solid var(--line); }
.vmanage .vm select { max-width:100%; font-size:12px; }
.vmanage .vm .bench { margin:6px 0 0; } .vmanage .vm .actions { margin-top:8px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
/* the manager's board: a portrait half pitch with a circle per position, the bench as chips */
.vmanage .vm label { margin-right:10px; }
.vmanage .board { position:relative; width:100%; max-width:340px; aspect-ratio:3/4; margin:10px auto 6px; border:2px solid rgba(255,255,255,.7); border-radius:6px; box-sizing:border-box;
  background:repeating-linear-gradient(180deg, #2f8f3a 0 12.5%, #2a8234 12.5% 25%); touch-action:none; }
.vmanage .board::before { content:""; position:absolute; left:20%; right:20%; bottom:-2px; height:21%; border:2px solid rgba(255,255,255,.7); border-bottom:0; }
.vmanage .board::after { content:""; position:absolute; left:50%; top:0; width:36%; aspect-ratio:1; transform:translate(-50%,-50%); border:2px solid rgba(255,255,255,.7); border-radius:50%; clip-path:inset(50% 0 0 0); }
.vmanage .slot { position:absolute; width:56px; transform:translate(-50%,-50%); text-align:center; cursor:grab; user-select:none; -webkit-user-select:none; z-index:1; }
.vmanage .slot .c { width:34px; height:34px; margin:0 auto; border-radius:50%; background:var(--kit); color:#fff; font-weight:700; font-size:13px; line-height:34px; border:2px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,.45); transition:transform .1s; }
.vmanage .slot .nm { display:block; font-size:10px; color:#fff; text-shadow:0 1px 2px #000, 0 0 3px #000; white-space:nowrap; margin-top:2px; overflow:hidden; text-overflow:ellipsis; }
.vmanage .slot.empty .c { background:rgba(255,255,255,.22); border-style:dashed; font-size:10px; }
.vmanage .slot.away .c { opacity:.55; }
.vmanage .slot.sel .c, .vmanage .chip.sel { outline:3px solid #ffd33d; outline-offset:1px; }
.vmanage .slot.over .c { transform:scale(1.2); outline:3px solid #fff; }
.vmanage .slot.lift { opacity:.35; }
.vmanage .chips { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0; }
.vmanage .chip { padding:3px 9px; border-radius:14px; background:var(--card); border:1px solid var(--line); font-size:12px; cursor:grab; user-select:none; -webkit-user-select:none; border-left:4px solid var(--kit); }
.vmanage .chip.off { opacity:.45; cursor:not-allowed; }
.vmanage .drag { position:fixed; pointer-events:none; z-index:50; opacity:.92; transform:none; }
.vmanage .slot.drag { transform:translate(0,0); }

/* virtual match on a phone: the pitch fills the screen, the controls become icons on the edge */
.vtools { display:none; }
body.matchmode { overflow:hidden; }
body.matchmode header.top, body.matchmode footer, body.matchmode .install, body.matchmode .virtual > h1, body.matchmode .virtual > p.meta,
body.matchmode .vsetup, body.matchmode .vrecent, body.matchmode .vctl, body.matchmode .vlineups { display:none !important; }
body.matchmode main { padding:0; max-width:none; }
body.matchmode .varena { position:fixed; inset:0; z-index:50; margin:0; padding:0; border:0; border-radius:0; background:#0b1a10; display:flex; align-items:center; justify-content:center; }
body.matchmode #pitch { width:auto; height:auto; border-radius:0; }
body.matchmode .vboard { position:absolute; top:env(safe-area-inset-top, 0); left:50%; transform:translateX(-50%); z-index:55; background:rgba(0,0,0,.55); color:#fff; border-radius:0 0 10px 10px; padding:2px 12px; gap:10px; max-width:92vw; }
body.matchmode .vboard .vscore { font-size:20px; } body.matchmode .vteam { font-size:12px; } body.matchmode .vteam b { color:#fff; }
body.matchmode .vscore .clock { color:#ddd; font-size:12px; min-width:56px; }
body.matchmode .vstatus { position:absolute; left:8px; bottom:4px; z-index:55; color:#cfd6dd; font-size:11px; max-width:60vw; margin:0; text-shadow:0 1px 2px #000; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
body.matchmode .vtools { display:flex; flex-direction:column; gap:8px; position:absolute; right:env(safe-area-inset-right, 0); top:50%; transform:translateY(-50%); z-index:56; padding:6px; }
.vtools button { width:40px; height:40px; border-radius:50%; border:1px solid rgba(255,255,255,.35); background:rgba(0,0,0,.5); color:#fff; font-size:17px; padding:0; line-height:1; }
.vtools button.on { background:var(--acc); border-color:var(--acc); }
body.matchmode .vbottom, body.matchmode .vmanage { display:none; position:fixed; left:0; right:0; bottom:0; max-height:72vh; overflow:auto; z-index:70; margin:0; background:var(--card); border-radius:12px 12px 0 0; padding:10px 14px; box-shadow:0 -4px 24px rgba(0,0,0,.5); }
body.matchmode .vbottom.open, body.matchmode .vmanage.open { display:block; }
body.matchmode .vmanage summary { display:none; }
@media (max-width: 760px) { .virtual > p.meta { display:none; } .vmanage summary .dim { display:none; } }

/* the app on a phone: a tab bar with icons at the bottom instead of the text menu, big coloured buttons */
.tabbar { display:none; }
@media (max-width: 760px) {
  header.top nav { display:none; }
  .tabbar { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:40; background:var(--card); border-top:1px solid var(--line); padding:6px 4px calc(6px + env(safe-area-inset-bottom, 0)); justify-content:space-around; }
  .tabbar a { flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; padding:4px 2px; border-radius:10px; font-size:11px; text-decoration:none; color:var(--dim); }
  .tabbar a .ic { font-size:20px; line-height:1.1; }
  .tabbar a.on { color:var(--acc); background:rgba(31,111,235,.12); }
  main { padding-bottom:88px; }
  .virtual h1 { font-size:22px; margin:6px 0 10px; }
  .vquick { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .vquick > span.dim, .vquick .grow { display:none; }
  .vquick select { padding:10px; font-size:15px; border-radius:10px; }
  .vquick button { padding:12px; font-size:15px; border-radius:12px; font-weight:700; color:#fff; border:0; box-shadow:0 2px 6px rgba(0,0,0,.25); }
  .vquick #qtop { background:#8957e5; } .vquick #setup { background:#1f6feb; }
  .vquick #start.primary, .vquick #start3d.primary { background:#2da44e; border-color:#2da44e; grid-column:1 / -1; font-size:18px; padding:14px; }
  .vquick label.speed { grid-column:1 / -1; }
  .vquick > * { min-width:0; } .vquick select { width:100%; }
  .vpick input[type=text], .vquick input, .vquick select { box-sizing:border-box; max-width:100%; }
  .virtual .vsetup { padding:10px 12px; }
  .vctl button { padding:10px 14px; border-radius:10px; font-weight:600; }
  .vctl #pause { background:#f0a020; color:#fff; border-color:#f0a020; } .vctl #fullscreen { background:#1f6feb; color:#fff; border-color:#1f6feb; }
}
body.matchmode .tabbar { display:none !important; }
.vtools #t-pause { background:#f0a020; border-color:#f0a020; } .vtools #t-speed { background:#1f6feb; border-color:#1f6feb; font-weight:700; font-size:14px; }
.vtools #t-subs { background:#8957e5; border-color:#8957e5; } .vtools #t-feed { background:#2da44e; border-color:#2da44e; }
.vtools #t-sound { background:#57606a; border-color:#57606a; } .vtools #t-exit { background:#d73a49; border-color:#d73a49; }
.vtools button { box-shadow:0 2px 8px rgba(0,0,0,.45); }
.vtools button.on { outline:3px solid #fff; background-color:inherit; }

/* the Help page */
.help p { max-width: 80ch; line-height: 1.5; }
.help h2 { margin-top: 28px; padding-top: 8px; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.help .toc { columns: 2; max-width: 60ch; padding-left: 20px; margin: 8px 0 16px; }
.help .toc li { margin: 2px 0; }
@media (max-width: 760px) { .help .toc { columns: 1; } }

/* forecasts: a win / draw / loss bar */
.wdl { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.wdl .bar { display:inline-flex; width:84px; height:9px; border-radius:5px; overflow:hidden; background:var(--line); }
.wdl .bar i { display:block; height:100%; } .wdl .bar .w { background:#1a7f37; } .wdl .bar .d { background:#b08800; } .wdl .bar .l { background:#cf222e; }
.wdl .pct { font-size:12px; color:var(--dim); } .wdl .pct b { color:var(--fg); }
.wdl.thin .bar { opacity:.55; }
.card.next .v.small { font-size:16px; line-height:1.3; } .card.next { min-width:220px; }
td .pos { color:#1a7f37; } td .neg { color:#cf222e; }
table.fixtures td { white-space:nowrap; } table.fixtures td a { white-space:normal; }
@media (max-width: 760px) { .wdl .bar { width:52px; } .wdl { gap:4px; } .card.next { flex-basis:100%; } table.fixtures td a { font-size:13px; } .me-week td { white-space:normal; } }

/* trends and head-to-head */
.delta { font-size:10px; font-weight:600; } .delta.pos { color:#1a7f37; } .delta.neg { color:#cf222e; }
.card .v.form span { display:inline-block; width:22px; height:22px; line-height:22px; text-align:center; border-radius:4px; font-size:13px; margin-right:3px; color:#fff; }
.card .v.form .w, td.form .w { background:#1a7f37; } .card .v.form .l, td.form .l { background:#cf222e; } .card .v.form .d, td.form .d { background:#9a6700; }
td.form span { display:inline-block; width:20px; height:17px; line-height:17px; padding:0; text-align:center; border-radius:4px; color:#fff; font-size:12px; margin:1px 2px 1px 0; vertical-align:middle; }   /* one box per game: W, D and L are different widths as letters */
svg.spark.trend .dot.w { fill:#1a7f37; } svg.spark.trend .dot.d { fill:#9a6700; } svg.spark.trend .dot.l { fill:#cf222e; }
.cols.trend h3 { margin:6px 0; font-size:14px; }
.h2h { display:grid; grid-template-columns:1fr auto 1fr; gap:12px; align-items:start; margin:8px 0; }
.h2h h2 { margin:0; font-size:18px; } .h2h .mid { font-size:22px; padding-top:4px; }
table.h2hstats th { text-align:center; font-weight:500; color:var(--dim); text-transform:none; font-size:13px; }
table.h2hstats td { font-size:16px; width:40%; } table.h2hstats td:first-child { text-align:right; } table.h2hstats td:last-child { text-align:left; }
table.h2hstats td.best { font-weight:700; color:var(--acc); }
form.compare label { flex:1 1 260px; } form.compare input[type=text] { width:100%; }
@media (max-width: 760px) { .h2h { grid-template-columns:1fr; } .h2h .mid { display:none; } }

/* scouting report and standings */
details.scout { margin:10px 0; border:1px solid var(--line); border-radius:8px; padding:6px 12px; background:var(--card); }
details.scout summary { cursor:pointer; font-size:14px; } details.scout h4 { margin:10px 0 4px; font-size:13px; }
details.scout .card .v.small { font-size:14px; }
table.standings td.form span { font-size:11px; width:18px; height:16px; line-height:16px; }

/* privacy */
.ownerbar.hiddenbar { color:#9a6700; }
form.privf button { margin-bottom:4px; }

/* the one-page profile for coaches */
.recruit { max-width:860px; margin:0 auto; }
.recruit .rhead { display:flex; gap:20px; align-items:flex-start; margin:8px 0 16px; }
.recruit .rcard { width:150px; border-radius:8px; box-shadow:0 2px 8px rgba(0,0,0,.3); } .recruit .rphoto { width:120px; height:120px; object-fit:cover; border-radius:50%; }
.recruit h1 { margin:0 0 4px; } .recruit .rsub { margin:2px 0; }
.recruit .rstats { display:flex; flex-wrap:wrap; gap:10px; margin-top:10px; }
.recruit .rstats > div { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:8px 12px; min-width:130px; display:flex; flex-direction:column; }
.recruit .rstats .k { font-size:11px; color:var(--dim); text-transform:uppercase; } .recruit .rstats .v { font-size:22px; font-weight:700; }
.recruit section { margin:14px 0; } .recruit section h2 { font-size:17px; margin:0 0 6px; }
.recruit ul.rhl { padding-left:18px; } .recruit ul.rhl li { margin:3px 0; }
.recruit .rfoot { color:var(--dim); font-size:11px; border-top:1px solid var(--line); padding-top:8px; margin-top:18px; }
.tabs a.ext { margin-left:auto; color:var(--acc); }
@media print {
  header.top, footer, .install, .tabbar, .noprint { display:none !important; }
  body { background:#fff; color:#000; } main { padding:0; max-width:none; }
  .recruit .rstats > div, .recruit section { break-inside:avoid; }
  a { color:inherit; text-decoration:none; }
}

/* full-screen match: the scoreboard leaves the pitch (and the dugouts along its top) alone */
body.matchmode.board-side .vboard { left:6px; right:auto; top:50%; transform:translateY(-50%); flex-direction:column; align-items:stretch; width:calc(var(--side, 120px) - 14px); max-width:none; border-radius:10px; padding:8px 6px; gap:6px; text-align:center; }
body.matchmode.board-side .vteam { font-size:11px; white-space:normal; line-height:1.2; justify-content:center; flex-direction:column; gap:2px; }
body.matchmode.board-side .vteam b { white-space:normal; overflow-wrap:break-word; display:block; max-height:3.7em; overflow:hidden; font-size:10px; line-height:1.2; }
body.matchmode.board-side .vscore { flex-direction:column; gap:0; } body.matchmode.board-side .vscore b { font-size:26px; line-height:1.1; }
body.matchmode.board-side .vscore .clock { order:-1; min-width:0; }
body.matchmode.board-side .vstatus { left:6px; max-width:calc(var(--side, 120px) - 14px); white-space:normal; font-size:10px; line-height:1.2; }
body.matchmode.board-bottom .varena { align-items:flex-start; padding-top:env(safe-area-inset-top, 0); }
body.matchmode.board-bottom .vboard { top:calc(var(--pitch-h, 60vh) + env(safe-area-inset-top, 0) + 6px); bottom:auto; border-radius:10px; padding:4px 12px; }
body.matchmode.board-bottom .vtools { top:calc(var(--pitch-h, 60vh) + env(safe-area-inset-top, 0) + 52px); right:auto; left:50%; transform:translateX(-50%); flex-direction:row; }
body.matchmode.board-bottom .vstatus { bottom:auto; top:2px; left:50%; transform:translateX(-50%); max-width:90vw; text-align:center; }
body.matchmode.board-bottom .vboard { max-width:96vw; } body.matchmode.board-bottom .vteam b { max-width:30vw; }

/* the forecast line on the virtual page, and the play button on listed games */
.vforecast { margin:4px 0 10px; padding:8px 12px; background:var(--card); border:1px solid var(--line); border-radius:8px; font-size:13px; }
a.play { display:inline-block; width:26px; height:26px; line-height:26px; text-align:center; border-radius:50%; background:#2da44e; color:#fff; font-size:11px; text-decoration:none; }
a.play:hover { background:#1a7f37; color:#fff; }

/* the family's status line and the live-update bar */
.profile h1 .statustag.pstatus { vertical-align:middle; margin-left:4px; font-size:12px; }
.profile .sub.statusnote { margin-top:-4px; color:var(--fg); }
form.notef.profilef label { display:flex; flex-direction:column; gap:3px; font-size:12px; color:var(--dim); }
form.notef.profilef .row3 { grid-template-columns:auto auto 1fr; }
.livebar { position:fixed; left:50%; bottom:72px; transform:translateX(-50%); z-index:50; max-width:min(92vw, 560px); display:flex; align-items:center; gap:10px;
  padding:9px 12px 9px 14px; background:var(--card); color:var(--fg); border:1px solid var(--acc); border-radius:999px; box-shadow:0 6px 24px rgba(0,0,0,.18); font-size:13px; }
.livebar button { font:inherit; font-size:13px; padding:4px 12px; border:0; border-radius:999px; background:var(--acc); color:#fff; cursor:pointer; }
.livebar button.x { background:transparent; color:var(--dim); padding:0 4px; font-size:18px; line-height:1; }
@media (min-width: 801px) { .livebar { bottom:24px; } }

/* the draggable specialty hexagon */
.shapebox svg.radar .dot.grab { cursor:grab; r:5; stroke-width:2; }
.shapebox.dragging svg.radar .dot.grab { cursor:grabbing; }
.shapebox svg.radar .dot.grab:hover { r:6.5; }
.shapebox svg.radar { touch-action:none; }
@media (pointer: coarse) { .shapebox svg.radar .dot.grab { r:11; stroke-width:3; } .shapebox svg.radar .dot.grab:hover { r:11; } }   /* a fingertip needs a bigger handle than a mouse pointer */
.shapebox .shapevals { display:flex; justify-content:center; flex-wrap:wrap; gap:4px 12px; margin:2px 0 4px; font-size:12px; color:var(--dim); }
.shapebox .shapevals b { color:var(--fg); }
.shapebox .shapehint { display:flex; align-items:center; justify-content:center; gap:10px; min-height:22px; margin:0 0 6px; }
.shapebox .shapestate.ok { color:#1a7f37; } .shapebox .shapestate.err { color:#cf222e; }
.shapebox .shapereset { font:inherit; font-size:12px; background:none; border:1px solid var(--line); border-radius:999px; padding:2px 10px; color:var(--dim); cursor:pointer; }
.shapebox .shapebtns { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin:0 0 8px; }
.shapebox .shapesave { font:inherit; font-size:13px; padding:5px 16px; border:0; border-radius:999px; background:var(--acc); color:#fff; cursor:pointer; }
.shapebox .shapeundo { font:inherit; font-size:12px; background:none; border:1px solid var(--line); border-radius:999px; padding:2px 10px; color:var(--dim); cursor:pointer; }
.shapebox.pending svg.radar .val { stroke-dasharray:5 3; }
.rank .over { color:#9a6700; cursor:help; margin-left:4px; }

/* playoff positions in the standings, and the account's own club */
table.standings tr.adv-auto td:first-child { box-shadow: inset 4px 0 0 #1a7f37; }
table.standings tr.adv-cup td:first-child { box-shadow: inset 4px 0 0 #1f6feb; }
table.standings tr.adv-show td:first-child { box-shadow: inset 4px 0 0 #9a6700; }
.advtag { display:inline-block; margin-left:5px; font-size:10px; font-weight:800; line-height:1; padding:2px 4px; border-radius:4px; color:#fff; background:#1a7f37; }
tr.adv-cup .advtag { background:#1f6feb; } tr.adv-show .advtag { background:#9a6700; }
.advlegend { margin:4px 0 6px; } .advlegend .sw { display:inline-block; width:10px; height:10px; border-radius:2px; background:#1a7f37; vertical-align:middle; margin-right:4px; }
a.mine { display:inline-block; padding:1px 7px; border:2px solid var(--acc); border-radius:6px; background:rgba(31,111,235,.08); font-weight:600; }

/* a result still to come: an empty box with a border */
td.form span.p, .card .v.form span.p, .coacharea .v.form span.p { background:transparent; border:1.5px solid var(--dim); box-sizing:border-box; }
.pendbox { display:inline-block; width:22px; height:16px; border:1.5px solid var(--dim); border-radius:4px; vertical-align:middle; box-sizing:border-box; }

/* the logo beside the name; programs and honors */
header .brand { display:inline-flex; align-items:center; gap:8px; }
header .brand .logo { width:28px; height:28px; border-radius:7px; display:block; }
.program .proggrid { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:10px 18px; margin:0 14px 10px; }
.program .proggrid > div { display:flex; flex-direction:column; gap:3px; }
.program .proggrid .k { font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--dim); }
.program .proggrid ul.v { margin:0; padding-left:18px; font-size:13px; }
.program h3 { font-size:14px; margin:12px 14px 6px; }
.program details.rosterblock { margin:0 14px 8px; border:1px solid var(--line); border-radius:8px; padding:6px 10px; }
.program details.rosterblock summary { cursor:pointer; font-size:13px; }
.program ul.honorlist { columns:3; column-gap:18px; margin:6px 0 2px; padding-left:18px; font-size:13px; }
@media (max-width: 700px) { .program ul.honorlist { columns:2; } }
@media (max-width: 420px) { .program ul.honorlist { columns:1; } }
ul.honors { list-style:none; margin:4px 14px 6px; padding:0; font-size:13px; }
ul.honors li { margin:2px 0; }
.honortag { color:#b8860b; margin-right:4px; }

/* virtual match lineup: the standout ability and the one to work on */
.vl td.hi { color:#1a7f37; font-weight:700; } .vl td.lo { color:#cf222e; }
.vl .pos { color:#1a7f37; font-weight:600; } .vl .neg { color:#cf222e; }

/* the events list on the Programs page */
.evstat { display:inline-block; font-size:11px; font-weight:600; padding:1px 7px; border-radius:999px; border:1px solid var(--line); color:var(--dim); white-space:nowrap; }
.evstat.on-now { color:#fff; background:#1a7f37; border-color:#1a7f37; }
.evstat.coming { color:#1f6feb; border-color:#1f6feb; }
.evstat.in-progress { color:#9a6700; border-color:#9a6700; }
table.events td { white-space:normal; } table.events td.nowrap { white-space:nowrap; }
/* the full schedule under a standings table: closed until asked for */
details.fullsched { margin:4px 0 22px; } details.fullsched summary { cursor:pointer; color:var(--acc); font-size:13px; margin:2px 0 8px; }
/* in it: games behind us on grey, games to come on green */
details.fullsched tr.past td { background:rgba(128,134,144,.16); }
details.fullsched tr.upcoming td { background:rgba(46,160,67,.16); }
details.fullsched tr.soon td { background:rgba(255,105,180,.22); }  /* within two days */
