[data-team-pool-mount]{position:sticky;top:var(--team-pool-top,100px);z-index:9;margin-bottom:18px}
.team-pool-panel{padding:16px;background:var(--surface,#fff);box-shadow:0 8px 24px rgba(15,23,42,.12);border:1px solid var(--line,#dfe5ec);max-height:max(160px,calc(100dvh - var(--team-pool-top,100px) - 160px));overflow:auto;overscroll-behavior:contain}
.team-pool-heading,.team-pool-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.team-pool-heading h2{font-size:18px;margin:3px 0 0}.team-pool-heading h2 .badge{vertical-align:middle}
.team-pool-tournament-actions{display:flex;flex-wrap:wrap;align-items:end;gap:8px;margin-top:12px}
.team-pool-tournament-actions>label{display:flex;flex-direction:column;gap:4px;min-width:180px;max-width:100%;font-size:12px}
.team-pool-tournament-actions select{max-width:100%;min-width:0;width:260px}
.team-pool-tournament-actions>.muted{flex-basis:100%;font-size:12px}
.team-roster-dialog{width:min(520px,calc(100vw - 32px));box-sizing:border-box;border:1px solid var(--line,#ccd4df);border-radius:14px;padding:24px;background:var(--surface,#fff);color:var(--ink,#172033)}
.team-roster-dialog::backdrop{background:rgba(15,23,42,.5)}
.team-roster-dialog-body p{line-height:1.5}.team-roster-dialog-body input{box-sizing:border-box;min-height:42px;margin-top:8px}
.team-roster-dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:20px}
.team-pool-controls{display:grid;grid-template-columns:minmax(180px,1.5fr) minmax(135px,1fr) minmax(145px,1fr);gap:10px;margin-top:12px}
.team-pool-controls label{display:flex;flex-direction:column;gap:5px;font-size:11px;font-weight:700;color:var(--muted)}
.team-pool-controls select,.team-pool-controls input{width:100%;max-width:none;min-width:0;min-height:38px;font-size:12px;color:var(--ink)}
.team-pool-note{margin:10px 0;font-size:12px;color:var(--muted);line-height:1.5}
.team-pool-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(255px,1fr));gap:8px;max-height:min(28vh,250px);overflow:auto;overscroll-behavior:contain;padding-right:4px}
.team-pool-student{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--line);background:var(--surface-soft,var(--surface-2));border-radius:10px;padding:10px;min-width:0}
.team-pool-student>div:first-child{display:flex;flex-wrap:wrap;align-items:center;gap:4px 7px;min-width:0;font-size:11px}
.team-pool-student strong{display:block;flex-basis:100%;font-size:12px;overflow-wrap:anywhere}
.team-pool-events{flex-basis:100%;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}
.team-pool-assign{display:flex;gap:3px}.team-pool-assign button{padding:7px 10px;min-width:32px;min-height:34px;color:#1d4ed8}
.team-pool-availability{font-size:10px;font-weight:700;padding:3px 6px;border-radius:6px;white-space:nowrap;background:#e8edf5;color:#4b5563}
.team-pool-availability.is-yes{background:#dcfce7;color:#166534}.team-pool-availability.is-maybe{background:#fef3c7;color:#854d0e}.team-pool-availability.is-no{background:#fee2e2;color:#991b1b}
.team-pool-footer{margin-top:10px;font-size:11px;color:var(--muted)}
.team-roster-current-members{position:static;box-shadow:none}.team-roster-current-members h2{font-size:18px;margin:4px 0}
.team-roster-current-members .team-roster-student{flex-wrap:wrap}.team-pool-release{border:0;background:transparent;color:var(--muted);cursor:pointer;font-size:17px;padding:1px 4px}.team-pool-release:disabled{cursor:not-allowed;opacity:.4}
[data-theme="dark"] .team-pool-assign button{color:#93c5fd}
@media(max-width:680px){.team-pool-panel{padding:12px}.team-pool-controls{grid-template-columns:1fr 1fr}.team-pool-controls label:first-child{grid-column:1/-1}.team-pool-list{grid-template-columns:1fr;max-height:22vh}.team-pool-heading h2{font-size:15px}.team-pool-assign button{min-height:40px;min-width:36px}.team-pool-note{font-size:11px}}
@media(max-height:550px){.team-pool-list{max-height:17vh}.team-pool-note{display:none}}

.team-pool-number-panel{margin:12px 0;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.team-pool-number-panel h3{margin:0 0 6px;font-size:1rem}.team-pool-number-panel p{margin:0 0 10px;font-size:.85rem}
.team-pool-number-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:10px}.team-pool-number-fields label{display:grid;gap:5px;font-size:.8rem}.team-pool-number-fields input{width:100%;min-width:0}.team-pool-number-status{display:block;margin-top:8px;font-size:.85rem}
@media(max-width:420px){.team-pool-number-fields{grid-template-columns:1fr}}
