/* Ten Phases score sheet (score tab). Inside .tl-card (light card palette in both themes). */
.tp { padding: .6rem .55rem .8rem; }
.tp-s0 { --seat: #b3141b; }
.tp-s1 { --seat: #1f4e8c; }
.tp-s2 { --seat: #2c6e3f; }
.tp-s3 { --seat: #8a5a00; }
.tp-s4 { --seat: #6b3d8f; }
.tp-s5 { --seat: #0f6f78; }
.tp-live { min-height: 1.4em; margin: .2rem 0 .4rem; font-weight: 700; text-align: center; }
.tp-live:empty { min-height: 0; margin: 0; }

/* the hand in play */
.tp-hand { border-bottom: 3px double var(--card-rule); padding-bottom: .3rem; margin-bottom: .5rem; }
.tp-handhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; }
.tp-handhead strong { font-size: 1.2rem; }
.tp-handhead span { color: var(--card-soft); }
.tp-hint { margin: .35rem 0; }
.tp .tp-big { width: 100%; min-height: 52px; font-weight: 700; }

/* one card per player: name, total, phase, progress, entries */
.tp-players { display: grid; gap: .55rem; }
.tp-player { background: #fbf6ea; border: 1px solid var(--card-rule); border-left: 6px solid var(--seat); border-radius: 8px; padding: .4rem .5rem .5rem .6rem; min-width: 0; }
.tp-player.tp-won { background: color-mix(in srgb, var(--seat) 10%, #fff); }
.tp-player.tp-isout { box-shadow: 0 0 0 2px var(--seat); }
.tp-head { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.tp-nm { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .4rem; min-width: 0; flex: 1; }
.tp-name { font-weight: 800; font-size: 1.1rem; color: var(--seat); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tp-badge { font-size: .8rem; font-variant-caps: all-small-caps; letter-spacing: .06em; color: #fff; background: var(--card-ink); border-radius: 4px; padding: 0 .35rem; white-space: nowrap; }
.tp-badge2 { background: none; color: var(--card-soft); border: 1px solid var(--card-line); }
.tp-total { white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.tp-total b { font-size: 1.5rem; font-weight: 800; }
.tp-total small { color: var(--card-soft); }
.tp-phase { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .6rem; margin: .1rem 0 .2rem; }
.tp-ph { font-size: 1.45rem; font-weight: 800; line-height: 1.2; }
.tp-req { font-size: 1.02rem; }
.tp-dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; list-style: none; margin: .2rem 0 0; padding: 0; max-width: 22rem; }
.tp-dots li { text-align: center; font-size: .8rem; line-height: 1.5; border-radius: 3px; border: 1px solid var(--card-rule); color: var(--card-soft); background: var(--card); font-variant-numeric: tabular-nums; }
.tp-dots li.tp-done { background: var(--seat); border-color: var(--seat); color: #fff; font-weight: 700; }
.tp-dots li.tp-cur { border: 2px solid var(--seat); color: var(--card-ink); font-weight: 800; }

/* entries of this hand */
.tp-entry { border-top: 1px dashed var(--card-rule); margin-top: .45rem; padding-top: .45rem; }
.tp-btns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: .4rem; }
.tp .tp-laid, .tp .tp-out { display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .3rem .5rem; line-height: 1.15; background: var(--card); }
.tp .tp-laid[aria-pressed="true"], .tp .tp-out[aria-pressed="true"] { background: var(--seat); border-color: var(--seat); color: #fff; font-weight: 700; }
.tp .tp-laid[disabled] { opacity: 1; cursor: default; }
.tp-tick { display: inline-block; width: 1.1em; height: 1.1em; line-height: 1.05em; border: 1.5px solid currentColor; border-radius: 3px; font-weight: 800; flex: none; text-align: center; }
.tp-choose .tp-btns, .tp-choose + .tp-btns { grid-template-columns: 1fr; }
.tp-lbl { display: block; font-size: .95rem; color: var(--card-soft); }
.tp-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; margin: .3rem 0 .4rem; }
.tp .tp-chip { font: inherit; min-height: 44px; font-weight: 700; font-size: 1.05rem; border-radius: 6px; background: var(--card); color: var(--card-ink); border: 1px solid var(--card-line); cursor: pointer; }
.tp .tp-chip[aria-pressed="true"] { background: var(--seat); border-color: var(--seat); color: #fff; }
.tp .tp-chip[disabled] { background: #eee7d8; color: #b9ae98; border-color: #ddd3c0; text-decoration: line-through; cursor: default; }
.tp-penrow { display: grid; grid-template-columns: auto minmax(4.5rem, 1fr) auto; align-items: center; gap: .4rem; margin-top: .45rem; }
.tp .tp-penrow input { padding: .45rem .5rem; font-size: 1.15rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.tp .tp-penrow input[disabled] { background: #eee7d8; }
.tp-zero { font-size: .9rem; color: var(--card-soft); font-style: italic; }
.tp-countbtn { white-space: nowrap; padding: .3rem .6rem; }
.tp-counter { margin-top: .4rem; padding: .35rem .5rem; border: 1px dashed var(--card-line); border-radius: 8px; background: var(--card); }
.tp-crow { display: grid; grid-template-columns: minmax(0, 1fr) 44px 2.2rem 44px; align-items: center; gap: .3rem; margin: .2rem 0; }
.tp-ck { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .4rem; }
.tp-ck small { color: var(--card-soft); }
.tp .tp-step { padding: 0; font-size: 1.3rem; font-weight: 800; }
.tp-cv { text-align: center; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tp-csum { margin: .3rem 0 .1rem; font-weight: 700; text-align: right; }
.tp-err { margin: .5rem 0 0; font-weight: 700; }
.tp-err:empty { margin: 0; }
.tp-record { margin-top: .6rem; }

/* skips */
.tp-skips { margin-top: .8rem; border-top: 1px solid var(--card-rule); padding-top: .2rem; }
.tp-skips h4 { margin: .4rem 0 0; font-size: .95rem; color: var(--card-soft); }
.tp .tp-skip[aria-pressed="true"] { text-decoration: line-through; }

/* tiebreak and game over */
.tp-tiebox { border-bottom: 3px double var(--card-rule); }
.tp-tiebtns { display: grid; gap: .4rem; margin: .5rem 0; }
.tp-over { border-bottom: 3px double var(--card-rule); padding-bottom: .4rem; margin-bottom: .5rem; }
.tp-winner { font-size: 1.5rem; font-weight: 800; text-align: center; margin: .3rem 0; }
.tp-winner.tp-tie { font-size: 1.15rem; }
.tp-table { border-collapse: collapse; width: 100%; margin: .6rem 0 .2rem; font-variant-numeric: tabular-nums; }
.tp-table caption { text-align: left; font-weight: 700; padding-bottom: .2rem; }
.tp-table th, .tp-table td { padding: .3rem .4rem; border-bottom: 1px solid var(--card-rule); text-align: right; }
.tp-table th[scope=row] { text-align: left; font-variant-caps: normal; letter-spacing: 0; text-transform: none; font-size: 1rem; }
.tp-table tr.tp-won th, .tp-table tr.tp-won td { font-weight: 800; }

/* controls, history, reminders */
.tp-ctl { margin-top: .9rem; }
.tp-undo { flex: 1; }
.tp-more { margin: .4rem 0 0; border-top: 1px solid var(--card-rule); }
.tp-more summary { cursor: pointer; font-weight: 700; padding: .6rem 0; min-height: 44px; }
.tp-more h4 { font-size: .95rem; margin: .5rem 0 .2rem; color: var(--card-soft); }
.tp-hist { list-style: none; margin: 0; padding: 0; }
.tp-hist li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 3.2rem 3.8rem; gap: .4rem; padding: .15rem 0 .15rem .4rem;
  border-left: 3px solid var(--seat); border-bottom: 1px dotted var(--card-rule); font-size: .92rem; font-variant-numeric: tabular-nums; }
.tp-hist li > :nth-child(3), .tp-hist li > :nth-child(4) { text-align: right; }
.tp-hwho { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-ok { color: #2c6e3f; font-weight: 700; }
.tp-miss { color: var(--card-soft); }
.tp-hrow { margin: .2rem 0; }
.tp-phases { list-style: none; margin: 0; padding: 0; }
.tp-phases li { display: grid; grid-template-columns: 5.2rem 1fr; gap: .4rem; padding: .15rem 0; border-bottom: 1px dotted var(--card-rule); }
.tp-rem { padding-left: 1.2rem; margin: .6rem 0; }
.tp-rem li { margin: .25rem 0; }

/* setup */
.tp-setup .tl-h { margin-top: .2rem; }
.tp .tp-cnt { min-width: 48px; font-weight: 700; }
.tp-names { display: grid; gap: 0 .6rem; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); }
.tp-names label > span { color: var(--seat); font-weight: 700; }
.tp-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.tp-modes .tl-btn { padding: .3rem .4rem; line-height: 1.2; }
.tp-firstrow { display: flex; flex-wrap: wrap; gap: .4rem; }
.tp-start { min-width: 8rem; }
