/* FIX78: build on FIX77 without touching scoring, saving, or settlement logic.
   Real LIVE bottom-sheet DOM: #modalBox.v390BottomSheet with
   .v43320Settlement / .v43320RankSheet / .v43318Sheet. */

/* Keep the 2x2 input tiles, amber saved state and green next-hole action from FIX77.
   Place status in its own centered grid column, away from GIR. */
.v57Live .v55InputCard .v72ActionRow{
  display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;
  align-items:center!important;column-gap:9px!important;row-gap:0!important;
}
.v57Live .v55InputCard .v72LeftActions{
  grid-column:1!important;grid-row:1!important;display:flex!important;align-items:center!important;
  justify-self:start!important;gap:5px!important;
}
.v57Live .v55InputCard .v72SaveState{
  grid-column:2!important;grid-row:1!important;justify-self:center!important;
  text-align:center!important;font-size:clamp(12px,3.3vw,15px)!important;
  font-weight:900!important;letter-spacing:-.35px!important;white-space:nowrap!important;
}
.v57Live .v55InputCard .v72RightActions{
  grid-column:3!important;grid-row:1!important;display:flex!important;
  align-items:center!important;justify-self:end!important;gap:9px!important;
  margin:0!important;
}
.v57Live .v55InputCard .v72Gir{grid-column:auto!important;grid-row:auto!important;justify-self:auto!important;margin:0!important;font-size:12px!important;white-space:nowrap!important}
.v57Live .v55InputCard .v72RightActions .v55ActionButton{
  grid-column:auto!important;grid-row:auto!important;justify-self:auto!important;
  margin:0!important;min-height:38px!important;padding:7px 11px!important;
}
@media(max-width:370px){
  .v57Live .v55InputCard .v72ActionRow{column-gap:4px!important}
  .v57Live .v55InputCard .v72LeftActions{gap:3px!important}
  .v57Live .v55InputCard .v72LeftActions .v55Memo,
  .v57Live .v55InputCard .v72LeftActions .v55Reset{padding:6px 4px!important;font-size:10px!important}
  .v57Live .v55InputCard .v72SaveState{font-size:11px!important}
  .v57Live .v55InputCard .v72RightActions{gap:4px!important}
  .v57Live .v55InputCard .v72Gir{font-size:10px!important}
  .v57Live .v55InputCard .v72RightActions .v55ActionButton{padding:7px 6px!important;font-size:11px!important}
}

/* Shared neutral visual system for the three LIVE popups only. */
#modalBox.v390BottomSheet:has(.v43320Settlement),
#modalBox.v390BottomSheet:has(.v43320RankSheet),
#modalBox.v390BottomSheet:has(.v43318Sheet){
  background:#fff!important;color:#181b21!important;
  border-color:#d9dde3!important;
}
#modalBox.v390BottomSheet:has(.v43320Settlement) .modalHead,
#modalBox.v390BottomSheet:has(.v43320RankSheet) .modalHead,
#modalBox.v390BottomSheet:has(.v43318Sheet) .modalHead{
  background:#f4f5f7!important;color:#161a20!important;
  border:1px solid #dfe3e8!important;box-shadow:none!important;
  border-radius:13px!important;min-height:58px!important;padding:10px 12px!important;
}
#modalBox.v390BottomSheet:has(.v43320Settlement) .modalHead h2,
#modalBox.v390BottomSheet:has(.v43320RankSheet) .modalHead h2,
#modalBox.v390BottomSheet:has(.v43318Sheet) .modalHead h2{
  color:#171a20!important;text-shadow:none!important;
  font-size:clamp(17px,4.8vw,21px)!important;
}
#modalBox.v390BottomSheet:has(.v43320Settlement) .modalHead .eyebrow,
#modalBox.v390BottomSheet:has(.v43320RankSheet) .modalHead .eyebrow,
#modalBox.v390BottomSheet:has(.v43318Sheet) .modalHead .eyebrow{color:#727b86!important}
#modalBox.v390BottomSheet:has(.v43320Settlement) .modalHead .iconBtn,
#modalBox.v390BottomSheet:has(.v43320RankSheet) .modalHead .iconBtn,
#modalBox.v390BottomSheet:has(.v43318Sheet) .modalHead .iconBtn{
  background:#e8ebef!important;color:#171a20!important;
  border:1px solid #d7dce3!important;box-shadow:none!important;
  width:38px!important;height:38px!important;max-height:38px!important;max-width:38px!important;
}

