/* Rubber-bridge score sheet (assets/js/tools/rubber-sheet.js): status, deal entry, the We/They sheet.
   Inside .tl-card (light card palette in both themes). */
.rs { padding: .6rem .55rem .8rem; }
.rs .red { color: var(--card-red); }
.rs-p0 { --pc: #b3141b; }
.rs-p1 { --pc: #1f4e8c; }

/* ---- status of both players ---- */
.rs-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.rs-pl { background: #fbf6ea; border: 1px solid var(--card-rule); border-top: 5px solid var(--pc); border-radius: 8px; padding: .35rem .5rem .45rem; min-width: 0; }
.rs-pl.rs-won { background: color-mix(in srgb, var(--pc) 9%, #fff); }
.rs-plhead { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.rs-nm { font-weight: 700; color: var(--pc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.rs-badge { font-size: .8rem; font-variant-caps: all-small-caps; letter-spacing: .06em; color: #fff; background: var(--card-soft); border-radius: 4px; padding: 0 .35rem; white-space: nowrap; }
.rs-big { line-height: 1.1; margin: .1rem 0; }
.rs-big b { font-size: 2rem; font-weight: 800; color: var(--pc); font-variant-numeric: lining-nums tabular-nums; }
.rs-big span { font-size: .85rem; color: var(--card-soft); }
.rs-games { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--card-soft); }
.rs-pips { display: inline-flex; gap: .25rem; }
.rs-pip { width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid var(--pc); }
.rs-pip.on { background: var(--pc); }
.rs-vultag { display: inline-block; margin: .25rem 0 .1rem; font-size: .8rem; font-weight: 700; padding: .05rem .4rem; border-radius: 4px; border: 1px solid var(--card-line); color: var(--card-soft); }
.rs-vul .rs-vultag { background: var(--card-red); border-color: var(--card-red); color: #fff; }
.rs-towards { font-size: .82rem; color: var(--card-soft); }
.rs-bar { display: block; height: 6px; border-radius: 3px; background: #e6dcc6; margin-top: .15rem; overflow: hidden; }
.rs-fill { display: block; height: 100%; background: var(--pc); width: 0; }
.rs-f1 { width: 10%; } .rs-f2 { width: 20%; } .rs-f3 { width: 30%; } .rs-f4 { width: 40%; } .rs-f5 { width: 50%; }
.rs-f6 { width: 60%; } .rs-f7 { width: 70%; } .rs-f8 { width: 80%; } .rs-f9 { width: 90%; } .rs-f10 { width: 100%; }
.rs-live { min-height: 1.4em; margin: .5rem 0 .2rem; font-weight: 700; text-align: center; }

/* ---- entering a deal ---- */
.rs-deal { border-top: 3px double var(--card-rule); padding-top: .4rem; }
.rs-dealhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; }
.rs-dealhead strong { font-size: 1.15rem; }
.rs-dealhead span { color: var(--card-soft); }
.rs-g2, .rs-g3, .rs-g5, .rs-g7 { display: grid; gap: .35rem; }
.rs-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rs-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rs-g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rs-g7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.rs-g2 .tl-btn, .rs-g3 .tl-btn, .rs-g5 .tl-btn, .rs-g7 .tl-btn { padding-left: .1rem; padding-right: .1rem; min-width: 0; }
.rs-g5 .tl-btn { font-size: 1.2rem; }
.rs-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs .rs-short:not([aria-pressed="true"]) { background: #f6e9e4; }
.rs-hon .tl-btn { flex: 1 1 auto; }
.rs-prev { margin: .6rem 0; padding: .4rem .5rem; border-top: 3px double var(--card-rule); border-bottom: 3px double var(--card-rule); }
.rs-prev p { margin: .15rem 0; }
.rs-prev .rs-p0, .rs-prev .rs-p1 { font-weight: 700; color: var(--pc); }
.rs-res { font-weight: 700; font-size: 1.1rem; }
.rs-gamemsg { font-weight: 800; color: var(--card-red); }
.rs .rs-bigbtn { width: 100%; min-height: 52px; margin-top: .4rem; }

/* ---- controls ---- */
.rs-ctl { margin-top: .9rem; }
.rs-undo { flex: 1 1 100%; }

/* ---- the sheet ---- */
.rs-sheet { margin-top: .8rem; background: var(--card); border: 1px solid var(--card-rule); border-radius: 8px; padding: .3rem .4rem .4rem; font-variant-numeric: tabular-nums; }
.rs-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rs-row > * { min-width: 0; }
.rs-row > :first-child { border-right: 2px solid var(--card-ink); }
.rs-shead > div { font-weight: 700; text-align: center; color: var(--pc); padding: .2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-col { list-style: none; margin: 0; padding: .15rem .35rem; min-height: 1.8rem; display: flex; flex-direction: column; gap: .1rem; }
.rs-above .rs-col { justify-content: flex-end; }
.rs-e { display: flex; align-items: baseline; gap: .35rem; }
.rs-e b { min-width: 2.6em; text-align: right; font-size: 1.05rem; }
.rs-e span { font-size: .8rem; line-height: 1.2; color: var(--card-soft); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rs-no { font-style: normal; font-size: .8rem; color: var(--card-soft); white-space: nowrap; }
.rs-e.rs-new b { color: var(--card-red); }
.rs-line { border-top: 3px solid var(--card-ink); margin: .1rem 0; }
.rs-gline { border-top: 1px solid var(--card-ink); text-align: center; font-size: .8rem; color: var(--card-soft); margin-bottom: .1rem; }
.rs-gline.done { border-top-width: 2px; border-color: var(--pc); color: var(--pc); font-weight: 700; }
.rs-totals { width: 100%; border-collapse: collapse; margin-top: .4rem; }
.rs-totals th, .rs-totals td { border-bottom: 1px solid var(--card-rule); }
.rs-totals th { text-align: left; font-weight: 400; font-size: .85rem; color: var(--card-soft); padding: .15rem .2rem; }
.rs-totals td { text-align: right; padding: .15rem .35rem; width: 30%; }
.rs-totals .rs-sum th, .rs-totals .rs-sum td { font-weight: 800; border-top: 3px double var(--card-ink); color: var(--card-ink); font-size: 1.05rem; }

/* ---- end of the rubber ---- */
.rs-over { border-top: 3px double var(--card-rule); padding-top: .4rem; }
.rs-winner { font-size: 1.35rem; font-weight: 800; text-align: center; margin: .4rem 0; }
.rs-final { font-size: 1.1rem; font-weight: 700; text-align: center; margin: .3rem 0; }
.rs-match { border-collapse: collapse; width: 100%; margin: .6rem 0 .2rem; font-variant-numeric: tabular-nums; }
.rs-match caption { text-align: left; font-weight: 700; padding-bottom: .2rem; }
.rs-match th, .rs-match td { padding: .3rem .4rem; border-bottom: 1px solid var(--card-rule); text-align: right; }
.rs-match th[scope=row] { text-align: left; }
.rs-match td.rs-w { font-weight: 800; }
.rs-match .rs-sum th, .rs-match .rs-sum td { font-weight: 800; border-top: 2px solid var(--card-ink); }

/* ---- history ---- */
.rs-more { margin: .6rem 0 0; border-top: 1px solid var(--card-rule); }
.rs-more summary { cursor: pointer; font-weight: 700; padding: .6rem 0; min-height: 44px; }
.rs-hist { list-style: none; margin: 0; padding: 0; }
.rs-hist li { padding: .3rem 0; border-bottom: 1px dotted var(--card-rule); font-size: .92rem; }
.rs-hhead { display: flex; gap: .6rem; }
.rs-hhead span { color: var(--card-soft); }
.rs-hdet { color: var(--card-soft); font-size: .85rem; }
.rs-hgame { font-weight: 700; color: var(--pc); }

/* ---- setup ---- */
.rs-setup .tl-h { margin-top: .2rem; }
.rs-names { display: grid; gap: 0 .6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rs-names label > span { color: var(--pc); font-weight: 700; }
.rs-start { min-width: 8rem; }
