/* ==========================================================
   v179.9.49 — LIBRARY GAME CARD SIMPLIFICATION
   Home-style hierarchy: game first, metadata second.
   ========================================================== */
.v175-scorebook-grid .v179949-library-game{
  position:relative!important;
  overflow:visible!important;
  display:grid!important;
  grid-template-rows:auto auto auto auto!important;
  gap:0!important;
  border-radius:18px!important;
  background:var(--card)!important;
  background-image:none!important;
  border:1px solid var(--line)!important;
  box-shadow:none!important;
}
.v179949-game-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:11px 13px 8px!important;
  border:0!important;
  background:transparent!important;
}
.v179949-game-identity{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:5px!important;
}
.v179949-game-identity :is(.v174-history-source,.saved-status,.saved-current,.v172-history-freeform,.v1651-demo-badge){
  min-height:25px!important;
  padding:0 9px!important;
  display:inline-flex!important;
  align-items:center!important;
  border-radius:999px!important;
  font-size:7px!important;
  line-height:1!important;
  letter-spacing:.09em!important;
}
.v179949-game-identity>em{
  font-size:8px!important;
  font-style:normal!important;
  font-weight:750!important;
  color:var(--muted)!important;
}
.v179949-theme{
  flex-basis:100%!important;
  margin-top:1px!important;
  font-size:7.5px!important;
  font-weight:700!important;
  color:var(--muted)!important;
  letter-spacing:0!important;
}
.v179949-game-tools{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:5px!important;
  flex:0 0 auto!important;
}
.v179949-game-tools>b{
  margin-right:2px!important;
  white-space:nowrap!important;
  font-size:7.5px!important;
  letter-spacing:.1em!important;
  color:var(--muted)!important;
}
.v179949-mark,.v179949-overflow>summary{
  width:31px!important;
  height:31px!important;
  min-width:31px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:transparent!important;
  color:var(--muted)!important;
  box-shadow:none!important;
  font-size:14px!important;
  line-height:1!important;
}
.v179949-mark.active{color:var(--accent)!important;border-color:color-mix(in srgb,var(--accent) 55%,var(--line))!important}
.v179949-overflow{position:relative!important}
.v179949-overflow>summary{list-style:none!important;cursor:pointer!important;font-size:12px!important;font-weight:900!important}
.v179949-overflow>summary::-webkit-details-marker{display:none!important}
.v179949-overflow[open]>summary{border-color:var(--accent)!important;color:var(--accent)!important}
.v179949-overflow>div{
  position:absolute!important;
  z-index:40!important;
  right:0!important;
  top:37px!important;
  width:max-content!important;
  min-width:136px!important;
  padding:5px!important;
  border:1px solid var(--line)!important;
  border-radius:11px!important;
  background:var(--card)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.16)!important;
}
.v179949-overflow>div button{
  width:100%!important;
  min-height:36px!important;
  padding:0 10px!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:var(--danger,#a9443b)!important;
  text-align:left!important;
  font-size:8.5px!important;
  font-weight:800!important;
}
.v179949-matchup{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(92px,.72fr) minmax(0,1fr)!important;
  align-items:center!important;
  gap:12px!important;
  padding:10px 13px 8px!important;
  border:0!important;
  background:transparent!important;
}
.v179949-team{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
}
.v179949-team.right{justify-content:flex-end!important;text-align:right!important}
.v179949-team img{
  width:43px!important;
  height:43px!important;
  flex:0 0 43px!important;
  object-fit:contain!important;
  border-radius:12px!important;
}
.v179949-team span{min-width:0!important;display:block!important}
.v179949-team strong{
  display:block!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:17px!important;
  line-height:1!important;
}
.v179949-team small{
  display:block!important;
  margin-top:3px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:8px!important;
  color:var(--muted)!important;
}
.v179949-team em{
  display:block!important;
  margin-top:5px!important;
  white-space:nowrap!important;
  font-size:7.2px!important;
  font-style:normal!important;
  font-weight:700!important;
  color:var(--muted)!important;
}
.v179949-score{
  min-width:0!important;
  min-height:0!important;
  padding:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  border:0!important;
  background:transparent!important;
  text-align:center!important;
}
.v179949-score strong{font-size:28px!important;line-height:1!important;white-space:nowrap!important}
.v179949-score strong i{padding:0 5px!important;font-style:normal!important;font-weight:400!important;color:var(--muted)!important}
.v179949-score span{
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
  margin-top:5px!important;
  font-size:7.5px!important;
  line-height:1.3!important;
  font-weight:800!important;
}
.v179949-memory{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  margin:3px 13px 0!important;
  padding:8px 0 9px!important;
  border-top:1px solid color-mix(in srgb,var(--line) 50%,transparent)!important;
}
.v179949-memory>span{
  font-size:6.8px!important;
  font-weight:850!important;
  letter-spacing:.12em!important;
  color:var(--muted)!important;
  white-space:nowrap!important;
}
.v179949-memory input{
  width:100%!important;
  min-width:0!important;
  height:31px!important;
  padding:0 2px!important;
  border:0!important;
  border-bottom:1px solid color-mix(in srgb,var(--line) 70%,transparent)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  font-size:10px!important;
  font-weight:650!important;
}
.v179949-game-footer{
  padding:0 13px 11px!important;
  border:0!important;
  background:transparent!important;
}
.v179949-meta{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:5px 12px!important;
  padding:7px 0 9px!important;
  border-top:1px solid color-mix(in srgb,var(--line) 50%,transparent)!important;
  color:var(--muted)!important;
}
.v179949-meta span{font-size:7.5px!important;white-space:nowrap!important}
.v179949-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)!important;
  gap:7px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
