.tb-workspace .tb-shell { grid-template-rows:54px 42px 26px minmax(0,1fr) 46px 54px; gap:6px; }
.tb-workspace .tb-status { grid-row:3; padding:5px 10px; }
.tb-matchbar { display:grid; grid-template-columns:112px minmax(0,1fr); gap:8px; min-width:0; }
.tb-match-date { position:relative; display:flex; flex-direction:column; align-items:stretch; justify-content:center; min-width:0; padding:2px 7px; border:1px solid #cddde5; border-radius:9px; background:#fff; }
.tb-match-date>span { color:#526e7b; font-size:.63rem; line-height:1; padding-left:2px; }
.tb-match-date>strong { color:#17455f; font-size:.83rem; font-weight:800; font-variant-numeric:tabular-nums; line-height:1.25; padding:1px 2px 0; }
.tb-match-date>strong::after { content:'▾'; margin-left:4px; font-size:.65rem; }
.tb-match-date select { position:absolute; inset:0; width:100%; height:100%; opacity:0; font-size:16px; cursor:pointer; }
.tb-games { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; min-width:0; }
.tb-games .tb-game { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:2px; min-width:0; padding:2px; border:1px solid #cddde5; border-radius:9px; background:#fff; color:#254f65; font-size:.75rem; line-height:1.1; }
.tb-game span,.tb-game strong { display:block; max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tb-game strong { color:#537385; font-variant-numeric:tabular-nums; font-size:.74rem; }
.tb-games .tb-game.is-current { border-color:#00558f; background:#00558f; color:#fff; }
.tb-game.is-current strong { color:#f1ce80; }
.tb-live-dot { display:inline-block; width:5px; height:5px; margin:0 0 2px 4px; border-radius:50%; background:#9a7227; }
.tb-game.is-current .tb-live-dot { background:#f1ce80; }
.tb-game:focus-visible,.tb-match-date:focus-within,.tb-roster-numbers:focus-visible { outline:2px solid #ad8437; outline-offset:1px; }
.tb-roster-heading h3 { display:flex; flex-wrap:wrap; align-items:center; column-gap:8px; row-gap:3px; }
#tb-roster-count { color:#275670; background:#e7eff4; border-radius:12px; padding:3px 7px; font-size:.7rem; font-weight:800; white-space:nowrap; }
.tb-roster-numbers { display:flex; align-items:center; flex:0 0 38px; gap:6px; min-width:0; margin:0 0 5px; padding:2px 2px 5px; list-style:none; overflow:auto hidden; scrollbar-width:thin; overscroll-behavior-inline:contain; }
.tb-roster-number { display:grid; place-items:center; flex:0 0 28px; height:28px; border:1px solid #c5a059; border-radius:50%; background:#00558f; color:#f1ce80; font-size:.78rem; font-weight:900; font-variant-numeric:tabular-nums; line-height:1; }
.tb-no-selection { color:#647e8a; padding:3px 0; font-size:.76rem; }
.tb-review-match { color:#28586d; margin:2px 0 0; font-size:.77rem; font-weight:750; line-height:1.2; }
.lv-date { max-width:52%; overflow-wrap:anywhere; line-height:1.2; }

.tb-workspace .tb-board .tb-position { --tb-marker-inset:26px; top:clamp(var(--tb-marker-inset),var(--tb-marker-y),calc(100% - var(--tb-marker-inset))); }
.tb-workspace .tb-board .tb-position span,.tb-workspace .tb-board .tb-position strong { line-height:1.1; }

.tb-position-pulse { position:absolute; inset:-2px; border:2px solid #f1d492; border-radius:inherit; pointer-events:none; box-shadow:0 0 0 1px #f1d49255; animation:tb-preferred-pulse 1.8s ease-in-out infinite; }
@keyframes tb-preferred-pulse { 50% { box-shadow:0 0 0 3px #f1d49288,0 0 9px #f1d49277; } }
@media(prefers-reduced-motion:reduce) { .tb-position-pulse { animation:none; } }

@media(max-width:740px) {
  .tb-workspace .tb-shell { grid-template-rows:46px 38px 23px minmax(0,1fr) 39px 46px; gap:5px; }
  .tb-matchbar { grid-template-columns:minmax(65px,.95fr) minmax(0,4fr); gap:4px; }
  .tb-match-date { padding:2px 3px; }
  .tb-match-date>span { font-size:.56rem; }
  .tb-games { gap:4px; }
  .tb-games .tb-game,.tb-game strong { font-size:.67rem; }
  .tb-workspace .tb-status { padding:4px 7px; }
  .tb-review-match { font-size:.67rem; }
}
@media(max-height:650px) and (orientation:portrait) {
  .tb-workspace .tb-shell { grid-template-rows:40px 34px 20px minmax(0,1fr) 34px 40px; gap:4px; }
  .tb-workspace .tb-footer { padding-bottom:3px; }
}
@media(max-height:520px) and (orientation:landscape) {
  .tb-workspace .tb-shell { grid-template-rows:38px 34px 20px minmax(0,1fr) 32px 36px; gap:3px; }
  .tb-workspace .tb-footer { padding-bottom:3px; }
  .tb-review-match { font-size:.65rem; }
}
@media(max-height:650px) and (orientation:portrait), (max-height:520px) and (orientation:landscape) {
  .tb-workspace .tb-board .tb-position { --tb-marker-inset:18px; min-height:30px; height:30px; padding:1px 2px; }
  .tb-workspace .tb-board .tb-position strong { margin-top:1px; }
  .tb-workspace .tb-board .tb-position.is-selected strong { margin-top:0; }
}
