body:is(.workspace,[data-section]) main table :is(th,td) {
  text-align:center;
  vertical-align:middle;
}
body:is(.workspace,[data-section]) main td :is(input:not([type=checkbox],[type=radio]),select,textarea,output) {
  text-align:center;
}
body:is(.workspace,[data-section]) main table td :is(.order-actions,.actions) {
  justify-content:center;
  align-items:center;
}
body:is(.workspace,[data-section]) main table td .order-actions > a {
  justify-content:center;
  margin-inline:0;
}
@media screen {
  main, main :where(.panel,.account-panel,.fields,.fields > *,fieldset,.filters > label,.order-body,.filter-fields > *) {
    min-inline-size:0;
  }
  main :where(input:not([type=checkbox],[type=radio]),select,textarea,video,iframe) {
    max-inline-size:100%;
    box-sizing:border-box;
  }
  :is(.scroll,.order-scroll,.shipment-items-panel) {
    max-inline-size:100%;
    overscroll-behavior-inline:contain;
  }
  dialog[open] {max-inline-size:calc(100vw - 1rem);max-block-size:calc(100dvh - 1rem);overflow:auto}
}
@media screen and (max-width:740px) {
  main :where(.commandhead,.heading,.page-title-row,.dispatch-card header,.order-actions,.account-actions) {
    flex-wrap:wrap;
    row-gap:.6rem;
  }
  main :where(h1,h2,h3,p,dd,.notice,.errorlist) {overflow-wrap:anywhere}
  main :where(button,.button,.primary,.secondary,.parent-return,.order-actions a) {
    max-inline-size:100%;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  main :is(.order-actions,.admin-product-actions) {flex-wrap:wrap}
  .admin-product-actions > :is(a,button) {flex:1 1 9rem}
  main .dispatch-counts {grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr))}
  .workspace .adminbar {gap:clamp(.3rem,1.5vw,.8rem);flex-wrap:wrap}
  .workspace .adminbar .profile {min-inline-size:0;overflow-wrap:anywhere}
  main .page-title-row > :last-child:not(:first-child) {max-inline-size:100%;margin-inline-start:auto}
}
@media (pointer:coarse) {
  :is(.adminbar,.site-header,.order-actions,.actions,.dealer-cancel-actions) :is(button,a),
  main :is(button,select,.button,.primary,.secondary,.parent-return), .shipment-toggle {min-block-size:2.75rem}
}
@media screen and (max-width:400px) {
  .site-header .header-inner {gap:.35rem; height:auto; min-height:3.75rem; flex-wrap:wrap; padding-block:.3rem}
  .site-header .brand {min-inline-size:0}
}
@media screen and (max-height:520px) {
  .sidebar.drawer, dialog.drawer[open] {overflow-y:auto; max-block-size:100dvh}
}

.account-home {max-inline-size:42rem;margin-inline:auto}
.account-menu,.account-editor {display:grid;gap:.85rem;margin-block-start:1.4rem}
.account-menu .button {display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:2.9rem;padding-inline:1rem;border:1px solid var(--control-edge);border-radius:.5rem;background:var(--control-surface);color:var(--control-text)}
.account-menu .button:is(:hover,:focus-visible) {background:var(--control-hover)}
.account-editor {grid-template-columns:repeat(auto-fit,minmax(min(100%,17rem),1fr))}
.account-editor label {display:grid;align-content:start;gap:.35rem}
.account-editor fieldset,.account-editor button {grid-column:1/-1}
.account-editor button {justify-self:start}

/* Account pages and ordering controls in the dealer catalog. */
:is([data-dealer],[data-section="account"]) .account-main {
  inline-size:min(75rem,calc(100% - clamp(1rem,5vw,4rem)));
  margin-inline:auto;
}
:is([data-dealer],[data-section="account"]) :is(.account-panel,.account-row,.order-picker,.rep-order,.cart-actions,.order-scroll,.dispatch-header-actions) {
  min-inline-size:0;
}
:is([data-dealer],[data-section="account"]) .account-panel :is(h1,h2,h3,p,strong,bdi,output,legend) {
  overflow-wrap:anywhere;
}
[data-section="account"] .account-editor :is(input,textarea),
[data-section="account"] .account-editor .fields {
  inline-size:100%; min-inline-size:0; box-sizing:border-box;
}
[data-section="account"] .account-editor .fields {
  display:grid; gap:.75rem; grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr));
}
[data-section="account"] .order-scroll {overflow-x:auto;max-inline-size:100%}
[data-section="account"] .order-scroll table {min-inline-size:max-content}
[data-section="account"] .order-scroll :is(td,th) {max-inline-size:24rem;white-space:normal;overflow-wrap:anywhere}
[data-section="account"] .account-row > div {min-inline-size:0}
[data-section="account"] .cart-actions {flex-wrap:wrap}
@media (max-width:48rem) {
  :is([data-dealer],[data-section="account"]) .order-picker {
    display:grid;gap:.75rem; grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));
  }
  :is([data-dealer],[data-section="account"]) .order-picker input {inline-size:100%;min-inline-size:0}
  [data-section="account"] .dispatch-header-actions {flex-wrap:wrap}
  [data-section="account"] .rep-order > .order-heading {display:grid;grid-template-columns:minmax(0,1fr) auto; gap:.45rem .7rem}
  [data-section="account"] .order-heading > span:not(.order-date,.order-chevron) {grid-column:1;grid-row:2}
  [data-section="account"] .order-chevron {justify-self:end}
}
@media (max-width:35rem) {
  [data-section="account"] .account-panel {padding:clamp(.65rem,3vw,1rem)}
  [data-section="account"] .account-actions > a {flex:1 1 8rem;text-align:center;justify-content:center}
  [data-section="account"] .studio-actions {display:flex;flex-wrap:wrap;gap:.65rem}
  [data-section="account"] .account-row {align-items:start;flex-wrap:wrap}
  [data-section="account"] .order-actions > a {flex:1 1 9rem;justify-content:center;text-align:center}
}
