/* One edge-to-edge layout for both the bookmarked board and the planner overlay.
   Never transform/zoom the whole board: cards fill the viewport, content stays compact. */
.tv-fit-host, #tv.tv-fit-host {
  --tv-row-space:100px;
  width:100%; height:100vh; height:100dvh; min-height:0;
  padding:clamp(10px,1.8vmin,24px);
  flex-direction:column; align-items:stretch; justify-content:flex-start;
  overflow:hidden;
}
:is(.tv-fit-host, #tv.tv-fit-host) :is(.top, .tvtop) {
  flex-shrink:0; gap:12px; margin-bottom:clamp(10px,1.5vh,18px);
}
:is(.tv-fit-host, #tv.tv-fit-host) :is(.top, .tvtop) img {
  width:clamp(150px,18vw,220px); height:auto; min-height:0;
}
:is(.tv-fit-host, #tv.tv-fit-host) .r { gap:8px; }
:is(.tv-fit-host, #tv.tv-fit-host) :is(.pill, .btn) {
  font-size:clamp(10px,1.2vh,13px); padding:7px 11px;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-boards {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:clamp(10px,1.4vw,24px); flex:1; min-height:0;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-col {
  padding:0; min-width:0; min-height:0; border-radius:16px;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-col-title {
  display:flex; align-items:baseline; gap:8px; text-align:left;
  font-size:clamp(12px,1.65vh,17px);
  padding:clamp(10px,1.4vh,16px) clamp(12px,1.2vw,22px) 6px;
  margin:0; flex-shrink:0;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-team-stats {
  grid-template-columns:1.35fr 1fr; gap:16px; margin:0;
  padding:0 clamp(12px,1.2vw,22px) clamp(8px,1.2vh,14px);
  flex-shrink:0;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-t-stat { padding:5px 0; }
:is(.tv-fit-host, #tv.tv-fit-host) .tv-t-stat-label {
  font-size:clamp(8px,1vh,11px); margin-bottom:5px;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-t-stat-val {
  font-size:clamp(20px,2.6vh,28px); margin-bottom:6px;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-agent-list {
  gap:clamp(5px,.8vh,10px); padding:clamp(6px,1vh,12px);
  flex:1; min-height:0;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-agent-row {
  grid-template-columns:minmax(0,1.15fr) minmax(0,1.4fr) minmax(0,.8fr);
  gap:clamp(6px,.8vw,14px); padding:clamp(4px,1vh,12px) clamp(8px,1vw,18px);
  flex:1 1 0; min-height:0; border-radius:10px;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-a-info { min-width:0; gap:0; }
:is(.tv-fit-host, #tv.tv-fit-host) .tv-a-name {
  font-size:clamp(12px,calc(var(--tv-row-space) * .2),20px);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-awards { gap:3px; margin-top:5px; }
:is(.tv-fit-host, #tv.tv-fit-host) .tv-award {
  min-height:16px; gap:5px; flex-wrap:wrap; row-gap:0;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-award-label { font-size:clamp(9px,.95vh,11px); }
:is(.tv-fit-host, #tv.tv-fit-host) .tv-a-sales-breakdown {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(4px,.6vw,10px); grid-row:auto; grid-column:auto;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-s-pill {
  flex-direction:column; align-items:flex-start; padding:6px;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-sl { font-size:clamp(8px,.9vh,10px); }
:is(.tv-fit-host, #tv.tv-fit-host) .tv-sv { font-size:clamp(14px,1.9vh,20px); }
:is(.tv-fit-host, #tv.tv-fit-host) .tv-a-sales-total { min-width:0; grid-row:auto; grid-column:auto; }
:is(.tv-fit-host, #tv.tv-fit-host) .tv-total-label {
  font-size:clamp(7px,.8vh,9px); letter-spacing:.03em; margin-bottom:4px;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-a-sales-total .tv-bignum {
  font-size:clamp(22px,3.1vh,34px); margin-bottom:6px; white-space:nowrap;
}
:is(.tv-fit-host, #tv.tv-fit-host) .tv-a-sales-total .tv-bignum span {
  font-size:clamp(9px,1.1vh,12px);
}
:is(.tv-fit-host, #tv.tv-fit-host) :is(.tv-a-prog, .tv-t-stat-bar) { height:5px; }
/* Narrow screens reflow instead of shrinking the page into an unreadable island. */
@media (max-width:760px) {
  .tv-fit-host, #tv.tv-fit-host { overflow:auto; }
  :is(.tv-fit-host, #tv.tv-fit-host) :is(.top, .tvtop) { flex-wrap:wrap; }
  :is(.tv-fit-host, #tv.tv-fit-host) .r { flex-wrap:wrap; }
  :is(.tv-fit-host, #tv.tv-fit-host) .tv-boards {
    grid-template-columns:minmax(0,1fr); flex:1 0 auto;
  }
  :is(.tv-fit-host, #tv.tv-fit-host) .tv-agent-row {
    grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); min-height:132px;
  }
  :is(.tv-fit-host, #tv.tv-fit-host) .tv-a-sales-total { grid-row:1; grid-column:2; }
  :is(.tv-fit-host, #tv.tv-fit-host) .tv-a-sales-breakdown { grid-row:2; grid-column:1 / -1; }
}
@media (max-height:600px) and (min-width:761px) {
  :is(.tv-fit-host, #tv.tv-fit-host) .tv-col-title { padding-top:7px; }
  :is(.tv-fit-host, #tv.tv-fit-host) .tv-t-stat-label { margin-bottom:3px; }
  :is(.tv-fit-host, #tv.tv-fit-host) .tv-team-stats { padding-bottom:5px; }
  :is(.tv-fit-host, #tv.tv-fit-host) .tv-awards { gap:2px; margin-top:3px; }
  :is(.tv-fit-host, #tv.tv-fit-host) .tv-award { min-height:14px; }
  :is(.tv-fit-host, #tv.tv-fit-host) .tv-medal { width:14px; height:14px; }
}