/* ==========================================================
   v179.9.36 — PHASE 10 FINAL-GAME COHESION HOTFIX
   Wrigley final-summary color cleanup + summary sticky stack.
   Visual/interaction-only; no scoring or storage-schema changes.
   ========================================================== */

/* Keep the fixed Home control below sticky game chrome once the final
   summary reaches the top of the viewport. It remains visible normally,
   but it can no longer sit on top of the FINAL score bar. */
body:has(#main .v167-summary-page) .topbar .home-icon{
  z-index:101!important;
}

/* ---------- Wrigley final-game surface language ---------- */
body[data-theme-family="wrigley"] .v167-summary-page{
  --v179936-report-panel:var(--wr-green-800);
  --v179936-report-strong:var(--wr-green-850);
  --v179936-report-field:var(--wr-green-850);
}

/* One panel color for the major report sections. Avoid unrelated tint fills. */
body[data-theme-family="wrigley"] .v167-summary-page :is(
  .v167-final-hero,
  .v167-summary-panel,
  .v167-decisions,
  .v167-memory,
  .v167-summary-actions
){
  background:var(--v179936-report-panel)!important;
  background-image:none!important;
  border-color:var(--wr-line)!important;
  box-shadow:none!important;
}

/* Section headers stay on the parent surface rather than becoming separate
   bands of slightly different greens. */
body[data-theme-family="wrigley"] .v167-summary-page :is(
  .v167-final-kicker,
  .v167-section-head,
  .v167-standout header
){
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .v167-final-kicker{
  border-bottom-color:var(--wr-line-soft)!important;
}

/* Top Performances: outlined content, no nested filled islands. */
body[data-theme-family="wrigley"] .v167-summary-page .v167-standout{
  background:transparent!important;
  background-image:none!important;
  border-color:var(--wr-line)!important;
  box-shadow:none!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .v167-standout-row>span{
  background:transparent!important;
  border:1px solid var(--wr-line-soft)!important;
  color:var(--wr-yellow)!important;
}

/* Line score: one table body surface. Only the header uses the consistent
   stronger panel shade; total columns are emphasized by type, not fill. */
body[data-theme-family="wrigley"] .v167-summary-page .postgame-linescore-scroll{
  background:transparent!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .postgame-linescore :is(td,th){
  border-color:var(--wr-line-soft)!important;
  color:var(--wr-cream)!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .postgame-linescore td{
  background:transparent!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .postgame-linescore th{
  background:var(--v179936-report-strong)!important;
  color:var(--wr-cream-muted)!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .postgame-linescore td:first-child{
  background:var(--v179936-report-panel)!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .postgame-linescore .total{
  background:transparent!important;
  color:var(--wr-cream)!important;
  font-weight:900!important;
}

/* Pitcher Decisions: the row outline itself supplies the affordance. The
   inner select no longer looks like a black/different-color pill. */
body[data-theme-family="wrigley"] .v167-summary-page .v167-decisions label{
  background:transparent!important;
  background-image:none!important;
  border-color:var(--wr-line)!important;
  box-shadow:none!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .v167-decisions select{
  background:transparent!important;
  background-image:none!important;
  color:var(--wr-cream)!important;
  -webkit-text-fill-color:var(--wr-cream)!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .v167-decisions label>span{
  color:var(--wr-yellow)!important;
}

/* Scoring recap: remove team-blue/team-red fills. Team abbreviation already
   identifies the scoring side, so Wrigley uses one yellow scorekeeping mark. */
body[data-theme-family="wrigley"] .v167-summary-page .v1671-scoring-list .v1671-scoring-row,
body[data-theme-family="wrigley"] .v167-summary-page .v1671-scoring-list .v1671-scoring-row.is-away,
body[data-theme-family="wrigley"] .v167-summary-page .v1671-scoring-list .v1671-scoring-row.is-home{
  background:transparent!important;
  background-image:none!important;
  border-left-color:var(--wr-yellow)!important;
  border-bottom-color:var(--wr-line-soft)!important;
  box-shadow:none!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .v1671-scoring-list .v1671-inning{
  color:var(--wr-yellow)!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .v1671-scoring-list .v1671-inning i,
body[data-theme-family="wrigley"] .v167-summary-page .v1671-scoring-list .is-away .v1671-inning i,
body[data-theme-family="wrigley"] .v167-summary-page .v1671-scoring-list .is-home .v1671-inning i{
  background:transparent!important;
  background-image:none!important;
  color:var(--wr-yellow)!important;
  border:1px solid var(--wr-line)!important;
  box-shadow:none!important;
}

/* Game Memory: keep editable fields visibly editable, but use one intentional
   field surface everywhere instead of several unrelated dark fills. */
body[data-theme-family="wrigley"] .v167-summary-page :is(
  .v167-memory-title input,
  .v167-notes textarea
){
  background:var(--v179936-report-field)!important;
  background-image:none!important;
  border-color:var(--wr-line)!important;
  color:var(--wr-cream)!important;
  box-shadow:none!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .v167-memory-marks button{
  background:transparent!important;
  background-image:none!important;
  border-color:var(--wr-line)!important;
  color:var(--wr-cream-muted)!important;
  box-shadow:none!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .v167-memory-marks button.active{
  background:transparent!important;
  border-color:var(--wr-yellow)!important;
  color:var(--wr-yellow)!important;
  box-shadow:inset 0 -2px var(--wr-yellow)!important;
}

/* Final actions follow the same outlined control language. */
body[data-theme-family="wrigley"] .v167-summary-page .v167-summary-actions button{
  background:transparent!important;
  background-image:none!important;
  border:1px solid var(--wr-line-soft)!important;
  color:var(--wr-yellow)!important;
  box-shadow:none!important;
}
body[data-theme-family="wrigley"] .v167-summary-page .v167-summary-actions button span{
  color:var(--wr-cream-muted)!important;
}

/* The live final score + workspace tabs use the same sticky mechanics as the
   live Scorecard on mobile. JS supplies the exact measured height variables. */
@media(max-width:900px){
  #main .v167-summary-page .live-game-bar.v179936-summary-live-sticky{
    position:sticky!important;
    top:0!important;
    z-index:104!important;
    margin-top:0!important;
    margin-bottom:0!important;
    transform:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  #main .v167-summary-page .mode-workspace-tabs.v179936-summary-tabs-sticky{
    position:sticky!important;
    top:var(--v179936-summary-live-h,76px)!important;
    z-index:103!important;
    margin-top:0!important;
    margin-bottom:12px!important;
    transform:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
}
