#appDialog:has(.team-roster-flow){width:min(48rem,calc(100vw - 1.5rem));max-width:none}
#appDialog[open]:has(.team-roster-flow){display:flex;flex-direction:column;overflow:hidden;--roster-gutter:23px}
#appDialog:has(.team-roster-flow)>.dialog-header{flex:none}
#appDialog:has(.team-roster-flow)>.dialog-body{display:flex;flex:1 1 auto;min-height:0;padding:0}
.team-roster-flow{display:flex;flex:1 1 auto;flex-direction:column;gap:0;min-width:0;min-height:0}
.team-roster-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;padding:1rem var(--roster-gutter)}
.team-roster-flow [hidden],.team-sleeve-details[hidden]{display:none!important}
.team-roster-flow h3{margin:0;font-size:1rem}
#appDialog .team-roster-flow :is(.team-actions button,.team-tools button,.team-row-actions button,.team-base-actions button,
  .team-proof-nav button,.team-proof-zoom-controls button,.team-proof-progress button,
  .team-roster-filters button,.team-import-columns select,[data-name-preview-row],[data-proof-row],
  .team-roster-search input,.team-row select,.team-row input:not([type=checkbox]),.team-personal-tools input[type=color]){
  min-height:var(--form-control-height);border-radius:var(--form-control-radius);line-height:1.25;min-width:0;
}
.team-roster-flow :is(.team-tools,.team-row-actions,.team-base-actions) button{padding:.45rem .65rem;white-space:normal;overflow-wrap:anywhere}
#appDialog .team-roster-flow :is(.team-row,.team-roster-search,.team-import-columns) :is(select,input:not([type=checkbox])){padding-block:.45rem}
.team-roster-flow .team-row [data-field=quantity]{font-variant-numeric:tabular-nums}
.team-roster-flow .team-row select,.team-roster-flow [data-proof-row]{width:100%}
.team-roster-flow .team-personal-tools input[type=color]{width:var(--form-control-height);padding:.25rem}
.team-roster-flow .team-personal-tools input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.team-roster-flow .team-personal-tools input[type=color]::-webkit-color-swatch{border:0;border-radius:4px}
.team-flow-nav{flex:none;position:relative;z-index:3;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.55rem;padding:.7rem var(--roster-gutter);border-bottom:1px solid var(--line);background:#fff}
.team-roster-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.3rem;margin:0;padding:0;list-style:none}
.team-roster-steps li{min-width:0;color:var(--muted);border:1px solid var(--line);border-radius:.55rem;font-size:.79rem}
.team-roster-steps li>div{display:flex;align-items:center;gap:.3rem;width:100%;height:100%;min-height:44px;
  padding:.37rem;text-align:start;font:inherit;line-height:1.2;color:inherit}
