.spsls-ge-scoresheet{
  /* Single white container around the whole live scoresheet (theme-compatible). */
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius:12px;
  padding:12px;
  overflow:hidden;
}

.spsls-ge-ss__topbar{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  align-items:baseline;
  margin-bottom:12px;
}

.spsls-ge-ss__title{ font-weight:800; font-size:18px; }
.spsls-ge-ss__meta{ font-size:13px; opacity:.85; }
.spsls-ge-ss__sep{ margin:0 6px; opacity:.5; }

.spsls-ge-ss__grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}

@media(min-width: 980px){
  .spsls-ge-ss__grid{ grid-template-columns: 1fr 1fr; }
  .spsls-ge-ss__panel--wide{ grid-column: 1 / -1; }
}

.spsls-ge-ss__panel{
  border:0;
  border-radius:0;
  padding:0;
  background:transparent;
}

.spsls-ge-ss__panel h3{
  margin:0 0 10px 0;
  font-size:14px;
  font-weight:800;
}

.spsls-ge-ss__linescore table{
  width:100%;
  /* Use theme table styling (SportsPress/Va rsity). */
  border-collapse:collapse;
  font-size:13px;
}
.spsls-ge-ss__linescore th:first-child,
.spsls-ge-ss__linescore td:first-child{ text-align:left; font-weight:700; }

.spsls-ge-ss__situation{ display:flex; gap:14px; flex-wrap:wrap; }
.spsls-ge-ss__bases{ min-width:160px; }
.spsls-ge-ss__batters{ font-size:13px; line-height:1.7; }