/* Rank: align the name heading and row labels, use monochrome for adjusted strokes. */
#modalBox.v390BottomSheet .v43320RankSheet{
  background:#fff!important;border:1px solid #e0e4e9!important;border-radius:13px!important;overflow:hidden!important;
}
#modalBox.v390BottomSheet .v43320RankSheet .v390RankHead,
#modalBox.v390BottomSheet .v43320RankSheet .v390RankRow{
  display:grid!important;
  grid-template-columns:40px minmax(80px,1.25fr) 42px minmax(53px,.88fr) minmax(57px,.95fr)!important;
  gap:3px!important;align-items:center!important;min-height:48px!important;
  padding:0 9px!important;
}
#modalBox.v390BottomSheet .v43320RankSheet .v390RankHead{
  background:#f3f4f6!important;color:#59616d!important;font-weight:800!important;
  min-height:41px!important;
}
#modalBox.v390BottomSheet .v43320RankSheet .v390RankHead span{
  color:#59616d!important;text-align:center!important;padding:0!important;font-size:10px!important;
}
#modalBox.v390BottomSheet .v43320RankSheet .v390RankHead span:nth-child(2),
#modalBox.v390BottomSheet .v43320RankSheet .v390RankRow strong{
  text-align:left!important;justify-self:stretch!important;padding:0 0 0 3px!important;
}
#modalBox.v390BottomSheet .v43320RankSheet .v390RankRow,
#modalBox.v390BottomSheet .v43320RankSheet .v390RankRow em,
#modalBox.v390BottomSheet .v43320RankSheet .v390RankRow .hcpNum{
  color:#20242b!important;background-color:#fff!important;
}
#modalBox.v390BottomSheet .v43320RankSheet .v390RankRow.me,
#modalBox.v390BottomSheet .v43320RankSheet .v390RankRow.me em{
  background-color:#f5f6f8!important;
}
#modalBox.v390BottomSheet .v43320RankSheet .v390RankRow strong{font-weight:750!important;font-size:13px!important}
#modalBox.v390BottomSheet .v43320RankSheet .v390RankRow .hcpNum{font-weight:850!important;font-size:15px!important}
@media(max-width:365px){
  #modalBox.v390BottomSheet .v43320RankSheet .v390RankHead,
  #modalBox.v390BottomSheet .v43320RankSheet .v390RankRow{
    grid-template-columns:29px minmax(69px,1.2fr) 31px minmax(47px,.85fr) minmax(51px,.9fr)!important;
    padding:0 4px!important;gap:2px!important;
  }
  #modalBox.v390BottomSheet .v43320RankSheet .v390RankHead span{font-size:9px!important}
  #modalBox.v390BottomSheet .v43320RankSheet .v390RankRow strong{font-size:11.5px!important}
  #modalBox.v390BottomSheet .v43320RankSheet .v390RankRow span,
  #modalBox.v390BottomSheet .v43320RankSheet .v390RankRow em{font-size:12px!important}
}