.v179949-actions button{
  min-height:40px!important;
  border-radius:11px!important;
  font-size:8.5px!important;
  font-weight:850!important;
}
@media(max-width:620px){
  .v179949-game-head{padding:10px 11px 7px!important}
  .v179949-game-tools>b{display:none!important}
  .v179949-matchup{grid-template-columns:minmax(0,1fr) 82px minmax(0,1fr)!important;gap:7px!important;padding:10px 11px 7px!important}
  .v179949-team{gap:7px!important}
  .v179949-team img{width:38px!important;height:38px!important;flex-basis:38px!important;border-radius:10px!important}
  .v179949-team strong{font-size:15px!important}
  .v179949-team small{font-size:7.4px!important}
  .v179949-team em{font-size:6.6px!important}
  .v179949-score strong{font-size:25px!important}
  .v179949-memory{margin-inline:11px!important;grid-template-columns:1fr!important;gap:2px!important;padding-bottom:7px!important}
  .v179949-memory input{height:29px!important}
  .v179949-game-footer{padding-inline:11px!important}
  .v179949-meta{gap:4px 9px!important}
}

/* Wrigley mirrors Home: one quiet green surface and yellow only for intent. */
body[data-theme-family="wrigley"] .v175-scorebook-grid .v179949-library-game{
  background:var(--wr-green-800)!important;
  border-color:var(--wr-line)!important;
}
body[data-theme-family="wrigley"] .v179949-library-game :is(.v179949-game-head,.v179949-matchup,.v179949-game-footer){
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}
body[data-theme-family="wrigley"] .v179949-mark,
body[data-theme-family="wrigley"] .v179949-overflow>summary{border-color:var(--wr-line-soft)!important;color:var(--wr-cream-muted)!important}
body[data-theme-family="wrigley"] .v179949-mark.active,
body[data-theme-family="wrigley"] .v179949-overflow[open]>summary{color:var(--wr-yellow)!important;border-color:var(--wr-yellow)!important}
body[data-theme-family="wrigley"] .v179949-theme,
body[data-theme-family="wrigley"] .v179949-team :is(small,em),
body[data-theme-family="wrigley"] .v179949-game-tools>b,
body[data-theme-family="wrigley"] .v179949-memory>span,
body[data-theme-family="wrigley"] .v179949-meta{color:var(--wr-cream-muted)!important}
body[data-theme-family="wrigley"] .v179949-score span{color:var(--wr-yellow)!important}
body[data-theme-family="wrigley"] .v179949-memory,
body[data-theme-family="wrigley"] .v179949-meta,
body[data-theme-family="wrigley"] .v179949-memory input{border-color:var(--wr-line-soft)!important}
body[data-theme-family="wrigley"] .v179949-overflow>div{background:var(--wr-green-800)!important;border-color:var(--wr-line)!important}
body[data-theme-family="wrigley"] .v179949-actions .saved-primary{border-color:var(--wr-yellow)!important}
