/* Golavio rooms fix (Nov 2026)
   1. Room cards: the "📌 last room" label sat on top of the card and covered the Open/Results button,
      so tapping it did nothing on phones. Cards now use a clear 3-row layout:
      label · (icon, name and info, ⋯ menu) · full-width Open button.
   2. Room screen: the same numbers (points / correct / wrong) were shown three times. Keep one of each.
   3. Match cards inside a room: small text made bigger so it is readable on phones. */

/* ---------- 1. Room cards in "My rooms" ---------- */
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) auto !important;
  grid-template-areas: "ava info more" "act act act" !important;
  grid-template-rows: auto !important;
  align-items: start !important;
  gap: 10px 12px !important;
  padding: 14px !important;
}
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card.r-pinned {
  grid-template-areas: "pin pin pin" "ava info more" "act act act" !important;
}
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card > .r-pin-tag {
  grid-area: pin !important;
  justify-self: start !important;
  position: static !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  transform: none !important;
}
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card > .r-room-ava { grid-area: ava !important; }
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card > div {
  grid-area: info !important;
  min-width: 0 !important;
  width: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card > details.r-rm-more { grid-area: more !important; }
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card > button[data-room-open] {
  grid-area: act !important;
  width: 100% !important;
  min-height: 46px !important;
  margin: 2px 0 0 !important;
  font-size: 16px !important;
}
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card h3 {
  margin: 0 !important;
  overflow-wrap: anywhere;
}
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card .r-lib-x,
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card .r-lib-top,
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card .r-lib-people {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px 8px !important;
  width: 100% !important;
  position: static !important;
}
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card .r-lib-x { flex-direction: column !important; align-items: flex-start !important; }
/* status chip already shows the rank ("✔ Finished · #1 🏆"), so the separate #1 is a duplicate */
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card .r-lib-rank { display: none !important; }
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card .r-lib-st { width: auto !important; white-space: nowrap !important; }
/* long notes ("this room no longer exists…") were cut off — show them in full */
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card p:not(.room-card-meta),
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card small {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  display: block !important;
  max-height: none !important;
}
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card .r-lib-people > span { display: inline-flex !important; }
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card .room-card-manage .room-delete-button { min-height: 44px; }

/* ---------- 2. One copy of each number on the room screen ---------- */
/* "points · correct · wrong" box duplicated the "Your picks" box (Play tab) and "Your rank" card (Ranking tab) */
html body #r-room-perf { display: none !important; }
/* the recap repeated the leaderboard rows that are already shown in the table above it */
html body #r-room-recap .r-rc-tot,
html body #r-room-recap .r-rc-hint { display: none !important; }
/* third copy of "your points / your rank / saved picks" at the bottom */
html body .play-my-stats { display: none !important; }

/* ---------- 3. Readable match cards inside a room ---------- */
html body .room-fixture .room-fixture-top time,
html body .room-fixture .room-fixture-top .locked { font-size: 13px !important; }
html body .room-fixture .room-competition { font-size: 13px !important; }
html body .room-fixture .room-market-chips span {
  font-size: 13px !important;
  padding: 6px 11px !important;
  line-height: 1.3 !important;
}
html body .room-fixture .play-saved-picks small,
html body .room-fixture .play-saved-picks small b { font-size: 14px !important; }
html body .room-fixture .match-points-detail summary { font-size: 13.5px !important; padding: 8px 0 !important; }
html body .room-fixture .room-fixture-bottom button { font-size: 15px !important; min-height: 46px !important; }
html body .room-fixture .r-friends-picks p { font-size: 13px !important; }

/* Finished rooms stay hidden until "Show finished rooms" is tapped (another rule was forcing them visible) */
html body[data-rpg] #main-content #matches .simple-room-library article.r-lib-card.r-rt-hide { display: none !important; }