.spsls-ge-ss__diamond{
  width:120px; height:120px; position:relative;
}
.spsls-ge-ss__base{
  width:18px; height:18px; border:1px solid rgba(0,0,0,.35); background:#fff; position:absolute;
  left:50%; top:50%;
  transform: translate(-50%,-50%) rotate(45deg);
}
.spsls-ge-ss__base--home{ left:50%; top:90%; }
.spsls-ge-ss__base--first{ left:85%; top:50%; }
.spsls-ge-ss__base--second{ left:50%; top:10%; }
.spsls-ge-ss__base--third{ left:15%; top:50%; }
.spsls-ge-ss__occ{ position:absolute; width:10px; height:10px; border-radius:50%; background:#111; }
.spsls-ge-ss__occ--home{ left:50%; top:90%; transform: translate(-50%,-50%); }
.spsls-ge-ss__occ--first{ left:85%; top:50%; transform: translate(-50%,-50%); }
.spsls-ge-ss__occ--second{ left:50%; top:10%; transform: translate(-50%,-50%); }
.spsls-ge-ss__occ--third{ left:15%; top:50%; transform: translate(-50%,-50%); }

.spsls-ge-ss__orders{ display:grid; grid-template-columns: 1fr; gap:12px; }
@media(min-width: 760px){ .spsls-ge-ss__orders{ grid-template-columns: 1fr 1fr; } }

.spsls-ge-ss__subhead{ font-weight:800; margin-bottom:6px; }

.spsls-ge-ss__order{
  margin:0; padding-left:22px;
  font-size:13px;
  line-height:1.7;
}
.spsls-ge-ss__order li{ padding:2px 4px; border-radius:8px; }
.spsls-ge-ss__order li.is-current{ background: rgba(0,0,0,.06); font-weight:800; }

.spsls-ge-ss__log{
  font-size:12px;
  line-height:1.6;
  max-height: 320px;
  overflow:auto;
  border:0;
  border-radius:0;
  padding:0;
  background: transparent;
}
.spsls-ge-ss__log .row{ display:flex; gap:10px; padding:3px 0; border-bottom:1px dashed rgba(0,0,0,.10); }
.spsls-ge-ss__log .row:last-child{ border-bottom:0; }
.spsls-ge-ss__log .seq{ width:48px; opacity:.75; }
.spsls-ge-ss__log .time{ width:64px; opacity:.75; }
.spsls-ge-ss__log .type{ width:220px; font-weight:700; }
.spsls-ge-ss__log .desc{ flex:1; opacity:.9; }

/* Scorecard grid */
.spsls-ge-ss__scorecard{
  overflow-x:auto;
  overflow-y:hidden;
}

.spsls-ge-scorecard{
  table-layout:fixed;
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  min-width: 1080px;
  background: transparent;
}

.spsls-ge-scorecard th,
.spsls-ge-scorecard td{
  border:1px solid rgba(0,0,0,.10);
  padding:1px 1px;
  text-align:center;
  vertical-align:middle;
}

/* Keep headers a touch roomier than body cells */
.spsls-ge-scorecard th{ padding:4px 4px; }

.spsls-ge-scorecard th{
  position:sticky;
  top:0;
  background: var(--spsls-header-bg, #2e7d32);
  color: var(--spsls-header-fg, #fff);
  z-index:1;
  font-weight:800;
}


.spsls-ge-scorecard .col-name{ text-align:left; font-weight:800; min-width: 190px; }
.spsls-ge-scorecard .col-tot{ font-weight:800; width:44px; }

.spsls-ge-scorecard .col-name{
  position:sticky;
  left:0;
  /* Inherit row striping while remaining sticky. */
  background:inherit;
  z-index:2;
}

/* Ensure sticky first column also applies in header */
.spsls-ge-scorecard thead .col-name{
  background: var(--spsls-header-bg, #2e7d32);
  color: var(--spsls-header-fg, #fff);
  z-index:3;
}
.spsls-ge-scorecard .cell{
  display:block;
  min-height:48px;
}

/* Scorebox notation (Phase 1) */
.spsls-ge-scorecard .pa-box{
  position:relative;
  width:100%;
  height:48px;
  border-radius:0;
  border:none;
  background: transparent;
  overflow:hidden;
}

/* Traditional scorebook basepath (Phase 2) */
.spsls-ge-scorecard .pa-path{
  position:absolute;
  /* Larger and centred within the cell (avoid overlap with top-left text + count dots). */
  left:1px;
  right:1px;
  bottom:1px;
  top:13px;
  width:calc(100% - 2px);
  height:calc(100% - 14px);
  pointer-events:none;
}
.spsls-ge-scorecard .pa-path polygon{
  fill:none;
  stroke: rgba(0,0,0,.22);
  stroke-width: 3;
}
.spsls-ge-scorecard .pa-path polygon.fill{
  /* Darker fill for runs scored (between previous shade and black). */
  fill: rgba(0,0,0,.32);
  stroke: rgba(0,0,0,.22);
}
.spsls-ge-scorecard .pa-path line{
  stroke: rgba(0,0,0,.55);
  stroke-width: 4;
  stroke-linecap: round;
}

.spsls-ge-scorecard .pa-oc{
  position:absolute;
  left:4px;
  top:3px;
  font-weight:900;
  font-size:11px;
  line-height:1;
}

/* Totals row styling */
.spsls-ge-scorecard tr.spsls-ge-totalrow td{
  /* Match lineup row height */
  padding:1px 1px;
  height:48px;
}
.spsls-ge-scorecard tr.spsls-ge-totalrow strong{ font-size:14px; }
.spsls-ge-scorecard tr.spsls-ge-totalrow .col-name{ text-align:right; }

/* Inning run totals inside totals row */
.spsls-ge-scorecard tr.spsls-ge-totalrow td.col-inningtot{
  text-align:center;
  font-weight:700;
}

/* Out notation in bottom-right: scorebook reason (U3, 4-3, F8, L1...) */
.spsls-ge-scorecard .pa-outnote{
  position:absolute;
  right:3px;
  bottom:2px;
  font-size:11px;
  font-weight:900;
  line-height:1;
  color: rgba(0,0,0,.75);
}

/* Out number marker: circled 1/2/3 */
.spsls-ge-scorecard .pa-outcircle{
  position:absolute;
  left:50%;
  /* Place the out circle inside the diamond */
  top:56%;
  transform: translate(-50%, -50%);
  width:20px;
  height:20px;
  border-radius:50%;
  border:2px solid #1565c0;
  color:#1565c0;
  font-size:13px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  /* transparent fill (no "disc"), keep blue outline */
  background: transparent;
}


/* Count (balls/strikes) */
.spsls-ge-scorecard .pa-count{
  position:absolute;
  right:3px;
  top:3px;
  display:flex;
  gap:1px;
}
.spsls-ge-scorecard .pa-col{
  display:flex;
  flex-direction:column;
  gap:1px;
}
.spsls-ge-scorecard .pa-count .dot{
  width:6px;
  height:6px;
  border-radius:50%;
  border:1px solid rgba(0,0,0,.45);
  background: rgba(255,255,255,.85);
}
.spsls-ge-scorecard .pa-count .dot.is-filled{
  background: rgba(0,0,0,.78);
}

/* Walk award note (e.g. BB to 2B) */
.spsls-ge-scorecard .pa-award{
  position:absolute;
  left:4px;
  top:18px;
  font-size:9px;
  line-height:1;
  font-weight:800;
  opacity:.85;
}

/* RBI count bottom-left */
.spsls-ge-scorecard .pa-rbi{
  position:absolute;
  left:4px;
  bottom:3px;
  font-size:10px;
  line-height:1;
  font-weight:900;
  opacity:.95;
}

/* Out notation bottom-right styled above (red). */

/* Substitution markers in the name column */
.spsls-ge-scorecard .spsls-ge-slot{ font-weight:900; margin-right:4px; }
.spsls-ge-scorecard .spsls-ge-arrow{ font-weight:900; }
.spsls-ge-scorecard .spsls-ge-arrow--out{ color:#c62828; }
.spsls-ge-scorecard .spsls-ge-arrow--in{ color:#2e7d32; }

/* Substitution divider within the inning grid: thick vertical rule to separate starter vs sub PAs */
.spsls-ge-scorecard td.spsls-td-subend{ border-right: 3px solid rgba(0,0,0,0.75) !important; }

/* Multi-line name / totals cells (substitutions share the same lineup slot row) */
.spsls-ge-scorecard .spsls-ge-namewrap{ display:flex; gap:6px; align-items:flex-start; }
.spsls-ge-scorecard .spsls-ge-namewrap .spsls-ge-slot{ font-weight:700; min-width: 20px; }
.spsls-ge-scorecard .spsls-ge-occupants{ display:flex; flex-direction:column; gap:2px; }
.spsls-ge-scorecard .spsls-ge-occupant{ line-height: 1.15; }
.spsls-ge-scorecard .spsls-ge-submark{ font-size:11px; font-weight:800; opacity:.9; }



.spsls-ge-scorecard th:not(.col-name):not(.col-tot),
.spsls-ge-scorecard td:not(.col-name):not(.col-tot){ width:60px; }


/* Team totals row */
.spsls-ge-scorecard .spsls-ge-totalrow td{
  background: rgba(0,0,0,.03);
  font-weight:800;
}

.spsls-ge-scorecard .spsls-ge-totalrow .col-name{
  color:#000;
  background: rgba(0,0,0,.03);
}

.spsls-ge-scorecard .pa-oc--error{ color:#c62828; }

.spsls-ge-ss__panel{ margin-bottom: 14px; }
.spsls-ge-ss__panel:last-child{ margin-bottom:0; }

/* Prevent the sticky name column from collapsing on narrow screens */
.spsls-ge-scorecard th.name,
.spsls-ge-scorecard td.name{
  min-width: 180px;
}

@media(max-width: 820px){
  .spsls-ge-ss__grid{
    grid-template-columns: 1fr;
  }
  .spsls-ge-ss__scorecard{
    -webkit-overflow-scrolling: touch;
  }
}