.team-roster-steps span{display:grid;place-items:center;flex:0 0 1.35rem;height:1.35rem;border-radius:50%;background:var(--soft);font-weight:700}
.team-roster-steps [aria-current=step]{border-color:var(--purple);background:var(--violet-bg);color:var(--purple-dark);font-weight:700}
.team-flow-more>summary{min-height:44px;padding:.3rem .45rem;color:var(--purple-dark);font-weight:650}
.team-flow-more>summary::after,.team-member-options>summary::after{content:"";width:6px;height:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:translateY(-2px) rotate(45deg);flex:none}
.team-flow-more[open]>summary::after,.team-member-options[open]>summary::after{transform:translateY(1px) rotate(225deg)}
.team-flow-more>div{position:absolute;inset-inline-end:var(--roster-gutter);inset-block-start:calc(100% - .45rem);display:grid;max-width:calc(100% - 2 * var(--roster-gutter));padding:.3rem;border:1px solid var(--line);border-radius:9px;background:#fff;box-shadow:0 8px 25px #1c142c25}
.team-flow-more button{min-height:44px;padding:.35rem .65rem;color:var(--purple-dark);text-align:start}
.team-flow-more button:hover{background:var(--violet-bg)}
.team-roster-scroll>[data-back]{margin-bottom:.65rem}
.team-base{display:grid;gap:.55rem}
.team-base p{margin:0}
.team-base-style,.team-base-actions{display:flex;align-items:center;gap:.45rem .75rem;flex-wrap:wrap}
.team-base-style span{color:var(--muted)}
.team-base-views{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;text-align:center}
.team-base-views figure{margin:0;min-width:0}
.team-base-views img{display:block;width:100%;height:auto;background:#f2f1ef;border-radius:9px}
.team-base-views figcaption{margin-top:.28rem;font-size:.87rem;color:var(--muted)}
.team-base [data-base-status]:empty{display:none}
.team-roster-flow .team-edit{min-width:0}
.team-roster-shortcuts{margin-block:.65rem .8rem}
.team-roster-shortcuts > button[data-personalize]{border-color:#c8b9ea;background:var(--violet-bg)}
.team-roster-shortcuts > button[aria-expanded=true]{border-color:var(--purple);background:var(--violet-bg)}
.team-roster-flow :is(.team-personal-tools,.team-paste){margin-block:.65rem;padding:.75rem;border:1px solid var(--line);border-radius:.55rem;background:#faf9fc}
.team-roster-flow .team-personal-tools>p{margin:0 0 .4rem}
.team-roster-flow .team-personal-tools .team-tools{margin:.45rem 0}
.team-roster-flow .team-personal-tools [data-name-placement]{color:var(--purple-dark);font-weight:650}
.team-name-setup{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,8.5rem);align-items:start;gap:.65rem;margin-bottom:.55rem}
.team-name-position{margin:0;padding:0;border:0;min-width:0}
.team-name-position legend{margin-bottom:.4rem;font-size:.88rem;font-weight:650}
.team-name-position>div{display:flex;gap:.3rem;flex-wrap:wrap}
.team-name-position>div label{gap:.25rem;min-height:44px;padding:.25rem .4rem;border:1px solid var(--line);border-radius:.5rem;background:white;cursor:pointer}
.team-name-position label:has(:checked){background:var(--violet-bg);color:var(--purple-dark);border-color:var(--purple);font-weight:650}
.team-name-position input[type=radio]{margin:0;width:1rem;height:1rem;min-height:0;accent-color:var(--purple)}
.team-name-position>p{margin:.3rem 0 0}
.team-name-position>p:empty{display:none}
.team-name-preview-picker{margin-top:.35rem;flex-wrap:wrap}
.team-name-preview-picker select{min-height:44px;max-width:100%}
.team-name-preview{margin:0;min-width:0;text-align:center;font-size:.78rem;color:var(--muted)}
.team-name-preview img{display:block;width:100%;aspect-ratio:1;object-fit:contain;background:#f2f1ef;border-radius:.55rem}
.team-name-preview figcaption{margin-top:.25rem;overflow-wrap:anywhere}
.team-roster-filters{display:flex;flex-wrap:wrap;align-items:end;gap:.25rem .65rem}
.team-roster-search{flex:1 1 12rem;min-width:0}
.team-roster-search input{width:100%;min-height:44px}
.team-roster-flow .team-roster-missing{display:flex;align-items:center;gap:.35rem;min-height:44px}
.team-roster-missing input{width:1rem;height:1rem;min-height:0;margin:0;flex:none}
.team-roster-filters button{min-height:44px}
.team-roster-flow .team-roster-results{margin:0}
.team-roster-flow .team-row{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,.65fr);gap:.45rem .65rem;align-items:start;padding:.7rem;margin-bottom:.5rem;border:1px solid var(--line);border-radius:var(--form-control-radius);background:#fff}
.team-row-heading,.team-member-options{grid-column:1/-1;min-width:0}
.team-roster-person{min-width:0}
.team-roster-flow .team-row input:not([type=checkbox]){width:100%;min-width:0}
.team-member-options{border-top:1px solid var(--line);margin-top:.12rem}
.team-member-options>summary{min-height:var(--form-control-height);color:var(--purple-dark)}
.team-member-options[open]{padding-block-end:.35rem}
.team-member-options .team-row-actions{margin-top:.5rem}
.team-member-options .team-row-actions [data-remove]{font-size:inherit;line-height:inherit}
.team-member-options .team-personal-fields:empty{display:none}
.team-roster-options{margin-block:.4rem;padding:.55rem .75rem;border:1px solid var(--line);border-radius:.55rem}
.team-roster-options summary{color:var(--purple-dark);cursor:pointer;text-align:start;white-space:normal}
.team-roster-options[open]>div{margin-top:.55rem}
.team-row-heading{display:flex;justify-content:space-between;align-items:center;gap:.4rem;overflow-wrap:anywhere}
.team-row-heading span{font-size:.78rem;color:var(--purple-dark);text-align:right}
.team-roster-flow .team-row-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr));align-items:stretch}
.team-roster-secondary{display:flex;flex-wrap:wrap;gap:.15rem .8rem}
.team-roster-secondary button{min-height:44px;text-align:center;white-space:normal}
.team-row-size{min-width:0}
.team-row-size-hint{color:var(--muted);font-weight:600}
.team-row-size:has(select[aria-invalid=true]) .team-row-size-hint{color:#8b3029}
.team-size-guide{min-width:0}
.team-row select[aria-invalid=true]{border-color:#b76c61}
.team-roster-flow .team-total{margin:.15rem 0 0}
.team-roster-flow .team-sizes{margin:0 0 .4rem}
.team-roster-footer{display:grid;grid-template-columns:minmax(4.5rem,1fr) auto;align-items:center;gap:.35rem .65rem;background:white;border-top:1px solid var(--line);padding:.6rem var(--roster-gutter) max(.6rem,env(safe-area-inset-bottom))}
.team-roster-footer{flex:none}
.team-roster-footer .team-error{grid-column:1/-1;margin:0;overflow-wrap:anywhere}
.team-roster-footer .team-error:empty{display:none}
.team-roster-footer .team-actions{display:flex;justify-content:flex-end;margin:0}
.team-roster-footer .team-actions button{
  display:inline-flex;align-items:center;align-self:stretch;justify-content:center;
  margin:0;text-align:center;white-space:normal;overflow-wrap:anywhere
}
.team-draft-status{grid-column:1/-1;color:var(--muted);text-align:end;overflow-wrap:anywhere}
.team-draft-status:empty{display:none}
.team-roster-flow .team-proof{gap:.65rem}
.team-proof-notices,.team-import-review{border:1px solid var(--line);background:white;padding:.7rem;border-radius:.55rem;margin-top:.5rem}
.team-proof-notices ul{margin:.35rem 0;padding-left:1.25rem}
.team-proof-notices .link-button{text-align:left;white-space:normal;overflow-wrap:anywhere}
.team-import-review table{width:100%;text-align:left;border-collapse:collapse;font-size:.88rem}
.team-import-review th,.team-import-review td{border-bottom:1px solid var(--line);padding:.35rem;overflow-wrap:anywhere}
.team-import-review .team-table-scroll{max-height:12rem}
.team-duplicate-confirm{display:flex;align-items:start;gap:.5rem}
.team-duplicate-confirm input{width:1rem;height:1rem;margin:.2rem 0 0;flex:none}
.team-sleeve-proofs .team-proof-image{aspect-ratio:1.25}
.team-sleeve-details{margin:.45rem 0}
.team-sleeve-details summary{cursor:pointer;color:var(--purple-dark);font-weight:650}
.team-sleeve-details .customer-previews{margin-top:.45rem}
.team-proof-nav{display:grid;grid-template-columns:var(--form-control-height) minmax(0,1fr) var(--form-control-height);gap:.45rem;align-items:end}
.team-proof-nav>button,.team-proof-zoom-controls>button{background:white;border:1px solid var(--line);border-radius:.55rem;min-height:44px;padding:.4rem .65rem}
.team-proof-nav>button{min-width:44px;font-size:1.2rem}
.team-proof-filters,.team-proof-zoom-controls,.team-roster-undo{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap}
.team-proof-filters{justify-content:space-between;font-size:.88rem}
.team-proof-progress{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.35rem .8rem;padding:.65rem .8rem;border:1px solid var(--line);border-radius:.55rem;background:var(--violet-bg)}
.team-proof-progress strong{color:var(--purple-dark);font-variant-numeric:tabular-nums}
.team-proof-progress progress{grid-column:1;width:100%;height:.45rem;accent-color:var(--purple)}
.team-proof-progress button{grid-column:2;grid-row:1/3;min-height:44px;white-space:normal}
.team-proof-filters label,.team-import-review .team-import-header{display:flex;align-items:center;gap:.35rem}
.team-proof-filters input,.team-import-header input{width:1rem;height:1rem;min-height:0;margin:0;flex:none}
.team-roster-flow .team-proof-image{display:block;width:100%;padding:0;cursor:zoom-in}
.team-proof-zoom-controls{margin-bottom:.4rem}
.team-proof-zoom-controls strong{flex:1 0 5rem}
.team-proof-zoom-controls [aria-pressed=true]{border-color:var(--purple);color:var(--purple-dark);background:var(--violet-bg)}
.team-proof-zoom-scroll{overflow:auto;max-height:min(52dvh,31rem);background:white;border:1px solid var(--line);border-radius:.55rem}
.team-proof-zoom-scroll img{display:block;width:100%;max-width:none;height:auto}
.team-proof-zoom-scroll.is-zoomed img{width:200%}
.team-roster-flow [data-mark-proof],.team-roster-flow [data-proof-retry]{justify-self:start;min-height:44px}
.team-roster-undo{padding:.3rem .6rem;margin-bottom:.35rem;border-radius:.45rem;background:var(--violet-bg);color:var(--purple-dark)}
.team-roster-undo [data-undo-roster]{min-height:44px}
.team-import-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem .65rem;margin-top:.5rem}
.team-import-columns select{width:100%;min-width:0}
.team-import-review [data-import-results]{margin-top:.65rem}
.team-import-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));gap:.75rem;margin-block:.85rem}
.team-import-actions>div,[data-import-updates]{border-top:1px solid var(--line);padding-block-start:.65rem}
.team-import-actions button,[data-import-updates] button,.team-import-review [data-replace-import]{min-height:44px;white-space:normal;text-align:start}
.team-import-review .customer-primary[data-replace-import]{background:var(--purple-dark);border-color:var(--purple-dark);color:white}
.team-import-review .team-table-scroll table{min-width:100%}
.team-import-review tr>:nth-child(-n+3){white-space:nowrap;width:1%}
.team-import-issue{color:#8c3041}
@media(max-width:640px){
  .team-proof-progress{grid-template-columns:minmax(0,1fr)}
  .team-proof-progress button{grid-column:1;grid-row:auto;width:100%}
  #appDialog[open]:has(.team-roster-flow){--roster-gutter:14px}
  .team-roster-steps li{font-size:.72rem}
  .team-roster-steps li>div{display:grid;justify-items:center;align-content:start;text-align:center;gap:.2rem;padding:.3rem .14rem}
  .team-roster-steps span{width:1.25rem;height:1.25rem}
  .team-roster-flow .team-rows{max-height:none;overflow:visible}
  .team-roster-flow .team-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .team-roster-person{grid-column:1/-1}
  .team-roster-flow .team-row-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .team-row-actions [data-edit-member]{grid-column:1/-1}
  #appDialog .team-roster-flow :is(.team-row,.team-roster-search,.team-import-columns,.team-proof-row) :is(select,input:not([type=checkbox])){font-size:16px}
  .team-roster-footer{grid-template-columns:minmax(4.5rem,.65fr) minmax(0,1fr)}
  .team-roster-footer .team-actions{display:grid;grid-template-columns:minmax(0,1fr);grid-column:1/-1}
  .team-roster-footer .team-actions:has([data-save-account]:not([hidden])){grid-template-columns:repeat(2,minmax(0,1fr))}
  .team-roster-flow .team-actions>button{width:100%;padding-inline:.35rem;font-size:.87rem;overflow-wrap:anywhere}
  .team-draft-status{text-align:start}
  .team-name-setup{grid-template-columns:minmax(0,1fr) minmax(0,6.4rem)}
}
@media(max-width:355px){
  .team-name-setup{grid-template-columns:minmax(0,1fr)}
  .team-name-preview{width:7.5rem;justify-self:start}
}

.team-family-tools{margin-block:.75rem}
.team-family-tools>summary,.team-import-example>summary{color:var(--purple-dark);cursor:pointer}
.team-roster-flow[data-group-flow=family] .team-row{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
.team-roster-flow[data-group-flow=team] .team-row:not(:has(>.team-roster-person)){grid-template-columns:minmax(0,1fr) minmax(0,.7fr) minmax(0,1.6fr)}
.team-row:has(>.team-roster-person)>.team-row-print{grid-column:1/-1}
.team-row-heading [data-row-guide]{margin-inline-start:auto;padding-block:.2rem;font-size:.8rem}
.team-order-summary{margin-block:.6rem;font-weight:650}
.team-name-font{display:flex;align-items:center;gap:.65rem;margin-block:.6rem}
.team-import-example{margin-bottom:.65rem}
.team-import-example pre{overflow:auto;margin-block:.4rem;white-space:pre}
@media(max-width:540px){
  .team-roster-flow[data-group-flow=team] .team-row:not(:has(>.team-roster-person)){grid-template-columns:repeat(2,minmax(0,1fr))}
  .team-row-print{grid-column:1/-1}
}
.team-name-font span{white-space:nowrap}
.team-name-font select{flex:1;width:auto;min-width:0}

.team-size-reference{grid-column:1/-1;color:var(--muted);font-size:.8rem}
