@scope (stack-ui) {
  :where(:scope) {
    --stack-align: center;
  }

  :scope {
    box-sizing: border-box;
    display: grid;
    place-items: var(--stack-align);
    /* Universal [padding] / [margin] opt-in — see tokens.css for scale. */
    padding: var(--a-padding, 0);
    margin: var(--a-margin, 0);
    /* Same UA override as row-ui/col-ui: [align=...] is for flex/grid, not text. */
    text-align: inherit;
  }

  & > * {
    grid-area: 1 / 1;
  }

  /* Alignment */
  :scope[align="center"]       { --stack-align: center; }
  :scope[align="top-left"]     { --stack-align: start start; }
  :scope[align="top-right"]    { --stack-align: start end; }
  :scope[align="bottom-left"]  { --stack-align: end start; }
  :scope[align="bottom-right"] { --stack-align: end end; }
  :scope[align="top"]          { --stack-align: start center; }
  :scope[align="bottom"]       { --stack-align: end center; }
  :scope[align="left"]         { --stack-align: center start; }
  :scope[align="right"]        { --stack-align: center end; }
}
