/* Fixtures, results and the points table */
.pt { min-width: 0; }
.pt th.n, .pt td.n { text-align: center; }
.pt td.pts { font-weight: 800; color: var(--green-dark); text-align: center; }
.pt td.nrr { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.pt th:last-child { text-align: right; }
.pt .tm { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.pt .tm a { color: inherit; text-decoration: none; }
.pt .tm a:hover { text-decoration: underline; }
.pt .tlogo { width: 30px; border-radius: 7px; }
.pt tr.q td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
.pt-note { font-size: .84rem; color: var(--muted); margin: 8px 2px 0; }

.mlist { display: grid; gap: 14px; margin: 8px 0 24px; }
.mcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; }
.mcard-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--muted); font-size: .88rem; margin-bottom: 10px; }
.mcard-head .chip { margin-right: 2px; }
.mteams { display: grid; gap: 8px; }
.mside { display: flex; align-items: center; gap: 12px; }
.mside .tlogo { width: 38px; }
.mside .nm { font-weight: 700; flex: 1; min-width: 0; }
.mside .sc { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.mside.win .nm, .mside.win .sc { color: var(--green-dark); }
.mside.win .nm::after { content: " ✓"; }
.mside.tbd .nm { color: var(--muted); font-weight: 600; }
.mcard-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .92rem; }
.mcard-foot .res { font-weight: 700; color: var(--green-dark); }
.mcard-foot .res.up { color: var(--muted); font-weight: 600; }
.season-pick { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; }
.season-pick select { width: auto; }

