[data-team-root] { display:grid; align-content:start; gap:1.15rem; min-width:0; }
[data-team-root] > .panel-spaced { margin:0; }

.team-sections { display:flex; align-items:stretch; gap:clamp(.85rem,2.5vw,2rem); border-bottom:1px solid var(--line); }
.team-sections a { display:inline-flex; align-items:center; gap:.4rem; min-height:44px; padding:0 .15rem; margin-bottom:-1px;
  border-bottom:3px solid transparent; color:var(--muted); text-decoration:none; font:560 .9rem/1.15 var(--sans); }
.team-sections a:hover, .team-sections a[aria-current] { color:var(--ink); }
.team-sections a[aria-current] { border-color:#a9873a; font-weight:680; }
.team-count { display:inline-grid; place-items:center; min-width:1.3rem; min-height:1.25rem; padding:0 .3rem;
  border-radius:6px; background:#f1e8d2; color:#6a501e; font:650 .72rem/1 var(--sans); }

.roster-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.8rem; }
.roster-summary button { display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; align-content:center; align-items:center;
  gap:.25rem .85rem; min-width:0; padding:1.05rem 1.15rem; border:1px solid var(--line); border-radius:14px; text-align:start;
  color:var(--ink); background:var(--surface); cursor:pointer; }
.roster-summary button:hover { border-color:#b6a582; background:#fdfbf6; }
.roster-summary button[aria-pressed="true"] { border-color:#b99a58; background:#faf6eb; box-shadow:inset 0 0 0 1px #c4aa7329; }
.roster-summary button:focus-visible,.team-sections a:focus-visible { outline:2px solid #836527; outline-offset:2px; }
.roster-summary-icon,.roster-date-icon { display:grid; place-items:center; flex:none; width:36px; height:36px;
  border-radius:10px; color:#786134; background:#f1e9d8; }
.roster-summary-icon { grid-row:1 / span 2; }
[data-roster-filter="in"] .roster-summary-icon { color:#47634d; background:#eaf1e9; }
[data-roster-filter="attention"] .roster-summary-icon { color:#825924; background:#f8edd9; }
.roster-summary-value { font:680 clamp(1.5rem,2.4vw,1.9rem)/1 var(--heading); font-variant-numeric:tabular-nums; letter-spacing:-.045em; }
.roster-summary-label { color:#655e51; font:550 .8rem/1.3 var(--sans); }

.roster-panel { container:daily-roster / inline-size; }
.content .roster-panel .panel-head { display:flex; gap:.9rem 1rem; padding:1.15rem 1.35rem; background:var(--surface); }
.roster-panel .panel-head > div:first-child { min-width:0; flex:1 1 15rem; }
.roster-panel .panel-head h2 { display:flex; gap:.65rem; align-items:center; }
.roster-panel .panel-head h2 > span:last-child { min-width:0; }
.roster-panel .panel-head .roster-date-icon { width:29px; height:29px; border-radius:8px; }
.roster-date-icon svg { width:16px; height:16px; }
.roster-panel .panel-head p { color:var(--muted); font-size:.8rem; }
.roster-controls { display:grid; grid-template-columns:minmax(8.6rem,1fr) minmax(8rem,1fr); gap:.65rem; max-width:100%; width:20.5rem; }
.roster-controls .tkui-field { min-width:0; gap:.3rem; }
.roster-controls .tkui-label { font-size:.74rem; color:var(--muted); }
.roster-controls :is(.tkui-input,.tkui-select) { min-width:0; width:100%; min-height:40px; font-size:.85rem; }
.content .roster-panel .record-table { width:100%; table-layout:fixed; }
.roster-panel .record-table th:nth-child(1) { width:27%; }
.roster-panel .record-table th:nth-child(2) { width:18%; }
.roster-panel .record-table th:nth-child(3) { width:23%; }
.roster-panel .record-table th:nth-child(5) { width:5.7rem; text-align:end; }
.roster-panel .record-table td:last-child { text-align:end; }
.roster-panel .person-cell { min-width:0; }
.roster-panel .person-cell > span:last-child { min-width:0; }
.roster-time { display:inline-flex; align-items:center; gap:.25em; white-space:nowrap; font:600 .88rem/1.4 var(--sans); font-variant-numeric:tabular-nums; }
.roster-dash { color:#988f80; font-weight:400; }
.roster-next-day { color:var(--muted); font-size:.73rem; }
.content .roster-panel .table-context { font-size:.77rem; line-height:1.38; }
.roster-panel .status { white-space:normal; max-width:100%; }
.roster-panel .record-table td:has([data-team-action="resolve"]) .hr-icon-action { border-color:#d0b980; color:#775915; background:#fcf7eb; }
.roster-detail { min-width:0; }
.roster-person { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.65rem; }
.roster-detail > p { font-size:.86rem; color:var(--muted); margin:.7rem 0; }
.roster-detail dl { margin:0; }
.roster-detail dl > div { display:flex; align-items:baseline; justify-content:space-between; gap:1rem; padding:.55rem 0; border-top:1px solid var(--line); }
.roster-detail dt { flex-shrink:0; color:var(--muted); font-size:.84rem; }
.roster-detail dd { margin:0; text-align:end; overflow-wrap:anywhere; }
.team-inbox .panel-head > .tkui-field { min-width:min(100%,11rem); }
@media(max-width:820px) {
  .content .roster-panel .panel-head { padding:1rem; }
  .roster-controls { width:18rem; }
  .roster-summary button { padding:.8rem; gap:.25rem .6rem; }
}
@media(max-width:620px) {
  [data-team-root] { gap:.85rem; }
  .team-sections { gap:1rem; }
  .team-sections a { font-size:.81rem; }
  .roster-summary { gap:.4rem; }
  .roster-summary button { grid-template-columns:minmax(0,1fr) auto; gap:.4rem .12rem; align-content:start; padding:.66rem .64rem; border-radius:11px; }
  .roster-summary-icon { grid-area:1/2; width:24px; height:24px; border-radius:7px; }
  .roster-summary-icon svg { width:14px; height:14px; }
  .roster-summary-value { grid-area:1/1; font-size:1.5rem; }
  .roster-summary-label { grid-column:1/-1; font-size:.73rem; }
  .roster-controls { width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .roster-controls :is(.tkui-input,.tkui-select) { min-height:44px; }
}
@container daily-roster (max-width:675px) {
  .roster-controls { width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .content .roster-panel .record-scroll { overflow:visible; }
  .content .roster-panel .record-table,.roster-panel .record-table tbody { display:block; }
  .roster-panel .record-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .content .roster-panel .record-table tbody td { min-width:0; padding:0; border:0; }
  .content .roster-panel .record-table tbody td:is(:nth-child(2),:nth-child(3))::before {
    display:block; content:attr(data-label); color:var(--muted); font:500 .76rem/1.4 var(--sans); margin-bottom:.18rem;
  }
  .roster-panel .record-table tbody tr + tr { border-top:1px solid var(--line); }
  .roster-panel .record-table tbody tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;
    padding:.9rem 1rem; grid-template-areas:"person person action" "planned actual actual" "status status status"; gap:.65rem .7rem; align-items:start; }
  .roster-panel .record-table tbody td:first-child { grid-area:person; align-self:center; }
  .roster-panel .record-table tbody td:nth-child(2) { grid-area:planned; }
  .roster-panel .record-table tbody td:nth-child(3) { grid-area:actual; }
  .roster-panel .record-table tbody td:nth-child(4) { grid-area:status; }
  .roster-panel .record-table tbody td:last-child { grid-area:action; padding:0; }
  .content .roster-panel .record-table tbody td:is(:nth-child(4),:last-child)::before { display:none; }
  .roster-panel .person-cell .avatar { display:grid; }
  .content .roster-panel .record-table tbody td:nth-child(4) { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; }
}
