/* Thousand score sheet (score tab): score board, bid and result entry, the score sheet.
   Inside .tl-card (light card palette in both themes). */
.ts { padding: .6rem .55rem .8rem; }
.ts-c0 { --pc: #b3141b; }
.ts-c1 { --pc: #1f4e8c; }
.ts-c2 { --pc: #2c6e3f; }
.ts-c3 { --pc: #7a4a12; }
.ts .ts-red { color: var(--card-red); }
.ts .ts-big { width: 100%; min-height: 52px; font-weight: 700; margin: .25rem 0; }
.ts-hint { margin: .35rem 0; }
.ts-strong { font-weight: 700; }
.ts-lbl { font-size: .95rem; color: var(--card-soft); font-variant-caps: all-small-caps; letter-spacing: .06em; }
.ts-live { min-height: 1.4em; margin: .5rem 0 .2rem; font-weight: 700; text-align: center; }
.ts-legend { font-size: .82rem; color: var(--card-soft); font-style: italic; margin: .35rem 0 0; }

/* ---- the score board ---- */
.ts-board { display: grid; gap: .35rem; padding: .3rem; border-radius: 10px; background: #efe4cc; border: 1px solid var(--card-rule); }
.ts-pl { background: #fbf6ea; border: 1px solid var(--card-rule); border-left: 5px solid var(--pc); border-radius: 7px; padding: .3rem .5rem .25rem; }
.ts-pl.ts-isdec { box-shadow: 0 0 0 2px var(--pc) inset; }
.ts-pl.ts-isout { opacity: .6; }
.ts-pl.ts-onbar { background: #f6e7c8; }
.ts-pl.ts-won { background: color-mix(in srgb, var(--pc) 10%, #fff); }
.ts-plh { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.ts-name { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .4rem; min-width: 0; flex: 1; }
.ts-nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ts-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; }
.ts-b-bar { background: #8a5a14; }
.ts-b-out { background: #9a9080; }
.ts-score { font-size: 2rem; line-height: 1.05; font-weight: 800; color: var(--pc); font-variant-numeric: lining-nums tabular-nums; }
.ts-sub { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0 .6rem; font-size: .85rem; color: var(--card-soft); }
.ts-won .ts-sub span:first-child { color: var(--pc); font-weight: 700; }
.ts-onbar .ts-sub span:first-child { color: #8a5a14; font-weight: 700; }

/* ---- the hand ---- */
.ts-hand { border-top: 3px double var(--card-rule); padding-top: .4rem; }
.ts-handhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; }
.ts-handhead strong { font-size: 1.15rem; }
.ts-handhead span { color: var(--card-soft); }
.ts-decs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.ts .ts-dec { min-height: 52px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: .3rem .4rem;
  border-top: 4px solid var(--pc); }
.ts-bidrow { display: grid; grid-template-columns: 1fr 1fr 1.6fr 1fr 1fr; gap: .3rem; align-items: stretch; }
.ts .ts-bidrow input { text-align: center; font-size: 1.5rem; font-weight: 800; padding: .3rem .2rem; min-height: 52px; font-variant-numeric: tabular-nums; }
.ts .ts-stepbtn { padding: .2rem; font-weight: 700; font-size: 1.05rem; }
.ts-barnote { color: #8a5a14; font-weight: 700; margin: .4rem 0; }
.ts .ts-nines { width: 100%; margin-top: .8rem; font-size: .92rem; }

/* result entry: one box per player */
.ts-pbox { border: 1px solid var(--card-rule); border-left: 5px solid var(--pc); border-radius: 8px; padding: .35rem .5rem .45rem; margin: .45rem 0; background: var(--card); }
.ts-pbox.ts-pdec { background: #fbf6ea; }
.ts-pboxh { display: flex; align-items: center; gap: .4rem; margin-bottom: .2rem; }
.ts-pboxh .ts-nm { color: var(--pc); }
.ts-pts { display: grid; gap: .2rem; }
.ts .ts-pts input { font-size: 1.3rem; font-weight: 700; max-width: 9rem; }
.ts-declpts { margin: .1rem 0; font-weight: 700; }
.ts-mars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; margin-top: .35rem; }
.ts-mars:has(> :nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ts .ts-mar { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: .15rem; line-height: 1.1; min-height: 48px; }
.ts-mar .ts-sym { font-size: 1.2rem; }
.ts-mar b { font-size: .85rem; }
.ts .ts-mar.ts-red[aria-pressed="true"] { color: #ffd9d9; }
.ts-prev { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; margin: .35rem 0 0; min-height: 1.3em; }
.ts-prev .ts-note { font-size: .85rem; color: #8a5a14; font-weight: 700; }
.ts-prev .ts-arrow { margin-left: auto; color: var(--pc); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ts-err { min-height: 1.2em; margin: .3rem 0; }

/* game over */
.ts-over { border-top: 3px double var(--card-rule); padding-top: .4rem; }
.ts-winner { font-size: 1.5rem; font-weight: 800; text-align: center; margin: .4rem 0; }
.ts-over .ts-hint { text-align: center; }

.ts-ctl { margin-top: .8rem; }
.ts-ctl .ts-undo { flex: 1; }

/* ---- setup ---- */
.ts-names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .5rem; }
.ts-names .tl-field > span { color: var(--pc); font-weight: 700; }
.ts-more { margin: .7rem 0; border-top: 1px solid var(--card-rule); padding-top: .3rem; }
.ts-more > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.ts-more > summary::before { content: "▸"; margin-right: .4rem; }
.ts-more[open] > summary::before { content: "▾"; }
.ts-more > summary::-webkit-details-marker { display: none; }
.ts-more > summary { list-style: none; }

/* ---- the score sheet ---- */
.ts-scroll { overflow-x: auto; }
.ts-sheet { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ts-sheet th, .ts-sheet td { padding: .2rem .3rem; text-align: right; }
.ts-sheet thead th { font-size: .85rem; color: var(--pc, var(--card-soft)); border-bottom: 2px solid var(--card-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 5.5rem; }
.ts-sheet .ts-no { color: var(--card-soft); font-weight: 400; width: 2rem; text-align: left; }
.ts-sheet thead th:first-child { text-align: left; }
.ts-r td b { display: block; font-size: 1.05rem; }
.ts-r td small { display: block; color: var(--card-soft); font-size: .8rem; }
.ts-r td.ts-deccell { background: #f1ead9; }
.ts-r td.ts-deccell b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ts-r td.ts-barcell b { color: #8a5a14; }
.ts-r td.ts-outcell { color: #a09683; }
.ts-rdesc td { text-align: left; font-size: .82rem; color: var(--card-soft); border-bottom: 1px solid var(--card-rule); padding-bottom: .35rem; }