.mhero { text-align: center; }
.mhero .vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; margin: 14px 0; }
.mhero .side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mhero .side .tlogo { width: 84px; }
.mhero .side .nm { font-weight: 800; font-size: 1.1rem; }
.mhero .side .sc { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.mhero .side.win .sc, .mhero .side.win .nm { color: var(--green-dark); }
.mhero .v { color: var(--muted); font-weight: 700; }
.mhero .resline { font-size: 1.15rem; font-weight: 800; color: var(--green-dark); margin: 6px 0 2px; }
.scans { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.scans a { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.scans img { display: block; width: 100%; height: auto; }
.scans .lab { font-size: .82rem; color: var(--muted); padding: 6px 10px; }
@media (max-width: 560px) { .mhero .side .tlogo { width: 60px; } .mhero .side .sc { font-size: 1.2rem; } }

/* admin */
.sched input[type=date], .sched input[type=time], .sched input[type=text] { margin: 0; min-width: 0; }
.sched td { vertical-align: middle; }
.sched .vs-cell { font-weight: 700; white-space: nowrap; }
.rform .team-box { border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px 14px; margin-top: 14px; }
.rform .team-box h3 { margin: 12px 0 2px; }
.rform .trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .rform .trio { grid-template-columns: 1fr; } }
.scan-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.scan-admin figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.scan-admin img { width: 100%; height: auto; display: block; border-radius: 6px; }
.scan-admin form { margin-top: 6px; }
.next-match { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; }
.next-match .teams { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; flex-wrap: wrap; }
.next-match .tlogo { width: 44px; }

@media (max-width: 600px) {
  .pt th, .pt td { padding: 9px 6px; }
  .pt .opt { display: none; }
  .pt .tlogo { width: 24px; }
  .pt .tm { gap: 7px; }
}

/* full scorecard */
.sc-innings { margin: 8px 0 26px; }
.sc-title { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin: 0 0 8px; }
.sc-total { color: var(--green-dark); font-variant-numeric: tabular-nums; }
.scorecard th.n, .scorecard td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scorecard td.r { font-weight: 800; }
.scorecard .bn { font-weight: 700; }
.scorecard .how { color: var(--muted); font-size: .86rem; line-height: 1.25; }
.scorecard tr.sc-extras td, .scorecard tr.sc-sum td { background: #f6f9f7; }
.scorecard tr.sc-sum td { font-weight: 800; border-top: 2px solid var(--line); }
.sc-note { font-size: .92rem; margin: 8px 2px 0; }
.sc-edit input { margin: 0; min-width: 0; padding: 7px 8px; }
.sc-edit input.sm { width: 64px; text-align: center; }
.sc-edit td, .sc-edit th { padding: 5px 6px; }
.sc-edit td:nth-child(2) input { min-width: 150px; }
.extras-row { display: flex; flex-wrap: wrap; gap: 14px; }
.extras-row label { display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: .88rem; margin: 0; }
textarea.mono { font: .85rem/1.4 ui-monospace, Menlo, Consolas, monospace; width: 100%; }
details.card summary { cursor: pointer; }
@media (max-width: 600px) {
  .scorecard { font-size: .88rem; }
  .scorecard th, .scorecard td { padding: 8px 6px; }
  .scorecard th { letter-spacing: 0; }
}

/* scorecard editor: link a line to a season squad player */
.lp-cell { white-space: nowrap; min-width: 128px; }
.lp-cell .lp-chip { display: flex; margin-top: 4px; max-width: 150px; }
.lp-cell .lp-chip[hidden] { display: none; }
.lp-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--green-soft); color: var(--green-dark); border-radius: 99px; padding: 2px 4px 2px 10px; font-size: .8rem; font-weight: 700; max-width: 190px; }
.lp-chip[hidden] { display: none; }
.lp-chip .lp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-clear { border: 0; background: transparent; color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 6px; }
.lp-dialog { border: 0; border-radius: 16px; padding: 18px; width: min(1000px, 94vw); max-height: 88vh; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.lp-dialog::backdrop { background: rgba(10, 25, 20, .55); }
.lp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.lp-filter { margin-bottom: 12px; }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; overflow-y: auto; max-height: calc(88vh - 150px); padding: 2px; }
.lp-card { display: flex; gap: 12px; align-items: center; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; cursor: pointer; font: inherit; color: inherit; }
.lp-card[hidden] { display: none; }
.lp-card:hover, .lp-card:focus-visible { border-color: var(--green-dark); background: #f5faf7; }
.lp-card img, .lp-card .ph { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--green-soft); display: grid; place-items: center; font-weight: 800; color: var(--green-dark); }
.lp-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-tag, .lp-used, .lp-in, .lp-other { display: none; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 1px 8px; width: fit-content; }
.lp-tag { background: #fff0c7; color: #6b4a00; }
.lp-used { background: #eceff0; color: #4a5558; }
.lp-from { display: block; font-size: .72rem; color: #4a5558; }
.lp-in { background: #dff3e6; color: #17613a; }
.lp-other { background: #eceff0; color: #4a5558; }
.lp-card.insq .lp-in, .lp-card.other .lp-other { display: inline-block; }
.lp-card.other { opacity: .5; cursor: not-allowed; }
.lp-card.sugg { border-color: #e0b84a; background: #fffaf0; }
.lp-card.sugg .lp-tag { display: inline-block; }
.lp-card.used { opacity: .55; }
.lp-card.used .lp-used { display: inline-block; }
.lp-card.on { outline: 2px solid var(--green-dark); }

/* clickable player names on scorecards and the archive player page */
.pl-link { color: #1a5fc0; text-decoration: underline; text-decoration-color: rgba(26,95,192,.35); text-underline-offset: 3px; }
.pl-link:hover { color: #0f4391; text-decoration-color: currentColor; }
.pl-link.pl-bowl { text-decoration: none; }
.pl-link.pl-bowl:hover { text-decoration: underline; }

/* season highlights: champion and top three batters / bowlers */
.champ { display: flex; align-items: center; gap: 22px; margin: 4px 0 22px; padding: 20px 24px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #0b4a2f 0%, #0f7148 60%, #c9a227 140%); box-shadow: var(--shadow); }
.champ-logo .tlogo { width: 104px; border-radius: 18px; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.champ-k { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: #ffe08a; }
.champ-n { margin: 4px 0 4px; font-size: 2rem; line-height: 1.1; color: #fff; }
.champ-n a { color: inherit; text-decoration: none; }
.champ-s { font-size: .95rem; opacity: .92; }
.champ-s a { color: #fff; text-decoration: underline; }
.lead-h { margin: 22px 0 10px; }
.lead-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 8px; }
.lead-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 12px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lead-rank { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; color: #3a2b00; background: #e6e9eb; }
.lead-card.r1 .lead-rank { background: #f2c230; }
.lead-card.r2 .lead-rank { background: #cfd5da; }
.lead-card.r3 .lead-rank { background: #d9a574; }
.lead-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #eef2f0; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.lead-init { display: grid; place-items: center; font-size: 2rem; font-weight: 800; color: var(--green-dark); }
.lead-name { font-weight: 800; font-size: 1.05rem; margin-top: 6px; line-height: 1.2; }
.lead-name a { color: inherit; text-decoration: none; }
.lead-name a:hover { text-decoration: underline; }
.lead-team { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); }
.lead-team .tlogo { width: 20px; border-radius: 5px; }
.lead-big { font-size: 2.3rem; font-weight: 800; line-height: 1; color: var(--green-dark); margin-top: 6px; font-variant-numeric: tabular-nums; }
.lead-lab { font-size: .75rem; letter-spacing: .14em; font-weight: 800; color: var(--muted); }
.lead-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 12px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: .85rem; color: var(--muted); width: 100%; }
.lead-stats b { color: var(--ink, #1d2a26); }
@media (max-width: 640px) {
  .champ { flex-direction: column; text-align: center; gap: 12px; padding: 18px; }
  .champ-logo .tlogo { width: 92px; }
  .champ-n { font-size: 1.6rem; }
  .lead-row { grid-template-columns: 1fr; gap: 10px; }
  .lead-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "photo name big" "photo team lab" "stats stats stats"; text-align: left; align-items: center; justify-items: start; padding: 12px 14px 12px 50px; gap: 0 12px; }
  .lead-rank { top: 50%; transform: translateY(-50%); left: 10px; }
  .lead-photo { grid-area: photo; width: 64px; height: 64px; }
  .lead-name { grid-area: name; margin: 0; }
  .lead-team { grid-area: team; }
  .lead-big { grid-area: big; margin: 0; font-size: 1.9rem; justify-self: end; }
  .lead-lab { grid-area: lab; justify-self: end; }
  .lead-stats { grid-area: stats; justify-content: flex-start; margin-top: 8px; }
}

/* match awards */
.aw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 8px; }
.aw-item { border: 1px solid var(--line, #dfe5e2); border-radius: 12px; padding: 12px 14px; background: #fff; }
.aw-item.aw-mom { border-color: #e0b94a; background: #fffaf0; }
.aw-lab { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.aw-name { font-size: 1.12rem; font-weight: 800; margin: 4px 0 6px; overflow-wrap: anywhere; }
.aw-team { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--muted); }
.aw-team .tlogo { width: 26px; height: 26px; }
.aw-form { display: grid; gap: 10px; }
.aw-row { display: grid; grid-template-columns: 160px 1fr 220px; gap: 8px; align-items: center; }
.aw-row.two { grid-template-columns: 160px 1fr; }
.aw-row label { font-weight: 700; margin: 0; }
@media (max-width: 640px) { .aw-row, .aw-row.two { grid-template-columns: 1fr; gap: 4px; } }

/* season awards */
.saw-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 0 0 8px; }
.saw-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.saw-card.saw-pot { border-color: #e0b94a; background: #fffaf0; }
.saw-lab { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--muted); margin-bottom: 6px; }
@media (max-width: 560px) { .saw-row { grid-template-columns: 1fr; gap: 10px; } .saw-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "photo lab" "photo name" "photo team"; text-align: left; align-items: center; justify-items: start; gap: 0 12px; } .saw-card .saw-lab { grid-area: lab; margin: 0; } .saw-card .lead-photo { grid-area: photo; width: 64px; height: 64px; } .saw-card .lead-name { grid-area: name; margin: 0; } .saw-card .lead-team { grid-area: team; } }

/* Past Seasons page */
.ps-list { display: grid; gap: 14px; margin-top: 12px; }
.ps-head { display: flex; align-items: center; gap: 16px; }
.ps-logo .tlogo { width: 72px; border-radius: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.25); }
.ps-k { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.ps-n { margin: 2px 0 2px; font-size: 1.5rem; line-height: 1.15; }
.ps-facts { list-style: none; margin: 12px 0 4px; padding: 10px 0 0; border-top: 1px dashed var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px 18px; }
.ps-facts span { display: block; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ps-facts a { color: #1a5fc0; }
.ps-links { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
@media (max-width: 560px) { .ps-logo .tlogo { width: 56px; } .ps-n { font-size: 1.25rem; } }
.ps-head { flex-wrap: wrap; justify-content: space-between; }
.ps-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ps-lead { margin-left: auto; max-width: 100%; display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; justify-content: flex-end; }
.ps-person { display: flex; align-items: center; gap: 10px; }
.ps-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #eef2f0; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); flex: none; }
.ps-init { display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; color: var(--green-dark); }
.ps-role { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.ps-pn { font-weight: 800; line-height: 1.2; max-width: 230px; }
.ps-pn a { color: #1a5fc0; text-decoration: none; }
.ps-pn a:hover { text-decoration: underline; }
@media (max-width: 700px) { .ps-lead { margin-left: 0; width: 100%; justify-content: flex-start; padding-top: 10px; border-top: 1px dashed var(--line); } }

/* Captain and Icon player inside the green champion banner */
.champ .champ-lead { margin-left: auto; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; }
.champ .ps-role { color: #ffe08a; }
.champ .ps-pn a, .champ .ps-pn { color: #fff; }
.champ .ps-pn a:hover { text-decoration: underline; }
.champ .ps-photo { width: 64px; height: 64px; border-color: rgba(255,255,255,.85); }
@media (max-width: 700px) {
  .champ .champ-lead { margin-left: 0; width: 100%; align-items: flex-start; border-top: 1px solid rgba(255,255,255,.25); padding-top: 12px; text-align: left; }
}
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; margin-top: 8px; max-height: 320px; overflow: auto; padding: 4px; }
.pool-opt { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; }
.pool-opt input { width: auto; margin: 0; }