/* Settlement: identical light header, quiet zebra rows and aligned amounts. */
#modalBox.v390BottomSheet .v43320Settlement{
  background:#fff!important;border:1px solid #e0e4e9!important;border-radius:13px!important;overflow:hidden!important;
}
#modalBox.v390BottomSheet .v43320Settlement .v349SetHead{
  background:#f3f4f6!important;color:#606975!important;border-bottom:1px solid #e0e4e9!important;
}
#modalBox.v390BottomSheet .v43320Settlement .v349SetHead *,
#modalBox.v390BottomSheet .v43320Settlement .v349SetHead{color:#5b6470!important}
#modalBox.v390BottomSheet .v43320Settlement .v349SetRow{
  color:#20242b!important;background:#fff!important;border-bottom:1px solid #e9ecf0!important;
}
#modalBox.v390BottomSheet .v43320Settlement .v349SetRow:nth-child(odd){background:#f8f9fa!important}
#modalBox.v390BottomSheet .v43320Settlement .v349SetRow.me{background:#f1f3f6!important}
#modalBox.v390BottomSheet .v43320Settlement .v349SetRow strong,
#modalBox.v390BottomSheet .v43320Settlement .v349SetRow span{
  color:#252a31!important;font-variant-numeric:tabular-nums!important;
}

/* Record popup: remove remaining teal/mint on *actual* score headline, 
   auto-refresh chip, front/back selector, scorecard header and numbers. */
#modalBox.v390BottomSheet .v43318Sheet,
#modalBox.v390BottomSheet .v43318Sheet .v43318Scorecard,
#modalBox.v390BottomSheet .v43318Sheet .v43317ScoreScroll{
  background:#fff!important;color:#1c2026!important;border-color:#dce0e5!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v390PlayerTabs button{
  background:#eef0f4!important;color:#2c3440!important;border-color:#d9dee5!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v390PlayerTabs button.active{
  background:#20242b!important;color:#fff!important;border-color:#20242b!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43318Headline{
  background:#f3f4f6!important;background-image:none!important;
  border:1px solid #dce1e6!important;color:#242931!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43318Current>span,
#modalBox.v390BottomSheet .v43318Sheet .v43318SummaryRight,
#modalBox.v390BottomSheet .v43318Sheet .v43318SummaryRight b{
  color:#666f7b!important;border-color:#d4d9df!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43319CurrentValue,
#modalBox.v390BottomSheet .v43318Sheet .v43319CurrentValue strong,
#modalBox.v390BottomSheet .v43318Sheet .v43319CurrentValue em,
#modalBox.v390BottomSheet .v43318Sheet .v43318Current strong{
  color:#15191f!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43318CardTop b{color:#181d24!important}
#modalBox.v390BottomSheet .v43318Sheet .v43318CardTop small,
#modalBox.v390BottomSheet .v43318Sheet .v43318CardTop small.is-live{
  background:#f0f1f3!important;color:#5f6873!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43317HalfTabs button{
  background:#f0f1f3!important;color:#67717d!important;border-color:#dce0e6!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43317HalfTabs button.active{
  background:#252a31!important;color:#fff!important;border-color:#252a31!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43318Table{
  background:#fff!important;color:#222830!important;border-color:#dfe3e8!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43318Table thead th,
#modalBox.v390BottomSheet .v43318Sheet .v43318Table th:first-child{
  background:#f1f3f5!important;color:#555f6b!important;border-color:#e1e5ea!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43318Table tbody td{
  background:#fff!important;color:#222831!important;
  border-color:#e2e6eb!important;font-size:12.5px!important;font-weight:450!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43318Table .v43318ScoreRow td,
#modalBox.v390BottomSheet .v43318Sheet .v43318Table .v43318ScoreRow td strong{
  background:#fff!important;color:#20242b!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43318Table .v43318ScoreRow td strong{
  font-size:13px!important;line-height:1.08!important;font-weight:750!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43318Table .v43318ScoreRow td small{
  font-size:9.5px!important;line-height:1.07!important;color:#6f7783!important;font-weight:600!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43318Table td.highlight-birdie,
#modalBox.v390BottomSheet .v43318Sheet .v43318Table td.highlight-birdie strong,
#modalBox.v390BottomSheet .v43318Sheet .v43318Table td.highlight-hzd,
#modalBox.v390BottomSheet .v43318Sheet .v43318Table td.highlight-ob,
#modalBox.v390BottomSheet .v43318Sheet .v43318Table td.highlight-threeputt{
  background:#fff!important;color:#20242b!important;
}
#modalBox.v390BottomSheet .v43318Sheet .v43318Table tbody tr:last-child td{border-bottom:0!important}
